import type { HttpClient } from './http.js'; import type { KsefRawInvoiceExt } from './types.js'; import type { KsefInvoiceMetadata, KsefInvoiceQueryDateType, KsefInvoiceQueryFilters, KsefInvoiceQuerySubjectType, KsefQueryInvoicesMetadataResponse } from './generated/index.js'; export type InvoiceQuerySubjectType = KsefInvoiceQuerySubjectType; export type InvoiceQueryDateType = KsefInvoiceQueryDateType; export type InvoiceQueryBody = KsefInvoiceQueryFilters; export type InvoiceMetadataItem = KsefInvoiceMetadata; export type PagedInvoiceMetadataResponse = KsefQueryInvoicesMetadataResponse; export interface FetchInvoicesHttpParams { accessToken: string; dateFrom: string; dateTo: string; subjectType?: InvoiceQuerySubjectType; dateType?: InvoiceQueryDateType; pageSize?: number; pageOffset?: number; concurrency?: number; /** * When true, also fetch the full FA(2)/FA(3) XML body for each invoice * via `GET /invoices/ksef/{ksefNumber}`. Metadata alone already includes * `grossAmount`, NIPs, dates and currency — so this is off by default. */ includeXml?: boolean; } export declare function mapWithConcurrency(items: readonly T[], concurrency: number, mapper: (item: T, index: number) => Promise): Promise; export declare function queryInvoiceMetadataPage(http: HttpClient, accessToken: string, body: InvoiceQueryBody, pageSize: number, pageOffset: number): Promise; export declare function fetchInvoiceXml(http: HttpClient, accessToken: string, ksefNumber: string): Promise; export declare function fetchInvoices(http: HttpClient, params: FetchInvoicesHttpParams): Promise<{ invoices: KsefRawInvoiceExt[]; total: number; }>; //# sourceMappingURL=invoices.d.ts.map