anaf-ts-sdk
Version:
Complete TypeScript SDK for Romanian ANAF API -E-Factura, Company checks
23 lines (22 loc) • 685 B
TypeScript
import { AnafAuthConfig, TokenResponse } from './types';
/**
* Handles OAuth 2.0 authentication with ANAF e-Factura
*/
export declare class AnafAuthenticator {
private config;
private httpClient;
constructor(config: AnafAuthConfig);
/**
* Generate OAuth authorization URL for user authentication
*/
getAuthorizationUrl(scope?: string): string;
/**
* Exchange authorization code for access and refresh tokens
*/
exchangeCodeForToken(code: string): Promise<TokenResponse>;
/**
* Refresh access token using refresh token
*/
refreshAccessToken(refreshToken: string): Promise<TokenResponse>;
private validateConfig;
}