agentcheck-sdk 0.5.0 → 0.6.0
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.d.ts +9 -0
- package/dist/client.js +8 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -16,6 +16,15 @@ export declare class AgentCheckClient {
|
|
|
16
16
|
revoke(agreementId: string, reason: string): Promise<Agreement>;
|
|
17
17
|
/** Register a webhook endpoint. */
|
|
18
18
|
registerWebhook(url: string, events: string[]): Promise<WebhookResult>;
|
|
19
|
+
/** Get audit trail (hash chain) for an agreement. */
|
|
20
|
+
getAuditTrail(agreementId: string): Promise<any>;
|
|
21
|
+
/** Verify hash chain integrity for an agreement. */
|
|
22
|
+
verifyAuditChain(agreementId: string): Promise<{
|
|
23
|
+
valid: boolean;
|
|
24
|
+
total_entries: number;
|
|
25
|
+
broken_at: number | null;
|
|
26
|
+
error: string | null;
|
|
27
|
+
}>;
|
|
19
28
|
/** Self-service signup. Returns API key (shown once). */
|
|
20
29
|
static signup(email: string, companyName?: string, baseUrl?: string): Promise<SignupResult>;
|
|
21
30
|
}
|
package/dist/client.js
CHANGED
|
@@ -72,6 +72,14 @@ class AgentCheckClient {
|
|
|
72
72
|
events,
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
+
/** Get audit trail (hash chain) for an agreement. */
|
|
76
|
+
async getAuditTrail(agreementId) {
|
|
77
|
+
return this.request("GET", `/api/v1/audit/${agreementId}`);
|
|
78
|
+
}
|
|
79
|
+
/** Verify hash chain integrity for an agreement. */
|
|
80
|
+
async verifyAuditChain(agreementId) {
|
|
81
|
+
return this.request("GET", `/api/v1/audit/${agreementId}/verify`);
|
|
82
|
+
}
|
|
75
83
|
/** Self-service signup. Returns API key (shown once). */
|
|
76
84
|
static async signup(email, companyName, baseUrl = DEFAULT_BASE_URL) {
|
|
77
85
|
const body = { email };
|