@the_ro_show/agent-ads-sdk 0.13.1 → 0.13.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/README.md +300 -605
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -305,7 +305,7 @@ function sanitizeURL(url, options) {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
// src/client.ts
|
|
308
|
-
var DEFAULT_BASE_URL = "https://
|
|
308
|
+
var DEFAULT_BASE_URL = "https://peruwnbrqkvmrldhpoom.supabase.co/functions/v1";
|
|
309
309
|
var DEFAULT_TIMEOUT_MS = 4e3;
|
|
310
310
|
var DEFAULT_MAX_RETRIES = 2;
|
|
311
311
|
var AttentionMarketClient = class {
|
|
@@ -408,7 +408,7 @@ var AttentionMarketClient = class {
|
|
|
408
408
|
if (options?.idempotencyKey !== void 0) {
|
|
409
409
|
requestOptions.idempotencyKey = options.idempotencyKey;
|
|
410
410
|
}
|
|
411
|
-
return await this.http.request("POST", "/
|
|
411
|
+
return await this.http.request("POST", "/decide", requestOptions);
|
|
412
412
|
}
|
|
413
413
|
/**
|
|
414
414
|
* Convenience wrapper around decideRaw().
|
|
@@ -599,7 +599,7 @@ var AttentionMarketClient = class {
|
|
|
599
599
|
* Report an event (impression, click, action, conversion, feedback).
|
|
600
600
|
*/
|
|
601
601
|
async track(event) {
|
|
602
|
-
return await this.http.request("POST", "/
|
|
602
|
+
return await this.http.request("POST", "/event", {
|
|
603
603
|
body: event
|
|
604
604
|
});
|
|
605
605
|
}
|
|
@@ -689,13 +689,13 @@ var AttentionMarketClient = class {
|
|
|
689
689
|
* ```
|
|
690
690
|
*/
|
|
691
691
|
async sendFeedback(request) {
|
|
692
|
-
return await this.http.request("POST", "/
|
|
692
|
+
return await this.http.request("POST", "/feedback", { body: request });
|
|
693
693
|
}
|
|
694
694
|
/**
|
|
695
695
|
* Fetch default policy constraints and formatting requirements.
|
|
696
696
|
*/
|
|
697
697
|
async getPolicy() {
|
|
698
|
-
return await this.http.request("GET", "/
|
|
698
|
+
return await this.http.request("GET", "/policy");
|
|
699
699
|
}
|
|
700
700
|
/**
|
|
701
701
|
* Create or register an agent (optional helper).
|
|
@@ -707,7 +707,7 @@ var AttentionMarketClient = class {
|
|
|
707
707
|
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
708
708
|
maxRetries: DEFAULT_MAX_RETRIES
|
|
709
709
|
});
|
|
710
|
-
return await http.request("POST", "/
|
|
710
|
+
return await http.request("POST", "/agent-signup", {
|
|
711
711
|
body: request
|
|
712
712
|
});
|
|
713
713
|
}
|
|
@@ -1166,7 +1166,7 @@ var AttentionMarketClient = class {
|
|
|
1166
1166
|
async logServiceResult(params) {
|
|
1167
1167
|
return await this.http.request(
|
|
1168
1168
|
"POST",
|
|
1169
|
-
"/
|
|
1169
|
+
"/service-result",
|
|
1170
1170
|
{ body: params }
|
|
1171
1171
|
);
|
|
1172
1172
|
}
|
|
@@ -1213,7 +1213,7 @@ var AttentionMarketClient = class {
|
|
|
1213
1213
|
if (params?.search) {
|
|
1214
1214
|
queryParams.append("search", params.search);
|
|
1215
1215
|
}
|
|
1216
|
-
const url = `/
|
|
1216
|
+
const url = `/categories${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
|
1217
1217
|
return await this.http.request(
|
|
1218
1218
|
"GET",
|
|
1219
1219
|
url
|