agentdex-cli 0.2.1 → 0.2.2
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/dist/client.js +5 -1
- package/package.json +1 -1
- package/src/client.ts +5 -1
package/dist/client.js
CHANGED
|
@@ -55,7 +55,11 @@ export class AgentdexClient {
|
|
|
55
55
|
}
|
|
56
56
|
async claimStatus(paymentHash) {
|
|
57
57
|
const res = await this.fetch(`/api/v1/agents/claim/status?payment_hash=${encodeURIComponent(paymentHash)}`);
|
|
58
|
-
|
|
58
|
+
const data = await res.json();
|
|
59
|
+
// API returns { status: "paid" | "completed" | "pending" | "expired" }
|
|
60
|
+
// Normalize to { paid: true/false } for CLI consumption
|
|
61
|
+
data.paid = data.status === 'paid' || data.status === 'completed';
|
|
62
|
+
return data;
|
|
59
63
|
}
|
|
60
64
|
async search(options = {}) {
|
|
61
65
|
const params = new URLSearchParams();
|
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -125,7 +125,11 @@ export class AgentdexClient {
|
|
|
125
125
|
|
|
126
126
|
async claimStatus(paymentHash: string): Promise<ClaimStatus> {
|
|
127
127
|
const res = await this.fetch(`/api/v1/agents/claim/status?payment_hash=${encodeURIComponent(paymentHash)}`);
|
|
128
|
-
|
|
128
|
+
const data = await res.json();
|
|
129
|
+
// API returns { status: "paid" | "completed" | "pending" | "expired" }
|
|
130
|
+
// Normalize to { paid: true/false } for CLI consumption
|
|
131
|
+
data.paid = data.status === 'paid' || data.status === 'completed';
|
|
132
|
+
return data;
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
async search(options: SearchOptions = {}): Promise<object[]> {
|