ksef-client-ts 0.9.0 → 0.9.1

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.cts CHANGED
@@ -320,6 +320,18 @@ declare class KSeFSessionExpiredError extends KSeFError {
320
320
  constructor(message?: string);
321
321
  }
322
322
 
323
+ /**
324
+ * Thrown when the metadata-query paging helper cannot make forward progress
325
+ * across an `isTruncated` boundary — e.g. a capped window whose entire result
326
+ * set shares the same boundary date, so re-narrowing the date range never
327
+ * advances. Raised instead of looping forever.
328
+ */
329
+ declare class KSeFMetadataPaginationError extends KSeFError {
330
+ /** The boundary date value that failed to advance. */
331
+ readonly boundaryValue: string;
332
+ constructor(message: string, boundaryValue: string);
333
+ }
334
+
323
335
  declare class KSeFBatchTimeoutError extends KSeFApiError {
324
336
  readonly errorCode: 21208;
325
337
  constructor(message: string, statusCode: number, errorResponse?: ApiErrorResponse);
@@ -605,6 +617,7 @@ declare const KsefNumberV36: RegExp;
605
617
  declare const CertificateName: RegExp;
606
618
  declare const Pesel: RegExp;
607
619
  declare const CertificateFingerprint: RegExp;
620
+ declare const CertificateSerialNumber: RegExp;
608
621
  declare const Base64String: RegExp;
609
622
  declare const Ip4Address: RegExp;
610
623
  declare const Ip4Range: RegExp;
@@ -622,6 +635,7 @@ declare function isValidKsefNumberV36(value: string): boolean;
622
635
  declare function isValidPesel(value: string): boolean;
623
636
  declare function isValidCertificateName(value: string): boolean;
624
637
  declare function isValidCertificateFingerprint(value: string): boolean;
638
+ declare function isValidCertificateSerialNumber(value: string): boolean;
625
639
  declare function isValidBase64(value: string): boolean;
626
640
  declare function isValidIp4Address(value: string): boolean;
627
641
  declare function isValidSha256Base64(value: string): boolean;
@@ -3353,6 +3367,45 @@ interface ExternalSignatureAuthOptions {
3353
3367
  declare function authenticateWithExternalSignature(client: KSeFClient, options: ExternalSignatureAuthOptions): Promise<AuthResult>;
3354
3368
  declare function authenticateWithPkcs12(client: KSeFClient, options: Pkcs12AuthOptions): Promise<AuthResult>;
3355
3369
 
3370
+ /** Minimal surface of {@link KSeFClient} the paging helper depends on. */
3371
+ type MetadataQueryClient = Pick<KSeFClient, 'invoices'>;
3372
+ interface QueryAllMetadataOptions {
3373
+ /** Sort direction. Defaults to `'Asc'`. Determines which date boundary is re-narrowed on truncation. */
3374
+ sortOrder?: SortOrder;
3375
+ /** Page size per request. Defaults to 100. */
3376
+ pageSize?: number;
3377
+ /**
3378
+ * Safety cap on the number of `isTruncated` boundaries crossed. Defaults to 1000.
3379
+ * Exceeding it throws {@link KSeFMetadataPaginationError}.
3380
+ */
3381
+ maxBoundaryCrossings?: number;
3382
+ }
3383
+ /**
3384
+ * Async iterator over `POST /invoices/query/metadata` that reads a match of any
3385
+ * size, transparently crossing the server's ~10k truncation cap.
3386
+ *
3387
+ * Two layers of paging are handled:
3388
+ * 1. **Normal paging** — advances `pageOffset` while `hasMore` is true.
3389
+ * 2. **Truncation boundary** — when `isTruncated` is true the window was capped;
3390
+ * the date range is re-narrowed to the last invoice's boundary (sort `Asc`
3391
+ * pushes `from` forward, `Desc` pulls `to` backward), offset resets to 0,
3392
+ * and paging resumes.
3393
+ *
3394
+ * Invoices are de-duplicated by KSeF number across boundaries (the boundary
3395
+ * invoice appears in both windows). If a re-narrowed window makes no progress
3396
+ * (its boundary equals the previous one), {@link KSeFMetadataPaginationError}
3397
+ * is thrown rather than looping forever.
3398
+ *
3399
+ * The caller's `filters` object is not mutated.
3400
+ */
3401
+ declare function queryAllInvoiceMetadata(client: MetadataQueryClient, filters: InvoiceQueryFilters, options?: QueryAllMetadataOptions): AsyncGenerator<InvoiceMetadata, void, undefined>;
3402
+ /**
3403
+ * Convenience wrapper that drains {@link queryAllInvoiceMetadata} into a single
3404
+ * de-duplicated array. Use the generator directly for large result sets to keep
3405
+ * memory bounded.
3406
+ */
3407
+ declare function collectAllInvoiceMetadata(client: MetadataQueryClient, filters: InvoiceQueryFilters, options?: QueryAllMetadataOptions): Promise<InvoiceMetadata[]>;
3408
+
3356
3409
  /**
3357
3410
  * Offline invoice deadline calculation.
3358
3411
  *
@@ -3435,4 +3488,4 @@ declare class FileOfflineInvoiceStorage implements OfflineInvoiceStorage {
3435
3488
  delete(id: string): Promise<void>;
3436
3489
  }
3437
3490
 
3438
- 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, type BadRequestErrorDetail, type BadRequestProblemDetails, Base64String, type BatchFileBuildOptions, type BatchFileBuildResult, BatchFileBuilder, type BatchFileInfo, type BatchFilePartInfo, type BatchPartSendingInfo, type BatchPartStreamSendingInfo, type BatchSessionContextLimitsOverride, type BatchSessionEffectiveContextLimits, type BatchSessionFormCode, BatchSessionService, type BatchSessionState, type BatchStreamBuildResult, type BatchUploadOptions, type BatchUploadResult, type BatchValidationResult, type BlockContextAuthenticationRequest, type BuildFakturaOptions, type BuildPefOptions, 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 CircuitBreakerConfig, CircuitBreakerPolicy, type CompressionType, type ContextIdentifier, type ContextIdentifierType, type ContinuationPoints, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DEFAULT_FORM_CODE, DISCOURAGED_UNICODE_RANGES, DefaultAuthManager, type ECDigestCurve, ENFORCE_XADES_COMPLIANCE, ETD_NAMESPACE, 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, FAKTURA_NAMESPACE, FA_XSD_PATHS, FORM_CODES, FORM_CODE_KEYS, type FakturaInput, type FakturaSchema, FileHwmStore, type FileMetadata, FileOfflineInvoiceStorage, type ForbiddenProblemDetails, type ForbiddenReasonCode, type ForbiddenSecurityInfo, type FormCode, type FormType, type GoneProblemDetails, 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, InMemoryOfflineInvoiceStorage, 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 InvoiceFields, 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 InvoiceResult, type InvoiceSchema, type InvoiceSchemaId, type InvoiceSerializerInput, type InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoiceValidationError, type InvoiceValidationErrorCode, type InvoiceValidationResult, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, type KSeFApiProblem, KSeFAuthStatusError, KSeFBadRequestError, KSeFBatchTimeoutError, KSeFCircuitOpenError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFErrorCode, KSeFForbiddenError, KSeFGoneError, KSeFRateLimitError, KSeFSessionExpiredError, type KSeFTokenContext, KSeFUnauthorizedError, KSeFUnknownPublicKeyError, KSeFValidationError, KSeFXsdValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, type LoginResult, type MaintenanceWindow, Nip, NipVatUe, ORDER_MAP, type OfflineBatchResult, type OfflineCertificate, type OfflineInvoiceFilter, type OfflineInvoiceInputData, type OfflineInvoiceMetadata, type OfflineInvoiceOptions, type OfflineInvoiceStatus, type OfflineInvoiceStorage, type OfflineInvoiceUpdates, OfflineInvoiceWorkflow, type OfflineMode, type OfflineReason, type OfflineSubmissionResult, type OnlineSessionContextLimitsOverride, type OnlineSessionEffectiveContextLimits, type OnlineSessionFormCode, type OnlineSessionHandle, OnlineSessionService, type OnlineSessionState, type OpenBatchSessionRequest, type OpenBatchSessionResponse, type OpenOnlineSessionOptions, type OpenOnlineSessionRequest, type OpenOnlineSessionResponse, type OperationResponse, type OperationStatusInfo, PEF_NAMESPACE, PEF_XSD_PATHS, PERMISSION_DESCRIPTION_MAX_LENGTH, PERMISSION_DESCRIPTION_MIN_LENGTH, type PagedAuthorizationsResponse, type PagedPermissionsResponse, type PagedRolesResponse, type ParsedBatchUploadResult, type ParsedUpoInfo, type PartUploadRequest, type PefSchema, type PefUblCreditNoteInput, type PefUblDocumentInput, type PefUblInvoiceInput, 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 ProblemFields, 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, SchemaRegistry, type SelfSignedCertificateResult, type SendAndCloseOptions, type SendInvoiceRequest, type SendInvoiceResponse, type SerializeInvoiceOptions, 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 SubmitOfflineInvoicesOptions, 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 TechnicalCorrectionOptions, 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 TooManyRequestsProblemDetails, 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 ValidateAgainstXsdResult, type ValidateOptions, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, type XmlConversionResult, type XmlDocument, type XmlObject, type XmlValue, type ZipEntryInput, addBusinessDays, assertNever, authenticateWithCertificate, authenticateWithExternalSignature, authenticateWithPkcs12, authenticateWithToken, batchValidationDetails, buildFakturaXml, buildPefXml, buildRawXmlString, buildUnsignedAuthTokenRequestXml, buildXml, buildXmlFromObject, calculateBackoff, calculateOfflineDeadline, comparePKey, createTarGz, createZip, decodeJwtPayload, deduplicateByKsefNumber, defaultCircuitBreakerPolicy, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, extendDeadlineForMaintenance, extractInvoiceFields, extractTarGz, getDefaultReason, getEffectiveStartDate, getFormCode, getPolishHolidays, getTimeUntilDeadline, incrementalExportAndDownload, isExpired, isFakturaInput, isFormCodeShape, isMissingLibxmljsError, isPefUblDocumentInput, isPolishHoliday, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, libxmljsAvailable, nextBusinessDay, openOnlineSession, openSendAndClose, orderXmlObject, parseFormCode, parseKSeFTokenContext, parseRetryAfter, parseUpoXml, parseXml, pollUntil, resolveOptions, resolveXsdFor, resumeOnlineSession, runWithConcurrency, serializeInvoiceXml, sha256Base64, sleep, stripBom, toKodFormularza, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validate, validateAgainstXsd, validateBatch, validateBusinessRules, validateCharValidity, validateFormCodeForSession, validatePresignedUrl, validateSchema, validateWellFormedness, verifyHash, xmlToObject };
3491
+ 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, type BadRequestErrorDetail, type BadRequestProblemDetails, Base64String, type BatchFileBuildOptions, type BatchFileBuildResult, BatchFileBuilder, type BatchFileInfo, type BatchFilePartInfo, type BatchPartSendingInfo, type BatchPartStreamSendingInfo, type BatchSessionContextLimitsOverride, type BatchSessionEffectiveContextLimits, type BatchSessionFormCode, BatchSessionService, type BatchSessionState, type BatchStreamBuildResult, type BatchUploadOptions, type BatchUploadResult, type BatchValidationResult, type BlockContextAuthenticationRequest, type BuildFakturaOptions, type BuildPefOptions, 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, CertificateSerialNumber, CertificateService, type CertificateStatus, type CertificateSubjectIdentifier, type CertificateSubjectIdentifierType, type CertificateSubjectLimitsOverride, type CertificateType, type CircuitBreakerConfig, CircuitBreakerPolicy, type CompressionType, type ContextIdentifier, type ContextIdentifierType, type ContinuationPoints, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DEFAULT_FORM_CODE, DISCOURAGED_UNICODE_RANGES, DefaultAuthManager, type ECDigestCurve, ENFORCE_XADES_COMPLIANCE, ETD_NAMESPACE, 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, FAKTURA_NAMESPACE, FA_XSD_PATHS, FORM_CODES, FORM_CODE_KEYS, type FakturaInput, type FakturaSchema, FileHwmStore, type FileMetadata, FileOfflineInvoiceStorage, type ForbiddenProblemDetails, type ForbiddenReasonCode, type ForbiddenSecurityInfo, type FormCode, type FormType, type GoneProblemDetails, 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, InMemoryOfflineInvoiceStorage, 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 InvoiceFields, 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 InvoiceResult, type InvoiceSchema, type InvoiceSchemaId, type InvoiceSerializerInput, type InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoiceValidationError, type InvoiceValidationErrorCode, type InvoiceValidationResult, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, type KSeFApiProblem, KSeFAuthStatusError, KSeFBadRequestError, KSeFBatchTimeoutError, KSeFCircuitOpenError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFErrorCode, KSeFForbiddenError, KSeFGoneError, KSeFMetadataPaginationError, KSeFRateLimitError, KSeFSessionExpiredError, type KSeFTokenContext, KSeFUnauthorizedError, KSeFUnknownPublicKeyError, KSeFValidationError, KSeFXsdValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, type LoginResult, type MaintenanceWindow, type MetadataQueryClient, Nip, NipVatUe, ORDER_MAP, type OfflineBatchResult, type OfflineCertificate, type OfflineInvoiceFilter, type OfflineInvoiceInputData, type OfflineInvoiceMetadata, type OfflineInvoiceOptions, type OfflineInvoiceStatus, type OfflineInvoiceStorage, type OfflineInvoiceUpdates, OfflineInvoiceWorkflow, type OfflineMode, type OfflineReason, type OfflineSubmissionResult, type OnlineSessionContextLimitsOverride, type OnlineSessionEffectiveContextLimits, type OnlineSessionFormCode, type OnlineSessionHandle, OnlineSessionService, type OnlineSessionState, type OpenBatchSessionRequest, type OpenBatchSessionResponse, type OpenOnlineSessionOptions, type OpenOnlineSessionRequest, type OpenOnlineSessionResponse, type OperationResponse, type OperationStatusInfo, PEF_NAMESPACE, PEF_XSD_PATHS, PERMISSION_DESCRIPTION_MAX_LENGTH, PERMISSION_DESCRIPTION_MIN_LENGTH, type PagedAuthorizationsResponse, type PagedPermissionsResponse, type PagedRolesResponse, type ParsedBatchUploadResult, type ParsedUpoInfo, type PartUploadRequest, type PefSchema, type PefUblCreditNoteInput, type PefUblDocumentInput, type PefUblInvoiceInput, 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 ProblemFields, type PublicKeyCertificate, type PublicKeyCertificateUsage, type QRCodeContextIdentifierType, type QrCodeOptions, type QrCodeResult, QrCodeService, type QueryAllMetadataOptions, 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, SchemaRegistry, type SelfSignedCertificateResult, type SendAndCloseOptions, type SendInvoiceRequest, type SendInvoiceResponse, type SerializeInvoiceOptions, 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 SubmitOfflineInvoicesOptions, 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 TechnicalCorrectionOptions, 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 TooManyRequestsProblemDetails, 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 ValidateAgainstXsdResult, type ValidateOptions, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, type XmlConversionResult, type XmlDocument, type XmlObject, type XmlValue, type ZipEntryInput, addBusinessDays, assertNever, authenticateWithCertificate, authenticateWithExternalSignature, authenticateWithPkcs12, authenticateWithToken, batchValidationDetails, buildFakturaXml, buildPefXml, buildRawXmlString, buildUnsignedAuthTokenRequestXml, buildXml, buildXmlFromObject, calculateBackoff, calculateOfflineDeadline, collectAllInvoiceMetadata, comparePKey, createTarGz, createZip, decodeJwtPayload, deduplicateByKsefNumber, defaultCircuitBreakerPolicy, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, extendDeadlineForMaintenance, extractInvoiceFields, extractTarGz, getDefaultReason, getEffectiveStartDate, getFormCode, getPolishHolidays, getTimeUntilDeadline, incrementalExportAndDownload, isExpired, isFakturaInput, isFormCodeShape, isMissingLibxmljsError, isPefUblDocumentInput, isPolishHoliday, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidCertificateSerialNumber, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, libxmljsAvailable, nextBusinessDay, openOnlineSession, openSendAndClose, orderXmlObject, parseFormCode, parseKSeFTokenContext, parseRetryAfter, parseUpoXml, parseXml, pollUntil, queryAllInvoiceMetadata, resolveOptions, resolveXsdFor, resumeOnlineSession, runWithConcurrency, serializeInvoiceXml, sha256Base64, sleep, stripBom, toKodFormularza, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validate, validateAgainstXsd, validateBatch, validateBusinessRules, validateCharValidity, validateFormCodeForSession, validatePresignedUrl, validateSchema, validateWellFormedness, verifyHash, xmlToObject };
package/dist/index.d.ts CHANGED
@@ -320,6 +320,18 @@ declare class KSeFSessionExpiredError extends KSeFError {
320
320
  constructor(message?: string);
321
321
  }
322
322
 
323
+ /**
324
+ * Thrown when the metadata-query paging helper cannot make forward progress
325
+ * across an `isTruncated` boundary — e.g. a capped window whose entire result
326
+ * set shares the same boundary date, so re-narrowing the date range never
327
+ * advances. Raised instead of looping forever.
328
+ */
329
+ declare class KSeFMetadataPaginationError extends KSeFError {
330
+ /** The boundary date value that failed to advance. */
331
+ readonly boundaryValue: string;
332
+ constructor(message: string, boundaryValue: string);
333
+ }
334
+
323
335
  declare class KSeFBatchTimeoutError extends KSeFApiError {
324
336
  readonly errorCode: 21208;
325
337
  constructor(message: string, statusCode: number, errorResponse?: ApiErrorResponse);
@@ -605,6 +617,7 @@ declare const KsefNumberV36: RegExp;
605
617
  declare const CertificateName: RegExp;
606
618
  declare const Pesel: RegExp;
607
619
  declare const CertificateFingerprint: RegExp;
620
+ declare const CertificateSerialNumber: RegExp;
608
621
  declare const Base64String: RegExp;
609
622
  declare const Ip4Address: RegExp;
610
623
  declare const Ip4Range: RegExp;
@@ -622,6 +635,7 @@ declare function isValidKsefNumberV36(value: string): boolean;
622
635
  declare function isValidPesel(value: string): boolean;
623
636
  declare function isValidCertificateName(value: string): boolean;
624
637
  declare function isValidCertificateFingerprint(value: string): boolean;
638
+ declare function isValidCertificateSerialNumber(value: string): boolean;
625
639
  declare function isValidBase64(value: string): boolean;
626
640
  declare function isValidIp4Address(value: string): boolean;
627
641
  declare function isValidSha256Base64(value: string): boolean;
@@ -3353,6 +3367,45 @@ interface ExternalSignatureAuthOptions {
3353
3367
  declare function authenticateWithExternalSignature(client: KSeFClient, options: ExternalSignatureAuthOptions): Promise<AuthResult>;
3354
3368
  declare function authenticateWithPkcs12(client: KSeFClient, options: Pkcs12AuthOptions): Promise<AuthResult>;
3355
3369
 
3370
+ /** Minimal surface of {@link KSeFClient} the paging helper depends on. */
3371
+ type MetadataQueryClient = Pick<KSeFClient, 'invoices'>;
3372
+ interface QueryAllMetadataOptions {
3373
+ /** Sort direction. Defaults to `'Asc'`. Determines which date boundary is re-narrowed on truncation. */
3374
+ sortOrder?: SortOrder;
3375
+ /** Page size per request. Defaults to 100. */
3376
+ pageSize?: number;
3377
+ /**
3378
+ * Safety cap on the number of `isTruncated` boundaries crossed. Defaults to 1000.
3379
+ * Exceeding it throws {@link KSeFMetadataPaginationError}.
3380
+ */
3381
+ maxBoundaryCrossings?: number;
3382
+ }
3383
+ /**
3384
+ * Async iterator over `POST /invoices/query/metadata` that reads a match of any
3385
+ * size, transparently crossing the server's ~10k truncation cap.
3386
+ *
3387
+ * Two layers of paging are handled:
3388
+ * 1. **Normal paging** — advances `pageOffset` while `hasMore` is true.
3389
+ * 2. **Truncation boundary** — when `isTruncated` is true the window was capped;
3390
+ * the date range is re-narrowed to the last invoice's boundary (sort `Asc`
3391
+ * pushes `from` forward, `Desc` pulls `to` backward), offset resets to 0,
3392
+ * and paging resumes.
3393
+ *
3394
+ * Invoices are de-duplicated by KSeF number across boundaries (the boundary
3395
+ * invoice appears in both windows). If a re-narrowed window makes no progress
3396
+ * (its boundary equals the previous one), {@link KSeFMetadataPaginationError}
3397
+ * is thrown rather than looping forever.
3398
+ *
3399
+ * The caller's `filters` object is not mutated.
3400
+ */
3401
+ declare function queryAllInvoiceMetadata(client: MetadataQueryClient, filters: InvoiceQueryFilters, options?: QueryAllMetadataOptions): AsyncGenerator<InvoiceMetadata, void, undefined>;
3402
+ /**
3403
+ * Convenience wrapper that drains {@link queryAllInvoiceMetadata} into a single
3404
+ * de-duplicated array. Use the generator directly for large result sets to keep
3405
+ * memory bounded.
3406
+ */
3407
+ declare function collectAllInvoiceMetadata(client: MetadataQueryClient, filters: InvoiceQueryFilters, options?: QueryAllMetadataOptions): Promise<InvoiceMetadata[]>;
3408
+
3356
3409
  /**
3357
3410
  * Offline invoice deadline calculation.
3358
3411
  *
@@ -3435,4 +3488,4 @@ declare class FileOfflineInvoiceStorage implements OfflineInvoiceStorage {
3435
3488
  delete(id: string): Promise<void>;
3436
3489
  }
3437
3490
 
3438
- 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, type BadRequestErrorDetail, type BadRequestProblemDetails, Base64String, type BatchFileBuildOptions, type BatchFileBuildResult, BatchFileBuilder, type BatchFileInfo, type BatchFilePartInfo, type BatchPartSendingInfo, type BatchPartStreamSendingInfo, type BatchSessionContextLimitsOverride, type BatchSessionEffectiveContextLimits, type BatchSessionFormCode, BatchSessionService, type BatchSessionState, type BatchStreamBuildResult, type BatchUploadOptions, type BatchUploadResult, type BatchValidationResult, type BlockContextAuthenticationRequest, type BuildFakturaOptions, type BuildPefOptions, 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 CircuitBreakerConfig, CircuitBreakerPolicy, type CompressionType, type ContextIdentifier, type ContextIdentifierType, type ContinuationPoints, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DEFAULT_FORM_CODE, DISCOURAGED_UNICODE_RANGES, DefaultAuthManager, type ECDigestCurve, ENFORCE_XADES_COMPLIANCE, ETD_NAMESPACE, 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, FAKTURA_NAMESPACE, FA_XSD_PATHS, FORM_CODES, FORM_CODE_KEYS, type FakturaInput, type FakturaSchema, FileHwmStore, type FileMetadata, FileOfflineInvoiceStorage, type ForbiddenProblemDetails, type ForbiddenReasonCode, type ForbiddenSecurityInfo, type FormCode, type FormType, type GoneProblemDetails, 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, InMemoryOfflineInvoiceStorage, 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 InvoiceFields, 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 InvoiceResult, type InvoiceSchema, type InvoiceSchemaId, type InvoiceSerializerInput, type InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoiceValidationError, type InvoiceValidationErrorCode, type InvoiceValidationResult, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, type KSeFApiProblem, KSeFAuthStatusError, KSeFBadRequestError, KSeFBatchTimeoutError, KSeFCircuitOpenError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFErrorCode, KSeFForbiddenError, KSeFGoneError, KSeFRateLimitError, KSeFSessionExpiredError, type KSeFTokenContext, KSeFUnauthorizedError, KSeFUnknownPublicKeyError, KSeFValidationError, KSeFXsdValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, type LoginResult, type MaintenanceWindow, Nip, NipVatUe, ORDER_MAP, type OfflineBatchResult, type OfflineCertificate, type OfflineInvoiceFilter, type OfflineInvoiceInputData, type OfflineInvoiceMetadata, type OfflineInvoiceOptions, type OfflineInvoiceStatus, type OfflineInvoiceStorage, type OfflineInvoiceUpdates, OfflineInvoiceWorkflow, type OfflineMode, type OfflineReason, type OfflineSubmissionResult, type OnlineSessionContextLimitsOverride, type OnlineSessionEffectiveContextLimits, type OnlineSessionFormCode, type OnlineSessionHandle, OnlineSessionService, type OnlineSessionState, type OpenBatchSessionRequest, type OpenBatchSessionResponse, type OpenOnlineSessionOptions, type OpenOnlineSessionRequest, type OpenOnlineSessionResponse, type OperationResponse, type OperationStatusInfo, PEF_NAMESPACE, PEF_XSD_PATHS, PERMISSION_DESCRIPTION_MAX_LENGTH, PERMISSION_DESCRIPTION_MIN_LENGTH, type PagedAuthorizationsResponse, type PagedPermissionsResponse, type PagedRolesResponse, type ParsedBatchUploadResult, type ParsedUpoInfo, type PartUploadRequest, type PefSchema, type PefUblCreditNoteInput, type PefUblDocumentInput, type PefUblInvoiceInput, 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 ProblemFields, 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, SchemaRegistry, type SelfSignedCertificateResult, type SendAndCloseOptions, type SendInvoiceRequest, type SendInvoiceResponse, type SerializeInvoiceOptions, 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 SubmitOfflineInvoicesOptions, 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 TechnicalCorrectionOptions, 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 TooManyRequestsProblemDetails, 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 ValidateAgainstXsdResult, type ValidateOptions, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, type XmlConversionResult, type XmlDocument, type XmlObject, type XmlValue, type ZipEntryInput, addBusinessDays, assertNever, authenticateWithCertificate, authenticateWithExternalSignature, authenticateWithPkcs12, authenticateWithToken, batchValidationDetails, buildFakturaXml, buildPefXml, buildRawXmlString, buildUnsignedAuthTokenRequestXml, buildXml, buildXmlFromObject, calculateBackoff, calculateOfflineDeadline, comparePKey, createTarGz, createZip, decodeJwtPayload, deduplicateByKsefNumber, defaultCircuitBreakerPolicy, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, extendDeadlineForMaintenance, extractInvoiceFields, extractTarGz, getDefaultReason, getEffectiveStartDate, getFormCode, getPolishHolidays, getTimeUntilDeadline, incrementalExportAndDownload, isExpired, isFakturaInput, isFormCodeShape, isMissingLibxmljsError, isPefUblDocumentInput, isPolishHoliday, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, libxmljsAvailable, nextBusinessDay, openOnlineSession, openSendAndClose, orderXmlObject, parseFormCode, parseKSeFTokenContext, parseRetryAfter, parseUpoXml, parseXml, pollUntil, resolveOptions, resolveXsdFor, resumeOnlineSession, runWithConcurrency, serializeInvoiceXml, sha256Base64, sleep, stripBom, toKodFormularza, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validate, validateAgainstXsd, validateBatch, validateBusinessRules, validateCharValidity, validateFormCodeForSession, validatePresignedUrl, validateSchema, validateWellFormedness, verifyHash, xmlToObject };
3491
+ 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, type BadRequestErrorDetail, type BadRequestProblemDetails, Base64String, type BatchFileBuildOptions, type BatchFileBuildResult, BatchFileBuilder, type BatchFileInfo, type BatchFilePartInfo, type BatchPartSendingInfo, type BatchPartStreamSendingInfo, type BatchSessionContextLimitsOverride, type BatchSessionEffectiveContextLimits, type BatchSessionFormCode, BatchSessionService, type BatchSessionState, type BatchStreamBuildResult, type BatchUploadOptions, type BatchUploadResult, type BatchValidationResult, type BlockContextAuthenticationRequest, type BuildFakturaOptions, type BuildPefOptions, 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, CertificateSerialNumber, CertificateService, type CertificateStatus, type CertificateSubjectIdentifier, type CertificateSubjectIdentifierType, type CertificateSubjectLimitsOverride, type CertificateType, type CircuitBreakerConfig, CircuitBreakerPolicy, type CompressionType, type ContextIdentifier, type ContextIdentifierType, type ContinuationPoints, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DEFAULT_FORM_CODE, DISCOURAGED_UNICODE_RANGES, DefaultAuthManager, type ECDigestCurve, ENFORCE_XADES_COMPLIANCE, ETD_NAMESPACE, 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, FAKTURA_NAMESPACE, FA_XSD_PATHS, FORM_CODES, FORM_CODE_KEYS, type FakturaInput, type FakturaSchema, FileHwmStore, type FileMetadata, FileOfflineInvoiceStorage, type ForbiddenProblemDetails, type ForbiddenReasonCode, type ForbiddenSecurityInfo, type FormCode, type FormType, type GoneProblemDetails, 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, InMemoryOfflineInvoiceStorage, 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 InvoiceFields, 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 InvoiceResult, type InvoiceSchema, type InvoiceSchemaId, type InvoiceSerializerInput, type InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoiceValidationError, type InvoiceValidationErrorCode, type InvoiceValidationResult, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, type KSeFApiProblem, KSeFAuthStatusError, KSeFBadRequestError, KSeFBatchTimeoutError, KSeFCircuitOpenError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFErrorCode, KSeFForbiddenError, KSeFGoneError, KSeFMetadataPaginationError, KSeFRateLimitError, KSeFSessionExpiredError, type KSeFTokenContext, KSeFUnauthorizedError, KSeFUnknownPublicKeyError, KSeFValidationError, KSeFXsdValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, type LoginResult, type MaintenanceWindow, type MetadataQueryClient, Nip, NipVatUe, ORDER_MAP, type OfflineBatchResult, type OfflineCertificate, type OfflineInvoiceFilter, type OfflineInvoiceInputData, type OfflineInvoiceMetadata, type OfflineInvoiceOptions, type OfflineInvoiceStatus, type OfflineInvoiceStorage, type OfflineInvoiceUpdates, OfflineInvoiceWorkflow, type OfflineMode, type OfflineReason, type OfflineSubmissionResult, type OnlineSessionContextLimitsOverride, type OnlineSessionEffectiveContextLimits, type OnlineSessionFormCode, type OnlineSessionHandle, OnlineSessionService, type OnlineSessionState, type OpenBatchSessionRequest, type OpenBatchSessionResponse, type OpenOnlineSessionOptions, type OpenOnlineSessionRequest, type OpenOnlineSessionResponse, type OperationResponse, type OperationStatusInfo, PEF_NAMESPACE, PEF_XSD_PATHS, PERMISSION_DESCRIPTION_MAX_LENGTH, PERMISSION_DESCRIPTION_MIN_LENGTH, type PagedAuthorizationsResponse, type PagedPermissionsResponse, type PagedRolesResponse, type ParsedBatchUploadResult, type ParsedUpoInfo, type PartUploadRequest, type PefSchema, type PefUblCreditNoteInput, type PefUblDocumentInput, type PefUblInvoiceInput, 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 ProblemFields, type PublicKeyCertificate, type PublicKeyCertificateUsage, type QRCodeContextIdentifierType, type QrCodeOptions, type QrCodeResult, QrCodeService, type QueryAllMetadataOptions, 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, SchemaRegistry, type SelfSignedCertificateResult, type SendAndCloseOptions, type SendInvoiceRequest, type SendInvoiceResponse, type SerializeInvoiceOptions, 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 SubmitOfflineInvoicesOptions, 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 TechnicalCorrectionOptions, 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 TooManyRequestsProblemDetails, 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 ValidateAgainstXsdResult, type ValidateOptions, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, type XmlConversionResult, type XmlDocument, type XmlObject, type XmlValue, type ZipEntryInput, addBusinessDays, assertNever, authenticateWithCertificate, authenticateWithExternalSignature, authenticateWithPkcs12, authenticateWithToken, batchValidationDetails, buildFakturaXml, buildPefXml, buildRawXmlString, buildUnsignedAuthTokenRequestXml, buildXml, buildXmlFromObject, calculateBackoff, calculateOfflineDeadline, collectAllInvoiceMetadata, comparePKey, createTarGz, createZip, decodeJwtPayload, deduplicateByKsefNumber, defaultCircuitBreakerPolicy, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, extendDeadlineForMaintenance, extractInvoiceFields, extractTarGz, getDefaultReason, getEffectiveStartDate, getFormCode, getPolishHolidays, getTimeUntilDeadline, incrementalExportAndDownload, isExpired, isFakturaInput, isFormCodeShape, isMissingLibxmljsError, isPefUblDocumentInput, isPolishHoliday, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidCertificateSerialNumber, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, libxmljsAvailable, nextBusinessDay, openOnlineSession, openSendAndClose, orderXmlObject, parseFormCode, parseKSeFTokenContext, parseRetryAfter, parseUpoXml, parseXml, pollUntil, queryAllInvoiceMetadata, resolveOptions, resolveXsdFor, resumeOnlineSession, runWithConcurrency, serializeInvoiceXml, sha256Base64, sleep, stripBom, toKodFormularza, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validate, validateAgainstXsd, validateBatch, validateBusinessRules, validateCharValidity, validateFormCodeForSession, validatePresignedUrl, validateSchema, validateWellFormedness, verifyHash, xmlToObject };
package/dist/index.js CHANGED
@@ -376,6 +376,25 @@ var init_ksef_validation_error = __esm({
376
376
  }
377
377
  });
378
378
 
379
+ // src/errors/ksef-metadata-pagination-error.ts
380
+ var KSeFMetadataPaginationError;
381
+ var init_ksef_metadata_pagination_error = __esm({
382
+ "src/errors/ksef-metadata-pagination-error.ts"() {
383
+ "use strict";
384
+ init_esm_shims();
385
+ init_ksef_error();
386
+ KSeFMetadataPaginationError = class extends KSeFError {
387
+ /** The boundary date value that failed to advance. */
388
+ boundaryValue;
389
+ constructor(message, boundaryValue) {
390
+ super(message);
391
+ this.name = "KSeFMetadataPaginationError";
392
+ this.boundaryValue = boundaryValue;
393
+ }
394
+ };
395
+ }
396
+ });
397
+
379
398
  // src/errors/error-codes.ts
380
399
  function hasErrorCode(body, code) {
381
400
  return !!body?.exception?.exceptionDetailList?.some((d) => d.exceptionCode === code);
@@ -523,6 +542,7 @@ var init_errors = __esm({
523
542
  init_ksef_auth_status_error();
524
543
  init_ksef_session_expired_error();
525
544
  init_ksef_validation_error();
545
+ init_ksef_metadata_pagination_error();
526
546
  init_ksef_batch_timeout_error();
527
547
  init_ksef_unknown_public_key_error();
528
548
  init_ksef_circuit_open_error();
@@ -1544,6 +1564,9 @@ function isValidCertificateName(value) {
1544
1564
  function isValidCertificateFingerprint(value) {
1545
1565
  return CertificateFingerprint.test(value);
1546
1566
  }
1567
+ function isValidCertificateSerialNumber(value) {
1568
+ return CertificateSerialNumber.test(value);
1569
+ }
1547
1570
  function isValidBase64(value) {
1548
1571
  return Base64String.test(value);
1549
1572
  }
@@ -1553,7 +1576,7 @@ function isValidIp4Address(value) {
1553
1576
  function isValidSha256Base64(value) {
1554
1577
  return Sha256Base64.test(value);
1555
1578
  }
1556
- var NIP_PATTERN_CORE, VAT_UE_PATTERN_CORE, Nip, VatUe, NipVatUe, InternalId, PeppolId, ReferenceNumber, KsefNumber, KsefNumberV35, KsefNumberV36, CertificateName, Pesel, CertificateFingerprint, Base64String, Ip4Address, Ip4Range, Ip4Mask, Sha256Base64, NIP_WEIGHTS, PESEL_WEIGHTS, CRC8_POLY;
1579
+ var NIP_PATTERN_CORE, VAT_UE_PATTERN_CORE, Nip, VatUe, NipVatUe, InternalId, PeppolId, ReferenceNumber, KsefNumber, KsefNumberV35, KsefNumberV36, CertificateName, Pesel, CertificateFingerprint, CertificateSerialNumber, Base64String, Ip4Address, Ip4Range, Ip4Mask, Sha256Base64, NIP_WEIGHTS, PESEL_WEIGHTS, CRC8_POLY;
1557
1580
  var init_patterns = __esm({
1558
1581
  "src/validation/patterns.ts"() {
1559
1582
  "use strict";
@@ -1572,6 +1595,7 @@ var init_patterns = __esm({
1572
1595
  CertificateName = /^[a-zA-Z0-9_\- ąćęłńóśźżĄĆĘŁŃÓŚŹŻ]+$/;
1573
1596
  Pesel = /^\d{2}(?:0[1-9]|1[0-2]|2[1-9]|3[0-2]|4[1-9]|5[0-2]|6[1-9]|7[0-2]|8[1-9]|9[0-2])\d{7}$/;
1574
1597
  CertificateFingerprint = /^[0-9A-F]{64}$/;
1598
+ CertificateSerialNumber = /^[0-9A-F]{16}$/;
1575
1599
  Base64String = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
1576
1600
  Ip4Address = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
1577
1601
  Ip4Range = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}-((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
@@ -4027,6 +4051,8 @@ var init_certificates = __esm({
4027
4051
  init_esm_shims();
4028
4052
  init_rest_request();
4029
4053
  init_routes();
4054
+ init_ksef_validation_error();
4055
+ init_patterns();
4030
4056
  CertificateApiService = class {
4031
4057
  restClient;
4032
4058
  constructor(restClient) {
@@ -4053,6 +4079,14 @@ var init_certificates = __esm({
4053
4079
  return response.body;
4054
4080
  }
4055
4081
  async retrieve(request) {
4082
+ for (const serial of request.certificateSerialNumbers ?? []) {
4083
+ if (!isValidCertificateSerialNumber(serial)) {
4084
+ throw KSeFValidationError.fromField(
4085
+ "certificateSerialNumbers",
4086
+ `Invalid certificate serial number "${serial}": must be exactly 16 uppercase hex characters (^[0-9A-F]{16}$)`
4087
+ );
4088
+ }
4089
+ }
4056
4090
  const req = RestRequest.post(Routes.Certificates.retrieve).body(request);
4057
4091
  const response = await this.restClient.execute(req);
4058
4092
  return response.body;
@@ -8226,6 +8260,33 @@ var FileHwmStore = class {
8226
8260
  init_esm_shims();
8227
8261
  init_auth_xml_builder();
8228
8262
  init_with_key_rotation_retry();
8263
+ init_ksef_auth_status_error();
8264
+ var AUTH_STATUS_SUCCESS = 200;
8265
+ var AUTH_STATUS_IN_PROGRESS = 100;
8266
+ async function awaitAuthentication(client, referenceNumber, authToken, pollOptions) {
8267
+ const final = await pollUntil(
8268
+ () => client.auth.getAuthStatus(referenceNumber, authToken),
8269
+ (s) => s.status.code !== AUTH_STATUS_IN_PROGRESS,
8270
+ { ...pollOptions, description: `auth ${referenceNumber}` }
8271
+ );
8272
+ if (final.status.code !== AUTH_STATUS_SUCCESS) {
8273
+ const details = final.status.details?.length ? ` (${final.status.details.join("; ")})` : "";
8274
+ throw new KSeFAuthStatusError(
8275
+ `Authentication failed with status ${final.status.code}: ${final.status.description}${details}`,
8276
+ referenceNumber,
8277
+ final.status.description
8278
+ );
8279
+ }
8280
+ const tokens = await client.auth.getAccessToken(authToken);
8281
+ client.authManager.setAccessToken(tokens.accessToken.token);
8282
+ client.authManager.setRefreshToken(tokens.refreshToken.token);
8283
+ return {
8284
+ accessToken: tokens.accessToken.token,
8285
+ accessTokenValidUntil: tokens.accessToken.validUntil,
8286
+ refreshToken: tokens.refreshToken.token,
8287
+ refreshTokenValidUntil: tokens.refreshToken.validUntil
8288
+ };
8289
+ }
8229
8290
  async function authenticateWithToken(client, options) {
8230
8291
  const challenge = await client.auth.getChallenge();
8231
8292
  await client.crypto.init();
@@ -8240,20 +8301,7 @@ async function authenticateWithToken(client, options) {
8240
8301
  });
8241
8302
  });
8242
8303
  const authToken = submitResult.authenticationToken.token;
8243
- await pollUntil(
8244
- () => client.auth.getAuthStatus(submitResult.referenceNumber, authToken),
8245
- (s) => s.status.code !== 100,
8246
- { ...options.pollOptions, description: `auth ${submitResult.referenceNumber}` }
8247
- );
8248
- const tokens = await client.auth.getAccessToken(authToken);
8249
- client.authManager.setAccessToken(tokens.accessToken.token);
8250
- client.authManager.setRefreshToken(tokens.refreshToken.token);
8251
- return {
8252
- accessToken: tokens.accessToken.token,
8253
- accessTokenValidUntil: tokens.accessToken.validUntil,
8254
- refreshToken: tokens.refreshToken.token,
8255
- refreshTokenValidUntil: tokens.refreshToken.validUntil
8256
- };
8304
+ return awaitAuthentication(client, submitResult.referenceNumber, authToken, options.pollOptions);
8257
8305
  }
8258
8306
  async function authenticateWithCertificate(client, options) {
8259
8307
  const challenge = await client.auth.getChallenge();
@@ -8267,20 +8315,7 @@ async function authenticateWithCertificate(client, options) {
8267
8315
  options.enforceXadesCompliance ?? false
8268
8316
  );
8269
8317
  const authToken = submitResult.authenticationToken.token;
8270
- await pollUntil(
8271
- () => client.auth.getAuthStatus(submitResult.referenceNumber, authToken),
8272
- (s) => s.status.code !== 100,
8273
- { ...options.pollOptions, description: `auth ${submitResult.referenceNumber}` }
8274
- );
8275
- const tokens = await client.auth.getAccessToken(authToken);
8276
- client.authManager.setAccessToken(tokens.accessToken.token);
8277
- client.authManager.setRefreshToken(tokens.refreshToken.token);
8278
- return {
8279
- accessToken: tokens.accessToken.token,
8280
- accessTokenValidUntil: tokens.accessToken.validUntil,
8281
- refreshToken: tokens.refreshToken.token,
8282
- refreshTokenValidUntil: tokens.refreshToken.validUntil
8283
- };
8318
+ return awaitAuthentication(client, submitResult.referenceNumber, authToken, options.pollOptions);
8284
8319
  }
8285
8320
  async function authenticateWithExternalSignature(client, options) {
8286
8321
  const challenge = await client.auth.getChallenge();
@@ -8295,20 +8330,7 @@ async function authenticateWithExternalSignature(client, options) {
8295
8330
  options.enforceXadesCompliance ?? false
8296
8331
  );
8297
8332
  const authToken = submitResult.authenticationToken.token;
8298
- await pollUntil(
8299
- () => client.auth.getAuthStatus(submitResult.referenceNumber, authToken),
8300
- (s) => s.status.code !== 100,
8301
- { ...options.pollOptions, description: `auth ${submitResult.referenceNumber}` }
8302
- );
8303
- const tokens = await client.auth.getAccessToken(authToken);
8304
- client.authManager.setAccessToken(tokens.accessToken.token);
8305
- client.authManager.setRefreshToken(tokens.refreshToken.token);
8306
- return {
8307
- accessToken: tokens.accessToken.token,
8308
- accessTokenValidUntil: tokens.accessToken.validUntil,
8309
- refreshToken: tokens.refreshToken.token,
8310
- refreshTokenValidUntil: tokens.refreshToken.validUntil
8311
- };
8333
+ return awaitAuthentication(client, submitResult.referenceNumber, authToken, options.pollOptions);
8312
8334
  }
8313
8335
  async function authenticateWithPkcs12(client, options) {
8314
8336
  const { Pkcs12Loader: Pkcs12Loader2 } = await Promise.resolve().then(() => (init_pkcs12_loader(), pkcs12_loader_exports));
@@ -8323,6 +8345,95 @@ async function authenticateWithPkcs12(client, options) {
8323
8345
  });
8324
8346
  }
8325
8347
 
8348
+ // src/workflows/metadata-query-paging.ts
8349
+ init_esm_shims();
8350
+ init_ksef_metadata_pagination_error();
8351
+ init_ksef_validation_error();
8352
+ var DEFAULT_PAGE_SIZE = 100;
8353
+ var DEFAULT_MAX_BOUNDARY_CROSSINGS = 1e3;
8354
+ function boundaryFieldFor(dateType) {
8355
+ switch (dateType) {
8356
+ case "Issue":
8357
+ return "issueDate";
8358
+ case "Invoicing":
8359
+ return "invoicingDate";
8360
+ case "PermanentStorage":
8361
+ return "permanentStorageDate";
8362
+ }
8363
+ }
8364
+ async function* queryAllInvoiceMetadata(client, filters, options = {}) {
8365
+ const sortOrder = options.sortOrder ?? "Asc";
8366
+ const pageSize = options.pageSize ?? DEFAULT_PAGE_SIZE;
8367
+ const maxBoundaryCrossings = options.maxBoundaryCrossings ?? DEFAULT_MAX_BOUNDARY_CROSSINGS;
8368
+ if (!Number.isInteger(pageSize) || pageSize <= 0) {
8369
+ throw new KSeFValidationError("`pageSize` must be a positive integer.");
8370
+ }
8371
+ if (!Number.isInteger(maxBoundaryCrossings) || maxBoundaryCrossings < 0) {
8372
+ throw new KSeFValidationError("`maxBoundaryCrossings` must be a non-negative integer.");
8373
+ }
8374
+ const boundaryField = boundaryFieldFor(filters.dateRange.dateType);
8375
+ let dateRange = { ...filters.dateRange };
8376
+ let boundaryCrossings = 0;
8377
+ let carryKeys = /* @__PURE__ */ new Set();
8378
+ let carryValue;
8379
+ for (; ; ) {
8380
+ let pageIndex = 0;
8381
+ let lastBoundaryValue;
8382
+ let isTruncated = false;
8383
+ let boundaryKeys = /* @__PURE__ */ new Set();
8384
+ for (; ; ) {
8385
+ const window = { ...filters, dateRange };
8386
+ const response = await client.invoices.queryInvoiceMetadata(
8387
+ window,
8388
+ pageIndex,
8389
+ pageSize,
8390
+ sortOrder
8391
+ );
8392
+ isTruncated = response.isTruncated;
8393
+ for (const invoice of response.invoices) {
8394
+ const boundaryValue = invoice[boundaryField];
8395
+ const key = invoice.ksefNumber.toLowerCase();
8396
+ if (boundaryValue === carryValue && carryKeys.has(key)) continue;
8397
+ if (boundaryValue !== lastBoundaryValue) {
8398
+ lastBoundaryValue = boundaryValue;
8399
+ boundaryKeys = /* @__PURE__ */ new Set();
8400
+ }
8401
+ boundaryKeys.add(key);
8402
+ yield invoice;
8403
+ }
8404
+ if (response.hasMore) {
8405
+ pageIndex += 1;
8406
+ continue;
8407
+ }
8408
+ break;
8409
+ }
8410
+ if (!isTruncated || lastBoundaryValue === void 0) return;
8411
+ const previousBoundary = sortOrder === "Asc" ? dateRange.from : dateRange.to;
8412
+ if (previousBoundary === lastBoundaryValue) {
8413
+ throw new KSeFMetadataPaginationError(
8414
+ `Metadata paging stalled: a truncated window did not advance past ${boundaryField}=${lastBoundaryValue}. The result set likely exceeds the server cap within a single ${boundaryField} value; narrow the query further.`,
8415
+ lastBoundaryValue
8416
+ );
8417
+ }
8418
+ if (++boundaryCrossings > maxBoundaryCrossings) {
8419
+ throw new KSeFMetadataPaginationError(
8420
+ `Metadata paging exceeded ${maxBoundaryCrossings} truncation boundaries; aborting to avoid an unbounded loop.`,
8421
+ lastBoundaryValue
8422
+ );
8423
+ }
8424
+ carryKeys = boundaryKeys;
8425
+ carryValue = lastBoundaryValue;
8426
+ dateRange = sortOrder === "Asc" ? { ...dateRange, from: lastBoundaryValue } : { ...dateRange, to: lastBoundaryValue };
8427
+ }
8428
+ }
8429
+ async function collectAllInvoiceMetadata(client, filters, options = {}) {
8430
+ const all = [];
8431
+ for await (const invoice of queryAllInvoiceMetadata(client, filters, options)) {
8432
+ all.push(invoice);
8433
+ }
8434
+ return all;
8435
+ }
8436
+
8326
8437
  // src/offline/index.ts
8327
8438
  init_esm_shims();
8328
8439
  init_deadline();
@@ -8480,6 +8591,7 @@ export {
8480
8591
  CertificateFetcher,
8481
8592
  CertificateFingerprint,
8482
8593
  CertificateName,
8594
+ CertificateSerialNumber,
8483
8595
  CertificateService,
8484
8596
  CircuitBreakerPolicy,
8485
8597
  CryptographyService,
@@ -8516,6 +8628,7 @@ export {
8516
8628
  KSeFErrorCode,
8517
8629
  KSeFForbiddenError,
8518
8630
  KSeFGoneError,
8631
+ KSeFMetadataPaginationError,
8519
8632
  KSeFRateLimitError,
8520
8633
  KSeFSessionExpiredError,
8521
8634
  KSeFUnauthorizedError,
@@ -8577,6 +8690,7 @@ export {
8577
8690
  buildXmlFromObject,
8578
8691
  calculateBackoff,
8579
8692
  calculateOfflineDeadline,
8693
+ collectAllInvoiceMetadata,
8580
8694
  comparePKey,
8581
8695
  createTarGz,
8582
8696
  createZip,
@@ -8609,6 +8723,7 @@ export {
8609
8723
  isValidBase64,
8610
8724
  isValidCertificateFingerprint,
8611
8725
  isValidCertificateName,
8726
+ isValidCertificateSerialNumber,
8612
8727
  isValidInternalId,
8613
8728
  isValidIp4Address,
8614
8729
  isValidKsefNumber,
@@ -8632,6 +8747,7 @@ export {
8632
8747
  parseUpoXml,
8633
8748
  parseXml,
8634
8749
  pollUntil,
8750
+ queryAllInvoiceMetadata,
8635
8751
  resolveOptions,
8636
8752
  resolveXsdFor,
8637
8753
  resumeOnlineSession,