@the_ro_show/agent-ads-sdk 0.13.2 → 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 +2 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,8 @@ const client = new AttentionMarketClient({
|
|
|
95
95
|
const client = new AttentionMarketClient({
|
|
96
96
|
apiKey: 'am_live_YOUR_KEY', // Required
|
|
97
97
|
agentId: 'agt_YOUR_AGENT_ID', // Required for decideFromContext()
|
|
98
|
-
|
|
98
|
+
// baseUrl defaults to production Supabase endpoint
|
|
99
|
+
// Only override if self-hosting or using different environment
|
|
99
100
|
timeoutMs: 4000, // Optional: request timeout in milliseconds
|
|
100
101
|
maxRetries: 2 // Optional: automatic retry count
|
|
101
102
|
});
|
package/dist/index.js
CHANGED
|
@@ -457,7 +457,7 @@ var AttentionMarketClient = class {
|
|
|
457
457
|
if (options?.idempotencyKey !== void 0) {
|
|
458
458
|
requestOptions.idempotencyKey = options.idempotencyKey;
|
|
459
459
|
}
|
|
460
|
-
return await this.http.request("POST", "/
|
|
460
|
+
return await this.http.request("POST", "/decide", requestOptions);
|
|
461
461
|
}
|
|
462
462
|
/**
|
|
463
463
|
* Convenience wrapper around decideRaw().
|
|
@@ -648,7 +648,7 @@ var AttentionMarketClient = class {
|
|
|
648
648
|
* Report an event (impression, click, action, conversion, feedback).
|
|
649
649
|
*/
|
|
650
650
|
async track(event) {
|
|
651
|
-
return await this.http.request("POST", "/
|
|
651
|
+
return await this.http.request("POST", "/event", {
|
|
652
652
|
body: event
|
|
653
653
|
});
|
|
654
654
|
}
|
|
@@ -738,13 +738,13 @@ var AttentionMarketClient = class {
|
|
|
738
738
|
* ```
|
|
739
739
|
*/
|
|
740
740
|
async sendFeedback(request) {
|
|
741
|
-
return await this.http.request("POST", "/
|
|
741
|
+
return await this.http.request("POST", "/feedback", { body: request });
|
|
742
742
|
}
|
|
743
743
|
/**
|
|
744
744
|
* Fetch default policy constraints and formatting requirements.
|
|
745
745
|
*/
|
|
746
746
|
async getPolicy() {
|
|
747
|
-
return await this.http.request("GET", "/
|
|
747
|
+
return await this.http.request("GET", "/policy");
|
|
748
748
|
}
|
|
749
749
|
/**
|
|
750
750
|
* Create or register an agent (optional helper).
|
|
@@ -756,7 +756,7 @@ var AttentionMarketClient = class {
|
|
|
756
756
|
timeoutMs: DEFAULT_TIMEOUT_MS,
|
|
757
757
|
maxRetries: DEFAULT_MAX_RETRIES
|
|
758
758
|
});
|
|
759
|
-
return await http.request("POST", "/
|
|
759
|
+
return await http.request("POST", "/agent-signup", {
|
|
760
760
|
body: request
|
|
761
761
|
});
|
|
762
762
|
}
|
|
@@ -1215,7 +1215,7 @@ var AttentionMarketClient = class {
|
|
|
1215
1215
|
async logServiceResult(params) {
|
|
1216
1216
|
return await this.http.request(
|
|
1217
1217
|
"POST",
|
|
1218
|
-
"/
|
|
1218
|
+
"/service-result",
|
|
1219
1219
|
{ body: params }
|
|
1220
1220
|
);
|
|
1221
1221
|
}
|
|
@@ -1262,7 +1262,7 @@ var AttentionMarketClient = class {
|
|
|
1262
1262
|
if (params?.search) {
|
|
1263
1263
|
queryParams.append("search", params.search);
|
|
1264
1264
|
}
|
|
1265
|
-
const url = `/
|
|
1265
|
+
const url = `/categories${queryParams.toString() ? "?" + queryParams.toString() : ""}`;
|
|
1266
1266
|
return await this.http.request(
|
|
1267
1267
|
"GET",
|
|
1268
1268
|
url
|