import { type HttpRetryOptions } from './retry.js'; import type { KsefClient, KsefClientConfig, KsefSessionState, KsefRawInvoice } from '@ksefnik/core'; import { type KsefEnvironment } from './endpoints.js'; export interface KsefHttpClientOptions { environment: KsefEnvironment; /** * MF RSA public key in PEM/SPKI format used for `/auth/ksef-token` encryption. * If omitted, the client auto-fetches it from `GET /security/public-key-certificates` * on first `initSession()` call and caches it for the lifetime of the client. */ publicKeyPem?: string; baseUrl?: string; fetchImpl?: typeof fetch; userAgent?: string; timeoutMs?: number; retry?: HttpRetryOptions; } export declare class KsefHttpClient implements KsefClient { private readonly opts; private readonly http; private readonly retryOpts; private cachedPublicKeyPem; constructor(opts: KsefHttpClientOptions); private resolvePublicKey; initSession(config: KsefClientConfig): Promise; terminateSession(token: string): Promise; fetchInvoices(params: { token: string; dateFrom: string; dateTo: string; subjectNip?: string; subjectType?: 'Subject1' | 'Subject2' | 'Subject3'; pageSize?: number; pageOffset?: number; includeXml?: boolean; }): Promise<{ invoices: KsefRawInvoice[]; total: number; }>; fetchInvoiceXml(params: { token: string; ksefNumber: string; }): Promise; sendInvoice(): Promise<{ ksefReferenceNumber: string; timestamp: string; }>; getUpo(params: { token: string; ksefReferenceNumber: string; }): Promise<{ xml: string; status: 'confirmed' | 'pending' | 'rejected'; }>; } //# sourceMappingURL=client.d.ts.map