@subiz/widget-v4 4.1.166 → 4.1.167
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/compiled_src/store/api.js +4 -1
- package/package.json +1 -1
- package/src/store/api.js +4 -1
|
@@ -146,7 +146,10 @@ class _default {
|
|
|
146
146
|
_defineProperty(this, "time", _ => ajax.setBaseUrl(this.ApiURL).withCredentials(true).setParser('json').get('/time'));
|
|
147
147
|
_defineProperty(this, "updateUser", data => this.apireq.post(`/accounts/${this.accid}/users/${this.uid}`, data));
|
|
148
148
|
_defineProperty(this, "getUser", _ => this.apireq.get(`/accounts/${this.accid}/users/${this.uid}`));
|
|
149
|
-
_defineProperty(this, "getAccountSetting", () =>
|
|
149
|
+
_defineProperty(this, "getAccountSetting", () => {
|
|
150
|
+
let href = _index.default.get(document, 'location.href');
|
|
151
|
+
return this.apireq.addQuery('url', href).get(`/accounts/${this.accid}/settings`);
|
|
152
|
+
});
|
|
150
153
|
_defineProperty(this, "sendImpression", impression => this.apireq.post(`/accounts/${this.accid}/campaigns/${impression.campaign_id}/impressions`, impression));
|
|
151
154
|
_defineProperty(this, "sendConversion", conversion => this.apireq.post(`/accounts/${this.accid}/campaigns/${conversion.campaign_id}/conversions`, conversion));
|
|
152
155
|
_defineProperty(this, "lookupOrder", key => ajax.setBaseUrl(this.ApiURL).setContentType('text/plain').beforeHook(jsonifyTextPlain).setParser('json').addQuery('x-signed-key', key).get(`/orders/123`));
|
package/package.json
CHANGED
package/src/store/api.js
CHANGED
|
@@ -358,7 +358,10 @@ export default class {
|
|
|
358
358
|
updateUser = (data) => this.apireq.post(`/accounts/${this.accid}/users/${this.uid}`, data)
|
|
359
359
|
|
|
360
360
|
getUser = (_) => this.apireq.get(`/accounts/${this.accid}/users/${this.uid}`)
|
|
361
|
-
getAccountSetting = () =>
|
|
361
|
+
getAccountSetting = () => {
|
|
362
|
+
let href = sb.get(document, 'location.href') // send full href, this could be used to select which bot (ai-agent) should be returned
|
|
363
|
+
return this.apireq.addQuery('url', href).get(`/accounts/${this.accid}/settings`)
|
|
364
|
+
}
|
|
362
365
|
|
|
363
366
|
sendImpression = (impression) =>
|
|
364
367
|
this.apireq.post(`/accounts/${this.accid}/campaigns/${impression.campaign_id}/impressions`, impression)
|