-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
44 lines (41 loc) · 1.22 KB
/
Copy pathindex.d.ts
File metadata and controls
44 lines (41 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
export interface ClientConfig {
/**
* Stanza API Key ('x-api-key').
* Required for authenticated production access.
*/
apiKey?: string;
/**
* Endpoint base URL. Defaults to 'https://api.stanzaapi.com/iban-validator'.
*/
baseUrl?: string;
/**
* Request timeout in milliseconds. Defaults to 15,000 (15 seconds).
*/
timeoutMs?: number;
/**
* Compliance Tier: 'sandbox' | 'pro' | 'enterprise'.
* 'enterprise' connects to dedicated AWS BAA enclave and permits live ePHI.
* Defaults to 'sandbox'.
*/
tier?: 'sandbox' | 'pro' | 'enterprise';
}
export interface ApiResponse<T = any> {
success: boolean;
data?: T;
error?: string;
code?: string;
tool_url?: string;
upgrade_url?: string;
meta?: {
latency_ms: number;
version: string;
};
}
export declare class IbanValidatorClient {
constructor(config?: ClientConfig);
request<T = any>(endpoint: string, options?: RequestInit): Promise<ApiResponse<T>>;
getHealth(): Promise<ApiResponse<{ status: string; timestamp: string }>>;
validate<T = any>(payload: Record<string, any> | string): Promise<ApiResponse<T>>;
parse<T = any>(payload: Record<string, any> | string): Promise<ApiResponse<T>>;
}
export default IbanValidatorClient;