@@ -253,6 +253,119 @@ export interface PolicyQuickConfigPayload {
253253 rate_limit_rpm : number ;
254254}
255255
256+ // --- Exchange Config ---
257+ export type EndpointPermission = "always_allowed" | "toggleable" | "permanently_blocked" ;
258+
259+ export interface ExchangeEndpoint {
260+ pattern : string ;
261+ method : "GET" | "POST" | "PUT" | "DELETE" ;
262+ permission : EndpointPermission ;
263+ enabled : boolean ;
264+ description : string ;
265+ max_order_value ?: number ;
266+ daily_volume_cap ?: number ;
267+ }
268+
269+ export interface Exchange {
270+ id : string ;
271+ name : string ;
272+ base_url : string ;
273+ auth_pattern : string ;
274+ status : "connected" | "disconnected" | "error" ;
275+ endpoints : ExchangeEndpoint [ ] ;
276+ volume : { today_volume_usd : number ; daily_cap_usd : number } ;
277+ limits : { max_order_value_usd : number ; daily_volume_cap_usd : number } ;
278+ }
279+
280+ export interface ExchangeConfigResponse {
281+ exchanges : Exchange [ ] ;
282+ }
283+
284+ export interface AddExchangePayload {
285+ name : string ;
286+ base_url : string ;
287+ auth_pattern : string ;
288+ blocked_endpoints : string [ ] ;
289+ }
290+
291+ export interface UpdateEndpointPayload {
292+ exchange_id : string ;
293+ endpoint_pattern : string ;
294+ enabled : boolean ;
295+ max_order_value ?: number ;
296+ daily_volume_cap ?: number ;
297+ }
298+
299+ export interface UpdateExchangeLimitsPayload {
300+ exchange_id : string ;
301+ max_order_value_usd : number ;
302+ daily_volume_cap_usd : number ;
303+ }
304+
305+ // --- ZK Proofs ---
306+ export type ProofJobStatus = "pending" | "generating" | "completed" | "failed" ;
307+
308+ export interface ProofGeneratePayload {
309+ from_date : string ;
310+ to_date : string ;
311+ }
312+
313+ export interface ProofGenerateResponse {
314+ job_id : string ;
315+ }
316+
317+ export interface ProofJobStatusResponse {
318+ job_id : string ;
319+ status : ProofJobStatus ;
320+ progress_pct : number ;
321+ error ?: string ;
322+ }
323+
324+ export interface ProofResult {
325+ id : string ;
326+ job_id : string ;
327+ generated_at : number ;
328+ from_date : string ;
329+ to_date : string ;
330+ entries_covered : number ;
331+ merkle_root : string ;
332+ policy_hash : string ;
333+ spend_status : "within_budget" | "over_budget" | "no_data" ;
334+ download_url : string ;
335+ }
336+
337+ export interface ProofHistoryResponse {
338+ proofs : ProofResult [ ] ;
339+ }
340+
341+ // --- Settings (extended) ---
342+ export interface ChangePasswordPayload {
343+ current_password : string ;
344+ new_password : string ;
345+ confirm_password : string ;
346+ }
347+
348+ export interface VaultBackupResponse {
349+ download_url : string ;
350+ filename : string ;
351+ }
352+
353+ export interface NetworkIsolationResponse {
354+ enabled : boolean ;
355+ status : "active" | "inactive" | "error" ;
356+ }
357+
358+ export type SignerModeType = "secure_enclave" | "encrypted_keyfile" | "threshold" ;
359+
360+ export interface SignerModeResponse {
361+ current : SignerModeType ;
362+ available : SignerModeType [ ] ;
363+ }
364+
365+ export interface FactoryResetResponse {
366+ success : boolean ;
367+ }
368+
256369// --- Generic ---
257370export interface ApiError {
258371 error : string ;
0 commit comments