vies-checker
Version:
Modern European VIES VAT number validator with full TypeScript support
17 lines (16 loc) • 650 B
TypeScript
import { EuropeanMemberState, ViesResponse, ViesCheckOptions } from '../interfaces.js';
/**
* Makes a request to the VIES API with timeout and retry support
*
* @param country - Two-letter EU country code
* @param vatNumber - VAT number to validate
* @param options - Request options (timeout, retries)
* @returns VIES API response
* @throws {ViesError} On API errors or validation failures
*
* @example
* ```typescript
* const response = await fetchVies('LU', '26375245', { timeout: 5000 });
* ```
*/
export default function fetchVies(country: EuropeanMemberState, vatNumber: string, options?: ViesCheckOptions): Promise<ViesResponse>;