ksef-client-ts 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -77,7 +77,18 @@ declare class DefaultAuthManager implements AuthManager {
77
77
  }
78
78
 
79
79
  interface KSeFClientOptions {
80
+ /**
81
+ * Target KSeF environment. Defaults to `'TEST'` when neither `environment`
82
+ * nor `baseUrl` is specified.
83
+ */
80
84
  environment?: EnvironmentName;
85
+ /**
86
+ * Custom base URL for the KSeF API. Overrides the URL from `environment`.
87
+ *
88
+ * **Warning:** When `baseUrl` is set without `environment`, the test environment
89
+ * guard is bypassed — test data APIs will not be blocked. Set `environment`
90
+ * explicitly alongside `baseUrl` if the guard is needed.
91
+ */
81
92
  baseUrl?: string;
82
93
  baseQrUrl?: string;
83
94
  lighthouseUrl?: string;
@@ -97,6 +108,7 @@ interface ResolvedOptions {
97
108
  apiVersion: string;
98
109
  timeout: number;
99
110
  customHeaders: Record<string, string>;
111
+ environmentName?: EnvironmentName;
100
112
  }
101
113
  declare function resolveOptions(options?: KSeFClientOptions): ResolvedOptions;
102
114
 
@@ -613,6 +625,11 @@ interface BatchPartSendingInfo {
613
625
  metadata: FileMetadata;
614
626
  ordinalNumber: number;
615
627
  }
628
+ interface BatchPartStreamSendingInfo {
629
+ dataStream: ReadableStream<Uint8Array>;
630
+ metadata: FileMetadata;
631
+ ordinalNumber: number;
632
+ }
616
633
 
617
634
  interface SessionsFilter {
618
635
  referenceNumber?: string;
@@ -1622,6 +1639,72 @@ interface QrCodeOptions {
1622
1639
  errorCorrectionLevel?: 'L' | 'M' | 'Q' | 'H';
1623
1640
  }
1624
1641
 
1642
+ declare const SystemCode: {
1643
+ readonly FA_2: "FA (2)";
1644
+ readonly FA_3: "FA (3)";
1645
+ readonly PEF_3: "PEF (3)";
1646
+ readonly PEF_KOR_3: "PEF_KOR (3)";
1647
+ readonly FA_RR_1: "FA_RR (1)";
1648
+ };
1649
+ type SystemCode = (typeof SystemCode)[keyof typeof SystemCode];
1650
+ declare const FORM_CODES: {
1651
+ readonly FA_2: {
1652
+ readonly systemCode: "FA (2)";
1653
+ readonly schemaVersion: "1-0E";
1654
+ readonly value: "FA";
1655
+ };
1656
+ readonly FA_3: {
1657
+ readonly systemCode: "FA (3)";
1658
+ readonly schemaVersion: "1-0E";
1659
+ readonly value: "FA";
1660
+ };
1661
+ readonly PEF_3: {
1662
+ readonly systemCode: "PEF (3)";
1663
+ readonly schemaVersion: "2-1";
1664
+ readonly value: "PEF";
1665
+ };
1666
+ readonly PEF_KOR_3: {
1667
+ readonly systemCode: "PEF_KOR (3)";
1668
+ readonly schemaVersion: "2-1";
1669
+ readonly value: "PEF";
1670
+ };
1671
+ readonly FA_RR_1_LEGACY: {
1672
+ readonly systemCode: "FA_RR (1)";
1673
+ readonly schemaVersion: "1-0E";
1674
+ readonly value: "RR";
1675
+ };
1676
+ readonly FA_RR_1_TRANSITION: {
1677
+ readonly systemCode: "FA_RR (1)";
1678
+ readonly schemaVersion: "1-1E";
1679
+ readonly value: "RR";
1680
+ };
1681
+ readonly FA_RR_1: {
1682
+ readonly systemCode: "FA_RR (1)";
1683
+ readonly schemaVersion: "1-1E";
1684
+ readonly value: "FA_RR";
1685
+ };
1686
+ };
1687
+ type OnlineSessionFormCode = (typeof FORM_CODES)[keyof typeof FORM_CODES];
1688
+ type BatchSessionFormCode = typeof FORM_CODES.FA_2 | typeof FORM_CODES.FA_3 | typeof FORM_CODES.FA_RR_1_LEGACY | typeof FORM_CODES.FA_RR_1_TRANSITION | typeof FORM_CODES.FA_RR_1;
1689
+ declare const INVOICE_TYPES_BY_SYSTEM_CODE: Record<SystemCode, readonly InvoiceType[]>;
1690
+ declare const FORM_CODE_KEYS: Record<string, FormCode>;
1691
+
1692
+ /**
1693
+ * Returns the default FormCode constant for a given SystemCode.
1694
+ * For FA_RR_1, returns the current variant (schemaVersion 1-1E, value FA_RR).
1695
+ */
1696
+ declare function getFormCode(systemCode: SystemCode): FormCode;
1697
+ /**
1698
+ * Matches a raw FormCode from an API response to the closest typed constant.
1699
+ * Returns the raw object unchanged if no exact match is found.
1700
+ */
1701
+ declare function parseFormCode(raw: FormCode): FormCode;
1702
+ /**
1703
+ * Validates whether a FormCode is valid for the given session type.
1704
+ * Batch sessions do not support PEF or PEF_KOR document types.
1705
+ */
1706
+ declare function validateFormCodeForSession(formCode: FormCode, sessionType: 'online' | 'batch'): boolean;
1707
+
1625
1708
  declare class AuthService {
1626
1709
  private readonly restClient;
1627
1710
  constructor(restClient: RestClient);
@@ -1654,6 +1737,12 @@ declare class BatchSessionService {
1654
1737
  constructor(restClient: RestClient);
1655
1738
  openSession(request: OpenBatchSessionRequest, upoVersion?: UpoVersion | string): Promise<OpenBatchSessionResponse>;
1656
1739
  sendParts(openResponse: OpenBatchSessionResponse, parts: BatchPartSendingInfo[]): Promise<void>;
1740
+ /**
1741
+ * Upload parts sequentially (not in parallel) because each part uses a
1742
+ * streaming body (`duplex: 'half'`). Parallel streaming uploads can cause
1743
+ * backpressure issues and exceed memory limits for large payloads.
1744
+ */
1745
+ sendPartsWithStream(openResponse: OpenBatchSessionResponse, parts: BatchPartStreamSendingInfo[]): Promise<void>;
1657
1746
  closeSession(batchRef: string): Promise<void>;
1658
1747
  }
1659
1748
 
@@ -1751,7 +1840,9 @@ declare class PeppolService {
1751
1840
 
1752
1841
  declare class TestDataService {
1753
1842
  private readonly restClient;
1754
- constructor(restClient: RestClient);
1843
+ private readonly environmentName?;
1844
+ constructor(restClient: RestClient, environmentName?: EnvironmentName);
1845
+ private ensureTestEnvironment;
1755
1846
  createSubject(request: SubjectCreateRequest): Promise<void>;
1756
1847
  removeSubject(request: SubjectRemoveRequest): Promise<void>;
1757
1848
  createPerson(request: PersonCreateRequest): Promise<void>;
@@ -1872,6 +1963,56 @@ declare class AuthorizationPermissionGrantBuilder {
1872
1963
  build(): GrantPermissionsAuthorizationRequest;
1873
1964
  }
1874
1965
 
1966
+ /** Maximum size of a single unencrypted batch part (100 MB). */
1967
+ declare const BATCH_MAX_PART_SIZE = 100000000;
1968
+ /** Maximum total unencrypted ZIP size (5 GB). */
1969
+ declare const BATCH_MAX_TOTAL_SIZE = 5000000000;
1970
+ /** Maximum number of batch parts allowed by KSeF API. */
1971
+ declare const BATCH_MAX_PARTS = 50;
1972
+ interface BatchFileBuildOptions {
1973
+ /** Max unencrypted part size in bytes. Default: 100 MB. */
1974
+ maxPartSize?: number;
1975
+ }
1976
+ interface BatchFileBuildResult {
1977
+ /** Metadata for OpenBatchSessionRequest.batchFile. */
1978
+ batchFile: BatchFileInfo;
1979
+ /** Encrypted parts ready for upload, indexed 0..N-1. */
1980
+ encryptedParts: Uint8Array[];
1981
+ }
1982
+ interface BatchStreamBuildResult {
1983
+ /** Metadata for OpenBatchSessionRequest.batchFile. */
1984
+ batchFile: BatchFileInfo;
1985
+ /** Stream-based encrypted parts ready for upload. */
1986
+ streamParts: BatchPartStreamSendingInfo[];
1987
+ }
1988
+ /**
1989
+ * Splits a ZIP file into parts, encrypts each part, and computes
1990
+ * all SHA-256 hashes required by the KSeF batch API.
1991
+ */
1992
+ declare class BatchFileBuilder {
1993
+ /**
1994
+ * Build batch file metadata and encrypted parts from a raw ZIP.
1995
+ *
1996
+ * @param zipBytes - Unencrypted ZIP data
1997
+ * @param encryptFn - AES-256-CBC encryption function (called per part)
1998
+ * @param options - Optional configuration
1999
+ */
2000
+ static build(zipBytes: Uint8Array, encryptFn: (part: Uint8Array) => Uint8Array, options?: BatchFileBuildOptions): BatchFileBuildResult;
2001
+ /**
2002
+ * Stream-based variant: two-pass build from a stream factory.
2003
+ *
2004
+ * Pass 1: consume stream to compute ZIP hash.
2005
+ * Pass 2: re-create stream, split into parts, encrypt each, compute per-part metadata.
2006
+ *
2007
+ * @param zipStreamFactory - Factory that creates a fresh ReadableStream of the ZIP data
2008
+ * @param zipSize - Total ZIP byte size (from fs.stat or known in advance)
2009
+ * @param encryptStreamFn - Stream-to-stream AES-256-CBC encryption function
2010
+ * @param hashStreamFn - Stream-to-FileMetadata hashing function
2011
+ * @param options - Optional configuration
2012
+ */
2013
+ static buildFromStream(zipStreamFactory: () => ReadableStream<Uint8Array>, zipSize: number, encryptStreamFn: (stream: ReadableStream<Uint8Array>) => ReadableStream<Uint8Array>, hashStreamFn: (stream: ReadableStream<Uint8Array>) => Promise<FileMetadata>, options?: BatchFileBuildOptions): Promise<BatchStreamBuildResult>;
2014
+ }
2015
+
1875
2016
  declare class CertificateFetcher {
1876
2017
  private readonly restClient;
1877
2018
  private symmetricKeyPem;
@@ -1900,6 +2041,11 @@ declare class CryptographyService {
1900
2041
  init(): Promise<void>;
1901
2042
  /** Encrypt with AES-256-CBC (PKCS7 padding is automatic in Node). */
1902
2043
  encryptAES256(content: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array;
2044
+ /**
2045
+ * Encrypt with AES-256-CBC as a streaming transform.
2046
+ * Returns a ReadableStream that yields encrypted chunks as the input is read.
2047
+ */
2048
+ encryptAES256Stream(input: ReadableStream<Uint8Array>, key: Uint8Array, iv: Uint8Array): ReadableStream<Uint8Array>;
1903
2049
  /** Decrypt with AES-256-CBC. */
1904
2050
  decryptAES256(content: Uint8Array, key: Uint8Array, iv: Uint8Array): Uint8Array;
1905
2051
  /**
@@ -1923,6 +2069,8 @@ declare class CryptographyService {
1923
2069
  encryptKsefToken(token: string, challengeTimestamp: string): Uint8Array;
1924
2070
  /** Compute SHA-256 hash (base64) and byte length. */
1925
2071
  getFileMetadata(file: Uint8Array): FileMetadata;
2072
+ /** Compute SHA-256 hash (base64) and byte length from a ReadableStream. */
2073
+ getFileMetadataFromStream(stream: ReadableStream<Uint8Array>): Promise<FileMetadata>;
1926
2074
  /** Generate an RSA-2048 CSR (PKCS#10, DER) and return it together with the private key PEM. */
1927
2075
  generateCsrRsa(fields: X500NameFields): Promise<CsrResult>;
1928
2076
  /** Generate an ECDSA P-256 CSR (PKCS#10, DER) and return it together with the private key PEM. */
@@ -1979,6 +2127,20 @@ declare class Pkcs12Loader {
1979
2127
  static load(p12: Buffer | Uint8Array, password: string): Pkcs12Result;
1980
2128
  }
1981
2129
 
2130
+ interface AuthTokenRequestXmlOptions {
2131
+ challenge: string;
2132
+ contextIdentifier: ContextIdentifier;
2133
+ subjectIdentifierType?: XadesSubjectIdentifierType;
2134
+ }
2135
+ /**
2136
+ * Build an unsigned KSeF auth token request XML document.
2137
+ *
2138
+ * Supports all four context identifier types: Nip, InternalId, NipVatUe, PeppolId.
2139
+ * The returned XML is ready for external signing (e.g. HSM, EPUAP, smart cards)
2140
+ * or can be signed internally via {@link SignatureService.sign}.
2141
+ */
2142
+ declare function buildUnsignedAuthTokenRequestXml(options: AuthTokenRequestXmlOptions): string;
2143
+
1982
2144
  declare class VerificationLinkService {
1983
2145
  private readonly baseQrUrl;
1984
2146
  constructor(baseQrUrl: string);
@@ -2003,6 +2165,71 @@ declare class QrCodeService {
2003
2165
  static generateResult(url: string, options?: QrCodeOptions): Promise<QrCodeResult>;
2004
2166
  }
2005
2167
 
2168
+ interface ZipEntryInput {
2169
+ fileName: string;
2170
+ content: Buffer | Uint8Array;
2171
+ }
2172
+ interface UnzipOptions {
2173
+ maxFiles?: number;
2174
+ maxTotalUncompressedSize?: number;
2175
+ maxFileUncompressedSize?: number;
2176
+ maxCompressionRatio?: number | null;
2177
+ }
2178
+ declare function createZip(entries: ZipEntryInput[]): Promise<Buffer>;
2179
+ declare function unzip(buffer: Buffer, options?: UnzipOptions): Promise<Map<string, Buffer>>;
2180
+
2181
+ type UpoContextId = {
2182
+ kind: 'Nip';
2183
+ nip: string;
2184
+ } | {
2185
+ kind: 'IdWewnetrzny';
2186
+ idWewnetrzny: string;
2187
+ } | {
2188
+ kind: 'IdZlozonyVatUE';
2189
+ idZlozonyVatUE: string;
2190
+ } | {
2191
+ kind: 'IdDostawcyUslugPeppol';
2192
+ idDostawcyUslugPeppol: string;
2193
+ };
2194
+ type UpoAuthProof = {
2195
+ kind: 'NumerReferencyjnyTokenaKSeF';
2196
+ numerReferencyjnyTokenaKSeF: string;
2197
+ } | {
2198
+ kind: 'SkrotDokumentuUwierzytelniajacego';
2199
+ skrotDokumentuUwierzytelniajacego: string;
2200
+ };
2201
+ interface UpoUwierzytelnienie {
2202
+ idKontekstu: UpoContextId;
2203
+ proof: UpoAuthProof;
2204
+ }
2205
+ interface UpoOpisPotwierdzenia {
2206
+ strona: number;
2207
+ liczbaStron: number;
2208
+ zakresDokumentowOd: number;
2209
+ zakresDokumentowDo: number;
2210
+ calkowitaLiczbaDokumentow: number;
2211
+ }
2212
+ interface UpoDokument {
2213
+ nipSprzedawcy: string;
2214
+ numerKSeFDokumentu: string;
2215
+ numerFaktury: string;
2216
+ dataWystawieniaFaktury: string;
2217
+ dataPrzeslaniaDokumentu: string;
2218
+ dataNadaniaNumeruKSeF: string;
2219
+ skrotDokumentu: string;
2220
+ trybWysylki: string;
2221
+ }
2222
+ interface UpoPotwierdzenie {
2223
+ nazwaPodmiotuPrzyjmujacego: string;
2224
+ numerReferencyjnySesji: string;
2225
+ uwierzytelnienie: UpoUwierzytelnienie;
2226
+ opisPotwierdzenia?: UpoOpisPotwierdzenia;
2227
+ nazwaStrukturyLogicznej: string;
2228
+ kodFormularza: string;
2229
+ dokumenty: UpoDokument[];
2230
+ }
2231
+ declare function parseUpoXml(xml: string | Buffer): UpoPotwierdzenie;
2232
+
2006
2233
  interface PollOptions {
2007
2234
  intervalMs?: number;
2008
2235
  maxAttempts?: number;
@@ -2014,6 +2241,7 @@ interface OnlineSessionHandle {
2014
2241
  sendInvoice(invoiceXml: string | Uint8Array): Promise<string>;
2015
2242
  close(): Promise<void>;
2016
2243
  waitForUpo(options?: PollOptions): Promise<UpoInfo>;
2244
+ waitForUpoParsed(options?: PollOptions): Promise<ParsedUpoInfo>;
2017
2245
  }
2018
2246
  interface UpoInfo {
2019
2247
  pages: Array<{
@@ -2024,10 +2252,17 @@ interface UpoInfo {
2024
2252
  successfulInvoiceCount?: number;
2025
2253
  failedInvoiceCount?: number;
2026
2254
  }
2255
+ interface ParsedUpoInfo extends UpoInfo {
2256
+ parsed: UpoPotwierdzenie[];
2257
+ }
2027
2258
  interface BatchUploadResult {
2028
2259
  sessionRef: string;
2029
2260
  upo: UpoInfo;
2030
2261
  }
2262
+ interface ParsedBatchUploadResult {
2263
+ sessionRef: string;
2264
+ upo: ParsedUpoInfo;
2265
+ }
2031
2266
  interface ExportResult {
2032
2267
  parts: Array<{
2033
2268
  ordinalNumber: number;
@@ -2041,10 +2276,14 @@ interface ExportResult {
2041
2276
  invoiceCount: number;
2042
2277
  isTruncated: boolean;
2043
2278
  permanentStorageHwmDate?: string;
2279
+ lastPermanentStorageDate?: string;
2044
2280
  }
2045
2281
  interface ExportDownloadResult extends ExportResult {
2046
2282
  decryptedParts: Uint8Array[];
2047
2283
  }
2284
+ interface ExportExtractedResult extends ExportResult {
2285
+ files: Map<string, Buffer>;
2286
+ }
2048
2287
 
2049
2288
  declare function pollUntil<T>(action: () => Promise<T>, condition: (result: T) => boolean, options?: PollOptions & {
2050
2289
  description?: string;
@@ -2090,11 +2329,16 @@ interface BatchUploadOptions {
2090
2329
  formCode?: FormCode;
2091
2330
  upoVersion?: UpoVersion | string;
2092
2331
  pollOptions?: PollOptions;
2332
+ /** Max unencrypted part size in bytes. Default: 100 MB. */
2333
+ maxPartSize?: number;
2334
+ /** Pass-through to KSeF API. */
2335
+ offlineMode?: boolean;
2093
2336
  }
2094
- interface BatchPart {
2095
- data: ArrayBuffer;
2096
- }
2097
- declare function uploadBatch(client: KSeFClient, zipParts: BatchPart[], totalFileSize: number, totalFileHash: string, options?: BatchUploadOptions): Promise<BatchUploadResult>;
2337
+ declare function uploadBatch(client: KSeFClient, zipData: Uint8Array, options?: BatchUploadOptions): Promise<BatchUploadResult>;
2338
+
2339
+ declare function uploadBatchStream(client: KSeFClient, zipStreamFactory: () => ReadableStream<Uint8Array>, zipSize: number, options?: BatchUploadOptions): Promise<BatchUploadResult>;
2340
+ declare function uploadBatchStreamParsed(client: KSeFClient, zipStreamFactory: () => ReadableStream<Uint8Array>, zipSize: number, options?: BatchUploadOptions): Promise<ParsedBatchUploadResult>;
2341
+ declare function uploadBatchParsed(client: KSeFClient, zipData: Uint8Array, options?: BatchUploadOptions): Promise<ParsedBatchUploadResult>;
2098
2342
 
2099
2343
  interface ExportOptions {
2100
2344
  onlyMetadata?: boolean;
@@ -2103,10 +2347,63 @@ interface ExportOptions {
2103
2347
  interface ExportAndDownloadOptions extends ExportOptions {
2104
2348
  /** Custom fetch function for downloading parts (defaults to global fetch). */
2105
2349
  transport?: typeof fetch;
2350
+ /** When true, concatenate and extract the ZIP, returning named files. */
2351
+ extract?: boolean;
2352
+ /** Options for ZIP extraction safety limits (only used when extract is true). */
2353
+ unzipOptions?: UnzipOptions;
2106
2354
  }
2107
2355
  declare function exportInvoices(client: KSeFClient, filters: InvoiceQueryFilters, options?: ExportOptions): Promise<ExportResult>;
2356
+ declare function exportAndDownload(client: KSeFClient, filters: InvoiceQueryFilters, options: ExportAndDownloadOptions & {
2357
+ extract: true;
2358
+ }): Promise<ExportExtractedResult>;
2108
2359
  declare function exportAndDownload(client: KSeFClient, filters: InvoiceQueryFilters, options?: ExportAndDownloadOptions): Promise<ExportDownloadResult>;
2109
2360
 
2361
+ type ContinuationPoints = Record<string, string | undefined>;
2362
+ declare function updateContinuationPoint(points: ContinuationPoints, subjectType: string, pkg: Pick<InvoiceExportPackage, 'isTruncated' | 'lastPermanentStorageDate' | 'permanentStorageHwmDate'>): void;
2363
+ declare function getEffectiveStartDate(points: ContinuationPoints, subjectType: string, windowFrom: string): string;
2364
+ declare function deduplicateByKsefNumber<T extends {
2365
+ ksefNumber: string;
2366
+ }>(entries: T[]): T[];
2367
+
2368
+ interface HwmStore {
2369
+ load(): Promise<ContinuationPoints>;
2370
+ save(points: ContinuationPoints): Promise<void>;
2371
+ }
2372
+ declare class InMemoryHwmStore implements HwmStore {
2373
+ private points;
2374
+ load(): Promise<ContinuationPoints>;
2375
+ save(points: ContinuationPoints): Promise<void>;
2376
+ }
2377
+ declare class FileHwmStore implements HwmStore {
2378
+ private readonly filePath;
2379
+ constructor(filePath: string);
2380
+ load(): Promise<ContinuationPoints>;
2381
+ save(points: ContinuationPoints): Promise<void>;
2382
+ }
2383
+
2384
+ interface IncrementalExportOptions {
2385
+ subjectType: InvoiceSubjectType;
2386
+ windowFrom: string;
2387
+ windowTo: string;
2388
+ continuationPoints: ContinuationPoints;
2389
+ maxIterations?: number;
2390
+ filtersFactory?: (from: string, to: string) => InvoiceQueryFilters;
2391
+ pollOptions?: PollOptions;
2392
+ onlyMetadata?: boolean;
2393
+ transport?: typeof fetch;
2394
+ store?: HwmStore;
2395
+ onIterationComplete?: (iteration: number, result: ExportResult) => void;
2396
+ }
2397
+ interface IncrementalExportResult {
2398
+ referenceNumbers: string[];
2399
+ /** Deduplicated invoice metadata. Empty until P3.2 (UPO Parsing) integrates metadata extraction. */
2400
+ invoices: InvoiceMetadata[];
2401
+ decryptedParts: Uint8Array[];
2402
+ continuationPoints: ContinuationPoints;
2403
+ iterationCount: number;
2404
+ }
2405
+ declare function incrementalExportAndDownload(client: KSeFClient, options: IncrementalExportOptions): Promise<IncrementalExportResult>;
2406
+
2110
2407
  interface AuthResult {
2111
2408
  accessToken: string;
2112
2409
  accessTokenValidUntil: string;
@@ -2137,6 +2434,14 @@ interface Pkcs12AuthOptions {
2137
2434
  }
2138
2435
  declare function authenticateWithToken(client: KSeFClient, options: TokenAuthOptions): Promise<AuthResult>;
2139
2436
  declare function authenticateWithCertificate(client: KSeFClient, options: CertificateAuthOptions): Promise<AuthResult>;
2437
+ interface ExternalSignatureAuthOptions {
2438
+ contextIdentifier: ContextIdentifier;
2439
+ signXml: (unsignedXml: string) => Promise<string> | string;
2440
+ verifyCertificateChain?: boolean;
2441
+ enforceXadesCompliance?: boolean;
2442
+ pollOptions?: PollOptions;
2443
+ }
2444
+ declare function authenticateWithExternalSignature(client: KSeFClient, options: ExternalSignatureAuthOptions): Promise<AuthResult>;
2140
2445
  declare function authenticateWithPkcs12(client: KSeFClient, options: Pkcs12AuthOptions): Promise<AuthResult>;
2141
2446
 
2142
- export { ActiveSessionsService, type AllowedIps, type AmountType, type ApiErrorResponse, type ApiRateLimitValuesOverride, type ApiRateLimitsOverride, type AttachmentPermissionGrantRequest, type AttachmentPermissionRevokeRequest, type AuthChallengeResponse, type AuthKsefTokenRequest, AuthKsefTokenRequestBuilder, type AuthManager, type AuthResult, AuthService, type AuthSessionInfo, type AuthTokenRequest, AuthTokenRequestBuilder, type AuthenticationInitResponse, type AuthenticationKsefToken, type AuthenticationListResponse, type AuthenticationMethod, type AuthenticationMethodInfo, type AuthenticationMethodInfoCategory, type AuthenticationOperationStatusResponse, type AuthenticationTokenRefreshResponse, type AuthenticationTokensResponse, type AuthorizationGrant, AuthorizationPermissionGrantBuilder, type AuthorizationPolicy, Base64String, type BatchFileInfo, type BatchFilePartInfo, type BatchPart, type BatchPartSendingInfo, type BatchSessionContextLimitsOverride, type BatchSessionEffectiveContextLimits, BatchSessionService, type BatchUploadOptions, type BatchUploadResult, type BlockContextAuthenticationRequest, type BuyerIdentifierType, CERTIFICATE_NAME_MAX_LENGTH, CERTIFICATE_NAME_MIN_LENGTH, CertificateApiService, type CertificateAuthOptions, type CertificateEffectiveSubjectLimits, type CertificateEnrollmentDataResponse, type CertificateEnrollmentStatusResponse, CertificateFetcher, CertificateFingerprint, type CertificateLimit, type CertificateLimitsResponse, type CertificateListItem, CertificateName, type CertificateRevocationReason, CertificateService, type CertificateStatus, type CertificateSubjectIdentifier, type CertificateSubjectIdentifierType, type CertificateSubjectLimitsOverride, type CertificateType, type ContextIdentifier, type ContextIdentifierType, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DefaultAuthManager, ENFORCE_XADES_COMPLIANCE, type EffectiveApiRateLimitValues, type EffectiveApiRateLimits, type EffectiveContextLimits, type EffectiveSubjectLimits, type EncryptionData, type EncryptionInfo, type EnrollCertificateRequest, type EnrollCertificateResponse, type EnrollmentEffectiveSubjectLimits, type EnrollmentSubjectLimitsOverride, type EntityAuthorizationGrant, type EntityAuthorizationPermissionType, type EntityAuthorizationPermissionsSubjectIdentifierType, type EntityAuthorizationSubjectIdentifier, type EntityAuthorizationsAuthorIdentifier, type EntityAuthorizationsAuthorIdentifierType, type EntityAuthorizationsAuthorizedEntityIdentifier, type EntityAuthorizationsAuthorizedEntityIdentifierType, type EntityAuthorizationsAuthorizingEntityIdentifier, type EntityAuthorizationsAuthorizingEntityIdentifierType, type EntityAuthorizationsQueryType, type EntityByFingerprintDetails, type EntityDetails, type EntityPermission, EntityPermissionGrantBuilder, type EntityPermissionItem, type EntityPermissionItemType, type EntityPermissionsContextIdentifier, type EntityPermissionsContextIdentifierType, type EntityRole, type EntityRoleType, type EntityRolesParentEntityIdentifier, type EntityRolesParentEntityIdentifierType, type EntitySubjectByFingerprintDetailsType, type EntitySubjectByIdentifierDetailsType, type EntitySubjectDetailsType, type EntitySubjectIdentifier, Environment, type EnvironmentConfig, type EnvironmentName, type EuEntityAdministrationContextIdentifier, type EuEntityAdministrationPermissionsContextIdentifierType, type EuEntityAdministrationPermissionsSubjectIdentifierType, type EuEntityAdministrationSubjectIdentifier, type EuEntityDetails, type EuEntityPermission, type EuEntityPermissionSubjectDetails, type EuEntityPermissionSubjectDetailsType, type EuEntityPermissionType, type EuEntityPermissionsAuthorIdentifier, type EuEntityPermissionsAuthorIdentifierType, type EuEntityPermissionsQueryPermissionType, type EuEntityPermissionsSubjectIdentifier, type EuEntityPermissionsSubjectIdentifierType, type ExceptionDetails, type ExportAndDownloadOptions, type ExportDownloadResult, type ExportOptions, type ExportResult, type FileMetadata, type ForbiddenProblemDetails, type ForbiddenReasonCode, type FormCode, type FormType, type GrantPermissionsAuthorizationRequest, type GrantPermissionsEntityRequest, type GrantPermissionsEuEntityAdminRequest, type GrantPermissionsEuEntityRepresentativeRequest, type GrantPermissionsEuEntityRequest, type GrantPermissionsIndirectRequest, type GrantPermissionsPersonRequest, type GrantPermissionsSubunitRequest, type HttpMethod, type IdDocument, type IndirectPermissionType, type IndirectPermissionsSubjectIdentifier, type IndirectPermissionsSubjectIdentifierType, type IndirectPermissionsTargetIdentifier, type IndirectPermissionsTargetIdentifierType, InternalId, InvoiceDownloadService, type InvoiceExportPackage, type InvoiceExportPackagePart, type InvoiceExportRequest, type InvoiceExportStatusResponse, type InvoiceMetadata, type InvoiceMetadataAuthorizedSubject, type InvoiceMetadataBuyer, type InvoiceMetadataBuyerIdentifier, type InvoiceMetadataSeller, type InvoiceMetadataThirdSubject, type InvoiceMetadataThirdSubjectIdentifier, type InvoicePermissionType, type InvoiceQueryAmount, type InvoiceQueryBuyerIdentifier, type InvoiceQueryDateRange, type InvoiceQueryDateType, InvoiceQueryFilterBuilder, type InvoiceQueryFilters, type InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, KSeFAuthStatusError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFForbiddenError, KSeFRateLimitError, KSeFSessionExpiredError, KSeFUnauthorizedError, KSeFValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, Nip, NipVatUe, type OnlineSessionContextLimitsOverride, type OnlineSessionEffectiveContextLimits, type OnlineSessionHandle, OnlineSessionService, type OpenBatchSessionRequest, type OpenBatchSessionResponse, type OpenOnlineSessionOptions, type OpenOnlineSessionRequest, type OpenOnlineSessionResponse, type OperationResponse, type OperationStatusInfo, PERMISSION_DESCRIPTION_MAX_LENGTH, PERMISSION_DESCRIPTION_MIN_LENGTH, type PagedAuthorizationsResponse, type PagedPermissionsResponse, type PagedRolesResponse, type PartUploadRequest, PeppolId, type PeppolProvider, PeppolService, type PermissionState, type PermissionSubjectIdentifierType, type PermissionWithDelegate, type PermissionsAttachmentAllowedResponse, type PermissionsEuEntityDetails, type PermissionsOperationStatusResponse, PermissionsService, type PermissionsSubjectEntityByFingerprintDetails, type PermissionsSubjectEntityByIdentifierDetails, type PermissionsSubjectEntityDetails, type PermissionsSubjectPersonByFingerprintDetails, type PermissionsSubjectPersonDetails, type PersonByFingerprintWithIdentifierDetails, type PersonByFingerprintWithoutIdentifierDetails, type PersonByIdentifierDetails, type PersonCreateRequest, type PersonIdentifier, type PersonIdentifierType, type PersonPermission, PersonPermissionGrantBuilder, type PersonPermissionSubjectDetails, type PersonPermissionType, type PersonPermissionsAuthorIdentifier, type PersonPermissionsAuthorIdentifierType, type PersonPermissionsAuthorizedIdentifier, type PersonPermissionsAuthorizedIdentifierType, type PersonPermissionsContextIdentifier, type PersonPermissionsContextIdentifierType, type PersonPermissionsQueryType, type PersonPermissionsTargetIdentifier, type PersonPermissionsTargetIdentifierType, type PersonRemoveRequest, type PersonSubjectByFingerprintDetailsType, type PersonSubjectDetailsType, type PersonSubjectIdentifier, type PersonalPermission, type PersonalPermissionScopeType, type PersonalPermissionsAuthorizedIdentifier, type PersonalPermissionsAuthorizedIdentifierType, type PersonalPermissionsContextIdentifier, type PersonalPermissionsContextIdentifierType, type PersonalPermissionsTargetIdentifier, type PersonalPermissionsTargetIdentifierType, Pesel, type Pkcs12AuthOptions, Pkcs12Loader, type Pkcs12Result, type PollOptions, type PresignedUrlPolicy, type PublicKeyCertificate, type PublicKeyCertificateUsage, type QRCodeContextIdentifierType, type QrCodeOptions, type QrCodeResult, QrCodeService, type QueryAuthorizationsGrantsRequest, type QueryCertificatesRequest, type QueryCertificatesResponse, type QueryEntitiesGrantsRequest, type QueryEntitiesRolesRequest, type QueryEuEntitiesGrantsRequest, type QueryInvoicesMetadataResponse, type QueryKsefTokensOptions, type QueryKsefTokensResponse, type QueryPeppolProvidersResponse, type QueryPersonalGrantsRequest, type QueryPersonsGrantsRequest, type QuerySubordinateEntitiesRolesRequest, type QuerySubunitsGrantsRequest, type QueryTokensResponseItem, REQUIRED_CHALLENGE_LENGTH, type RateLimitConfig, RateLimitPolicy, ReferenceNumber, type ResolvedOptions, RestClient, RestRequest, type RestResponse, type RetrieveCertificatesListItem, type RetrieveCertificatesRequest, type RetrieveCertificatesResponse, type RetryPolicy, type RevokeCertificateRequest, RouteBuilder, Routes, SUBUNIT_NAME_MAX_LENGTH, SUBUNIT_NAME_MIN_LENGTH, type SelfSignedCertificateResult, type SendAndCloseOptions, type SendInvoiceRequest, type SendInvoiceResponse, type SessionInvoiceStatusResponse, type SessionInvoicesResponse, type SessionStatus, type SessionStatusResponse, SessionStatusService, type SessionType, type SessionsFilter, type SessionsQueryResponse, type SessionsQueryResponseItem, type SetRateLimitsRequest, type SetSessionLimitsRequest, type SetSubjectLimitsRequest, Sha256Base64, SignatureService, type SortOrder, type StatusInfo, type SubjectCreateRequest, type SubjectRemoveRequest, type SubjectType, type SubordinateEntityRole, type SubordinateEntityRoleType, type SubordinateRoleSubordinateEntityIdentifier, type SubordinateRoleSubordinateEntityIdentifierType, type Subunit, type SubunitPermission, type SubunitPermissionScope, type SubunitPermissionsAuthorIdentifier, type SubunitPermissionsAuthorIdentifierType, type SubunitPermissionsAuthorizedIdentifier, type SubunitPermissionsContextIdentifier, type SubunitPermissionsContextIdentifierType, type SubunitPermissionsSubjectIdentifier, type SubunitPermissionsSubjectIdentifierType, type SubunitPermissionsSubunitIdentifier, type SubunitPermissionsSubunitIdentifierType, type TestDataAuthenticationContextIdentifier, type TestDataAuthenticationContextIdentifierType, type TestDataAuthorizedIdentifier, type TestDataAuthorizedIdentifierType, type TestDataContextIdentifier, type TestDataContextIdentifierType, type TestDataPermission, type TestDataPermissionType, type TestDataPermissionsGrantRequest, type TestDataPermissionsRevokeRequest, TestDataService, type ThirdSubjectIdentifierType, type TokenAuthOptions, type TokenAuthorIdentifier, type TokenAuthorIdentifierType, type TokenContextIdentifier, type TokenContextIdentifierType, type TokenInfo, TokenService, type TokenStatusResponse, type TransportFn, type UnauthorizedProblemDetails, type UnblockContextAuthenticationRequest, type UpoInfo, type UpoPage, type UpoResponse, type UpoResult, UpoVersion, UpoVersion as UpoVersionType, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, authenticateWithCertificate, authenticateWithPkcs12, authenticateWithToken, calculateBackoff, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, openOnlineSession, openSendAndClose, parseRetryAfter, pollUntil, resolveOptions, sleep, uploadBatch, validatePresignedUrl };
2447
+ export { ActiveSessionsService, type AllowedIps, type AmountType, type ApiErrorResponse, type ApiRateLimitValuesOverride, type ApiRateLimitsOverride, type AttachmentPermissionGrantRequest, type AttachmentPermissionRevokeRequest, type AuthChallengeResponse, type AuthKsefTokenRequest, AuthKsefTokenRequestBuilder, type AuthManager, type AuthResult, AuthService, type AuthSessionInfo, type AuthTokenRequest, AuthTokenRequestBuilder, type AuthTokenRequestXmlOptions, type AuthenticationInitResponse, type AuthenticationKsefToken, type AuthenticationListResponse, type AuthenticationMethod, type AuthenticationMethodInfo, type AuthenticationMethodInfoCategory, type AuthenticationOperationStatusResponse, type AuthenticationTokenRefreshResponse, type AuthenticationTokensResponse, type AuthorizationGrant, AuthorizationPermissionGrantBuilder, type AuthorizationPolicy, BATCH_MAX_PARTS, BATCH_MAX_PART_SIZE, BATCH_MAX_TOTAL_SIZE, Base64String, type BatchFileBuildOptions, type BatchFileBuildResult, BatchFileBuilder, type BatchFileInfo, type BatchFilePartInfo, type BatchPartSendingInfo, type BatchPartStreamSendingInfo, type BatchSessionContextLimitsOverride, type BatchSessionEffectiveContextLimits, type BatchSessionFormCode, BatchSessionService, type BatchStreamBuildResult, type BatchUploadOptions, type BatchUploadResult, type BlockContextAuthenticationRequest, type BuyerIdentifierType, CERTIFICATE_NAME_MAX_LENGTH, CERTIFICATE_NAME_MIN_LENGTH, CertificateApiService, type CertificateAuthOptions, type CertificateEffectiveSubjectLimits, type CertificateEnrollmentDataResponse, type CertificateEnrollmentStatusResponse, CertificateFetcher, CertificateFingerprint, type CertificateLimit, type CertificateLimitsResponse, type CertificateListItem, CertificateName, type CertificateRevocationReason, CertificateService, type CertificateStatus, type CertificateSubjectIdentifier, type CertificateSubjectIdentifierType, type CertificateSubjectLimitsOverride, type CertificateType, type ContextIdentifier, type ContextIdentifierType, type ContinuationPoints, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DefaultAuthManager, ENFORCE_XADES_COMPLIANCE, type EffectiveApiRateLimitValues, type EffectiveApiRateLimits, type EffectiveContextLimits, type EffectiveSubjectLimits, type EncryptionData, type EncryptionInfo, type EnrollCertificateRequest, type EnrollCertificateResponse, type EnrollmentEffectiveSubjectLimits, type EnrollmentSubjectLimitsOverride, type EntityAuthorizationGrant, type EntityAuthorizationPermissionType, type EntityAuthorizationPermissionsSubjectIdentifierType, type EntityAuthorizationSubjectIdentifier, type EntityAuthorizationsAuthorIdentifier, type EntityAuthorizationsAuthorIdentifierType, type EntityAuthorizationsAuthorizedEntityIdentifier, type EntityAuthorizationsAuthorizedEntityIdentifierType, type EntityAuthorizationsAuthorizingEntityIdentifier, type EntityAuthorizationsAuthorizingEntityIdentifierType, type EntityAuthorizationsQueryType, type EntityByFingerprintDetails, type EntityDetails, type EntityPermission, EntityPermissionGrantBuilder, type EntityPermissionItem, type EntityPermissionItemType, type EntityPermissionsContextIdentifier, type EntityPermissionsContextIdentifierType, type EntityRole, type EntityRoleType, type EntityRolesParentEntityIdentifier, type EntityRolesParentEntityIdentifierType, type EntitySubjectByFingerprintDetailsType, type EntitySubjectByIdentifierDetailsType, type EntitySubjectDetailsType, type EntitySubjectIdentifier, Environment, type EnvironmentConfig, type EnvironmentName, type EuEntityAdministrationContextIdentifier, type EuEntityAdministrationPermissionsContextIdentifierType, type EuEntityAdministrationPermissionsSubjectIdentifierType, type EuEntityAdministrationSubjectIdentifier, type EuEntityDetails, type EuEntityPermission, type EuEntityPermissionSubjectDetails, type EuEntityPermissionSubjectDetailsType, type EuEntityPermissionType, type EuEntityPermissionsAuthorIdentifier, type EuEntityPermissionsAuthorIdentifierType, type EuEntityPermissionsQueryPermissionType, type EuEntityPermissionsSubjectIdentifier, type EuEntityPermissionsSubjectIdentifierType, type ExceptionDetails, type ExportAndDownloadOptions, type ExportDownloadResult, type ExportExtractedResult, type ExportOptions, type ExportResult, type ExternalSignatureAuthOptions, FORM_CODES, FORM_CODE_KEYS, FileHwmStore, type FileMetadata, type ForbiddenProblemDetails, type ForbiddenReasonCode, type FormCode, type FormType, type GrantPermissionsAuthorizationRequest, type GrantPermissionsEntityRequest, type GrantPermissionsEuEntityAdminRequest, type GrantPermissionsEuEntityRepresentativeRequest, type GrantPermissionsEuEntityRequest, type GrantPermissionsIndirectRequest, type GrantPermissionsPersonRequest, type GrantPermissionsSubunitRequest, type HttpMethod, type HwmStore, INVOICE_TYPES_BY_SYSTEM_CODE, type IdDocument, InMemoryHwmStore, type IncrementalExportOptions, type IncrementalExportResult, type IndirectPermissionType, type IndirectPermissionsSubjectIdentifier, type IndirectPermissionsSubjectIdentifierType, type IndirectPermissionsTargetIdentifier, type IndirectPermissionsTargetIdentifierType, InternalId, InvoiceDownloadService, type InvoiceExportPackage, type InvoiceExportPackagePart, type InvoiceExportRequest, type InvoiceExportStatusResponse, type InvoiceMetadata, type InvoiceMetadataAuthorizedSubject, type InvoiceMetadataBuyer, type InvoiceMetadataBuyerIdentifier, type InvoiceMetadataSeller, type InvoiceMetadataThirdSubject, type InvoiceMetadataThirdSubjectIdentifier, type InvoicePermissionType, type InvoiceQueryAmount, type InvoiceQueryBuyerIdentifier, type InvoiceQueryDateRange, type InvoiceQueryDateType, InvoiceQueryFilterBuilder, type InvoiceQueryFilters, type InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, KSeFAuthStatusError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFForbiddenError, KSeFRateLimitError, KSeFSessionExpiredError, KSeFUnauthorizedError, KSeFValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, Nip, NipVatUe, type OnlineSessionContextLimitsOverride, type OnlineSessionEffectiveContextLimits, type OnlineSessionFormCode, type OnlineSessionHandle, OnlineSessionService, type OpenBatchSessionRequest, type OpenBatchSessionResponse, type OpenOnlineSessionOptions, type OpenOnlineSessionRequest, type OpenOnlineSessionResponse, type OperationResponse, type OperationStatusInfo, PERMISSION_DESCRIPTION_MAX_LENGTH, PERMISSION_DESCRIPTION_MIN_LENGTH, type PagedAuthorizationsResponse, type PagedPermissionsResponse, type PagedRolesResponse, type ParsedBatchUploadResult, type ParsedUpoInfo, type PartUploadRequest, PeppolId, type PeppolProvider, PeppolService, type PermissionState, type PermissionSubjectIdentifierType, type PermissionWithDelegate, type PermissionsAttachmentAllowedResponse, type PermissionsEuEntityDetails, type PermissionsOperationStatusResponse, PermissionsService, type PermissionsSubjectEntityByFingerprintDetails, type PermissionsSubjectEntityByIdentifierDetails, type PermissionsSubjectEntityDetails, type PermissionsSubjectPersonByFingerprintDetails, type PermissionsSubjectPersonDetails, type PersonByFingerprintWithIdentifierDetails, type PersonByFingerprintWithoutIdentifierDetails, type PersonByIdentifierDetails, type PersonCreateRequest, type PersonIdentifier, type PersonIdentifierType, type PersonPermission, PersonPermissionGrantBuilder, type PersonPermissionSubjectDetails, type PersonPermissionType, type PersonPermissionsAuthorIdentifier, type PersonPermissionsAuthorIdentifierType, type PersonPermissionsAuthorizedIdentifier, type PersonPermissionsAuthorizedIdentifierType, type PersonPermissionsContextIdentifier, type PersonPermissionsContextIdentifierType, type PersonPermissionsQueryType, type PersonPermissionsTargetIdentifier, type PersonPermissionsTargetIdentifierType, type PersonRemoveRequest, type PersonSubjectByFingerprintDetailsType, type PersonSubjectDetailsType, type PersonSubjectIdentifier, type PersonalPermission, type PersonalPermissionScopeType, type PersonalPermissionsAuthorizedIdentifier, type PersonalPermissionsAuthorizedIdentifierType, type PersonalPermissionsContextIdentifier, type PersonalPermissionsContextIdentifierType, type PersonalPermissionsTargetIdentifier, type PersonalPermissionsTargetIdentifierType, Pesel, type Pkcs12AuthOptions, Pkcs12Loader, type Pkcs12Result, type PollOptions, type PresignedUrlPolicy, type PublicKeyCertificate, type PublicKeyCertificateUsage, type QRCodeContextIdentifierType, type QrCodeOptions, type QrCodeResult, QrCodeService, type QueryAuthorizationsGrantsRequest, type QueryCertificatesRequest, type QueryCertificatesResponse, type QueryEntitiesGrantsRequest, type QueryEntitiesRolesRequest, type QueryEuEntitiesGrantsRequest, type QueryInvoicesMetadataResponse, type QueryKsefTokensOptions, type QueryKsefTokensResponse, type QueryPeppolProvidersResponse, type QueryPersonalGrantsRequest, type QueryPersonsGrantsRequest, type QuerySubordinateEntitiesRolesRequest, type QuerySubunitsGrantsRequest, type QueryTokensResponseItem, REQUIRED_CHALLENGE_LENGTH, type RateLimitConfig, RateLimitPolicy, ReferenceNumber, type ResolvedOptions, RestClient, RestRequest, type RestResponse, type RetrieveCertificatesListItem, type RetrieveCertificatesRequest, type RetrieveCertificatesResponse, type RetryPolicy, type RevokeCertificateRequest, RouteBuilder, Routes, SUBUNIT_NAME_MAX_LENGTH, SUBUNIT_NAME_MIN_LENGTH, type SelfSignedCertificateResult, type SendAndCloseOptions, type SendInvoiceRequest, type SendInvoiceResponse, type SessionInvoiceStatusResponse, type SessionInvoicesResponse, type SessionStatus, type SessionStatusResponse, SessionStatusService, type SessionType, type SessionsFilter, type SessionsQueryResponse, type SessionsQueryResponseItem, type SetRateLimitsRequest, type SetSessionLimitsRequest, type SetSubjectLimitsRequest, Sha256Base64, SignatureService, type SortOrder, type StatusInfo, type SubjectCreateRequest, type SubjectRemoveRequest, type SubjectType, type SubordinateEntityRole, type SubordinateEntityRoleType, type SubordinateRoleSubordinateEntityIdentifier, type SubordinateRoleSubordinateEntityIdentifierType, type Subunit, type SubunitPermission, type SubunitPermissionScope, type SubunitPermissionsAuthorIdentifier, type SubunitPermissionsAuthorIdentifierType, type SubunitPermissionsAuthorizedIdentifier, type SubunitPermissionsContextIdentifier, type SubunitPermissionsContextIdentifierType, type SubunitPermissionsSubjectIdentifier, type SubunitPermissionsSubjectIdentifierType, type SubunitPermissionsSubunitIdentifier, type SubunitPermissionsSubunitIdentifierType, SystemCode, type TestDataAuthenticationContextIdentifier, type TestDataAuthenticationContextIdentifierType, type TestDataAuthorizedIdentifier, type TestDataAuthorizedIdentifierType, type TestDataContextIdentifier, type TestDataContextIdentifierType, type TestDataPermission, type TestDataPermissionType, type TestDataPermissionsGrantRequest, type TestDataPermissionsRevokeRequest, TestDataService, type ThirdSubjectIdentifierType, type TokenAuthOptions, type TokenAuthorIdentifier, type TokenAuthorIdentifierType, type TokenContextIdentifier, type TokenContextIdentifierType, type TokenInfo, TokenService, type TokenStatusResponse, type TransportFn, type UnauthorizedProblemDetails, type UnblockContextAuthenticationRequest, type UnzipOptions, type UpoAuthProof, type UpoContextId, type UpoDokument, type UpoInfo, type UpoOpisPotwierdzenia, type UpoPage, type UpoPotwierdzenie, type UpoResponse, type UpoResult, type UpoUwierzytelnienie, UpoVersion, UpoVersion as UpoVersionType, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, type ZipEntryInput, authenticateWithCertificate, authenticateWithExternalSignature, authenticateWithPkcs12, authenticateWithToken, buildUnsignedAuthTokenRequestXml, calculateBackoff, createZip, deduplicateByKsefNumber, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, getEffectiveStartDate, getFormCode, incrementalExportAndDownload, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, openOnlineSession, openSendAndClose, parseFormCode, parseRetryAfter, parseUpoXml, pollUntil, resolveOptions, sleep, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validateFormCodeForSession, validatePresignedUrl };