@saasquatch/squatch-js 2.4.2-2 → 2.4.2-4
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/CHANGELOG.md +3 -3
- package/dist/squatch.esm.js +2 -2
- package/dist/squatch.js +2 -2
- package/dist/squatch.min.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,16 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
|
|
14
|
-
- Added
|
|
14
|
+
- Added value to return data `squatchReferralCookie` to retrieve the encoded cookie
|
|
15
15
|
|
|
16
16
|
- Example:
|
|
17
17
|
|
|
18
18
|
```js
|
|
19
19
|
squatch
|
|
20
20
|
.api()
|
|
21
|
-
.squatchReferralCookie(
|
|
21
|
+
.squatchReferralCookie()
|
|
22
22
|
.then(function (response) {
|
|
23
|
-
|
|
23
|
+
const cookie = response.encodedCookie;
|
|
24
24
|
});
|
|
25
25
|
```
|
|
26
26
|
|
package/dist/squatch.esm.js
CHANGED
|
@@ -342,14 +342,14 @@ class WidgetApi {
|
|
|
342
342
|
*/
|
|
343
343
|
|
|
344
344
|
|
|
345
|
-
squatchReferralCookie() {
|
|
345
|
+
async squatchReferralCookie() {
|
|
346
346
|
const tenantAlias = encodeURIComponent(this.tenantAlias);
|
|
347
347
|
|
|
348
348
|
const _saasquatch = Cookies.get("_saasquatch") || "";
|
|
349
349
|
|
|
350
350
|
const cookie = _saasquatch ? `?cookies=${encodeURIComponent(_saasquatch)}` : ``;
|
|
351
351
|
const url = `${this.domain}/a/${tenantAlias}/widgets/squatchcookiejson${cookie}`;
|
|
352
|
-
const response = doGet(url);
|
|
352
|
+
const response = await doGet(url);
|
|
353
353
|
return Promise.resolve(_extends({}, response, {
|
|
354
354
|
encodedCookie: _saasquatch
|
|
355
355
|
}));
|
package/dist/squatch.js
CHANGED
|
@@ -369,14 +369,14 @@ class WidgetApi {
|
|
|
369
369
|
*/
|
|
370
370
|
|
|
371
371
|
|
|
372
|
-
squatchReferralCookie() {
|
|
372
|
+
async squatchReferralCookie() {
|
|
373
373
|
const tenantAlias = encodeURIComponent(this.tenantAlias);
|
|
374
374
|
|
|
375
375
|
const _saasquatch = Cookies__default['default'].get("_saasquatch") || "";
|
|
376
376
|
|
|
377
377
|
const cookie = _saasquatch ? `?cookies=${encodeURIComponent(_saasquatch)}` : ``;
|
|
378
378
|
const url = `${this.domain}/a/${tenantAlias}/widgets/squatchcookiejson${cookie}`;
|
|
379
|
-
const response = doGet(url);
|
|
379
|
+
const response = await doGet(url);
|
|
380
380
|
return Promise.resolve(_extends({}, response, {
|
|
381
381
|
encodedCookie: _saasquatch
|
|
382
382
|
}));
|