ksef-client-ts 0.6.1 → 0.7.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/README.md +3 -2
- package/dist/cli.js +970 -248
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1087 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +330 -17
- package/dist/index.d.ts +330 -17
- package/dist/index.js +1062 -78
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.d.cts
CHANGED
|
@@ -101,6 +101,13 @@ interface KSeFClientOptions {
|
|
|
101
101
|
rateLimit?: Partial<RateLimitConfig> | null;
|
|
102
102
|
presignedUrlHosts?: string[];
|
|
103
103
|
authManager?: AuthManager;
|
|
104
|
+
/**
|
|
105
|
+
* Request format for server-returned error bodies. Defaults to
|
|
106
|
+
* `'problem-details'` (RFC 7807, KSeF API v2.4.0+). Set to `'legacy'`
|
|
107
|
+
* to suppress the `X-Error-Format` header and receive legacy error
|
|
108
|
+
* bodies from older servers or proxies.
|
|
109
|
+
*/
|
|
110
|
+
errorFormat?: 'problem-details' | 'legacy';
|
|
104
111
|
}
|
|
105
112
|
interface ResolvedOptions {
|
|
106
113
|
baseUrl: string;
|
|
@@ -110,6 +117,7 @@ interface ResolvedOptions {
|
|
|
110
117
|
timeout: number;
|
|
111
118
|
customHeaders: Record<string, string>;
|
|
112
119
|
environmentName?: EnvironmentName;
|
|
120
|
+
errorFormat: 'problem-details' | 'legacy';
|
|
113
121
|
}
|
|
114
122
|
declare function resolveOptions(options?: KSeFClientOptions): ResolvedOptions;
|
|
115
123
|
|
|
@@ -134,17 +142,62 @@ interface UnauthorizedProblemDetails {
|
|
|
134
142
|
detail: string;
|
|
135
143
|
instance?: string;
|
|
136
144
|
traceId?: string;
|
|
145
|
+
timestamp?: string;
|
|
137
146
|
}
|
|
138
147
|
type ForbiddenReasonCode = 'missing-permissions' | 'ip-not-allowed' | 'insufficient-resource-access' | 'auth-method-not-allowed' | 'security-service-blocked' | 'context-type-not-allowed' | (string & {});
|
|
148
|
+
interface ForbiddenSecurityInfo {
|
|
149
|
+
requiredAnyOfPermissions?: string[];
|
|
150
|
+
presentPermissions?: string[];
|
|
151
|
+
}
|
|
139
152
|
interface ForbiddenProblemDetails {
|
|
140
153
|
title: string;
|
|
141
154
|
status: number;
|
|
142
155
|
detail: string;
|
|
143
156
|
instance?: string;
|
|
144
157
|
reasonCode: ForbiddenReasonCode;
|
|
145
|
-
security?: Record<string, unknown>;
|
|
158
|
+
security?: ForbiddenSecurityInfo & Record<string, unknown>;
|
|
159
|
+
traceId?: string;
|
|
160
|
+
timestamp?: string;
|
|
161
|
+
}
|
|
162
|
+
interface GoneProblemDetails {
|
|
163
|
+
title: string;
|
|
164
|
+
status: number;
|
|
165
|
+
detail: string;
|
|
166
|
+
instance?: string;
|
|
167
|
+
traceId?: string;
|
|
168
|
+
timestamp?: string;
|
|
169
|
+
}
|
|
170
|
+
interface BadRequestErrorDetail {
|
|
171
|
+
code: number;
|
|
172
|
+
description: string;
|
|
173
|
+
details: string[];
|
|
174
|
+
}
|
|
175
|
+
interface BadRequestProblemDetails {
|
|
176
|
+
title: string;
|
|
177
|
+
status: number;
|
|
178
|
+
detail?: string;
|
|
179
|
+
instance?: string;
|
|
180
|
+
errors: BadRequestErrorDetail[];
|
|
181
|
+
timestamp?: string;
|
|
182
|
+
traceId?: string;
|
|
183
|
+
}
|
|
184
|
+
interface TooManyRequestsProblemDetails {
|
|
185
|
+
title: string;
|
|
186
|
+
status: number;
|
|
187
|
+
detail?: string;
|
|
188
|
+
instance?: string;
|
|
189
|
+
timestamp?: string;
|
|
146
190
|
traceId?: string;
|
|
147
191
|
}
|
|
192
|
+
interface ProblemFields {
|
|
193
|
+
detail?: string;
|
|
194
|
+
reasonCode?: string;
|
|
195
|
+
errors?: BadRequestErrorDetail[];
|
|
196
|
+
security?: ForbiddenSecurityInfo & Record<string, unknown>;
|
|
197
|
+
traceId?: string;
|
|
198
|
+
instance?: string;
|
|
199
|
+
timestamp?: string;
|
|
200
|
+
}
|
|
148
201
|
|
|
149
202
|
declare class KSeFError extends Error {
|
|
150
203
|
constructor(message: string);
|
|
@@ -166,32 +219,61 @@ declare class KSeFApiError extends KSeFError {
|
|
|
166
219
|
readonly errorResponse?: ApiErrorResponse;
|
|
167
220
|
constructor(message: string, statusCode: number, errorResponse?: ApiErrorResponse);
|
|
168
221
|
static fromResponse(statusCode: number, body?: ApiErrorResponse): KSeFApiError;
|
|
222
|
+
toProblemFields(): ProblemFields;
|
|
169
223
|
}
|
|
170
224
|
|
|
171
225
|
declare class KSeFRateLimitError extends KSeFApiError {
|
|
226
|
+
readonly statusCode: 429;
|
|
172
227
|
readonly retryAfterSeconds?: number;
|
|
173
228
|
readonly retryAfterDate?: Date;
|
|
174
229
|
readonly recommendedDelay: number;
|
|
175
|
-
|
|
176
|
-
|
|
230
|
+
readonly problem?: TooManyRequestsProblemDetails;
|
|
231
|
+
constructor(message: string, statusCode: number, errorResponse?: ApiErrorResponse, retryAfterSeconds?: number, retryAfterDate?: Date, problem?: TooManyRequestsProblemDetails);
|
|
232
|
+
static fromRetryAfterHeader(statusCode: number, retryAfterHeader?: string | null, body?: ApiErrorResponse, problem?: TooManyRequestsProblemDetails): KSeFRateLimitError;
|
|
233
|
+
toProblemFields(): ProblemFields;
|
|
177
234
|
}
|
|
178
235
|
|
|
179
|
-
declare class KSeFUnauthorizedError extends
|
|
180
|
-
readonly statusCode
|
|
236
|
+
declare class KSeFUnauthorizedError extends KSeFApiError {
|
|
237
|
+
readonly statusCode: 401;
|
|
181
238
|
readonly detail: string;
|
|
182
239
|
readonly traceId?: string;
|
|
183
240
|
readonly instance?: string;
|
|
241
|
+
readonly timestamp?: string;
|
|
184
242
|
constructor(problemDetails: UnauthorizedProblemDetails);
|
|
243
|
+
toProblemFields(): ProblemFields;
|
|
185
244
|
}
|
|
186
245
|
|
|
187
|
-
declare class KSeFForbiddenError extends
|
|
188
|
-
readonly statusCode
|
|
246
|
+
declare class KSeFForbiddenError extends KSeFApiError {
|
|
247
|
+
readonly statusCode: 403;
|
|
189
248
|
readonly detail: string;
|
|
190
249
|
readonly reasonCode: ForbiddenReasonCode;
|
|
191
250
|
readonly instance?: string;
|
|
192
|
-
readonly security?: Record<string, unknown>;
|
|
251
|
+
readonly security?: ForbiddenSecurityInfo & Record<string, unknown>;
|
|
193
252
|
readonly traceId?: string;
|
|
253
|
+
readonly timestamp?: string;
|
|
194
254
|
constructor(problemDetails: ForbiddenProblemDetails);
|
|
255
|
+
toProblemFields(): ProblemFields;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
declare class KSeFGoneError extends KSeFApiError {
|
|
259
|
+
readonly statusCode: 410;
|
|
260
|
+
readonly detail: string;
|
|
261
|
+
readonly instance?: string;
|
|
262
|
+
readonly traceId?: string;
|
|
263
|
+
readonly timestamp?: string;
|
|
264
|
+
constructor(problemDetails: GoneProblemDetails);
|
|
265
|
+
toProblemFields(): ProblemFields;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
declare class KSeFBadRequestError extends KSeFApiError {
|
|
269
|
+
readonly statusCode: 400;
|
|
270
|
+
readonly detail?: string;
|
|
271
|
+
readonly instance?: string;
|
|
272
|
+
readonly errors: BadRequestErrorDetail[];
|
|
273
|
+
readonly traceId?: string;
|
|
274
|
+
readonly timestamp?: string;
|
|
275
|
+
constructor(problemDetails: BadRequestProblemDetails);
|
|
276
|
+
toProblemFields(): ProblemFields;
|
|
195
277
|
}
|
|
196
278
|
|
|
197
279
|
declare class KSeFAuthStatusError extends KSeFError {
|
|
@@ -204,6 +286,22 @@ declare class KSeFSessionExpiredError extends KSeFError {
|
|
|
204
286
|
constructor(message?: string);
|
|
205
287
|
}
|
|
206
288
|
|
|
289
|
+
declare class KSeFBatchTimeoutError extends KSeFApiError {
|
|
290
|
+
readonly errorCode: 21208;
|
|
291
|
+
constructor(message: string, statusCode: number, errorResponse?: ApiErrorResponse);
|
|
292
|
+
static fromResponse(statusCode: number, body?: ApiErrorResponse): KSeFBatchTimeoutError;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
declare const KSeFErrorCode: {
|
|
296
|
+
readonly BatchTimeout: 21208;
|
|
297
|
+
readonly DuplicateInvoice: 440;
|
|
298
|
+
};
|
|
299
|
+
type KSeFErrorCode = (typeof KSeFErrorCode)[keyof typeof KSeFErrorCode];
|
|
300
|
+
|
|
301
|
+
declare function assertNever(value: never): never;
|
|
302
|
+
|
|
303
|
+
type KSeFApiProblem = KSeFBadRequestError | KSeFUnauthorizedError | KSeFForbiddenError | KSeFGoneError | KSeFRateLimitError;
|
|
304
|
+
|
|
207
305
|
declare class RouteBuilder {
|
|
208
306
|
private readonly apiVersion;
|
|
209
307
|
constructor(apiVersion: string);
|
|
@@ -520,13 +618,14 @@ declare const SchemaRegistry: {
|
|
|
520
618
|
/**
|
|
521
619
|
* Invoice XML validation service.
|
|
522
620
|
*
|
|
523
|
-
*
|
|
524
|
-
* - Level
|
|
525
|
-
* - Level
|
|
526
|
-
* - Level
|
|
621
|
+
* Four independent validation levels:
|
|
622
|
+
* - Level 1a: Char validity (processing instructions + discouraged Unicode)
|
|
623
|
+
* - Level 1: XML well-formedness (xmldom parse)
|
|
624
|
+
* - Level 2: Schema validation (xml→object→Zod safeParse)
|
|
625
|
+
* - Level 3: Business rules (NIP/PESEL checksum verification)
|
|
527
626
|
*/
|
|
528
627
|
|
|
529
|
-
type InvoiceValidationErrorCode = 'MALFORMED_XML' | 'MISSING_REQUIRED_ELEMENT' | 'INVALID_VALUE' | 'INVALID_ENUM_VALUE' | 'PATTERN_MISMATCH' | 'MAX_OCCURS_EXCEEDED' | 'UNKNOWN_SCHEMA' | 'SCHEMA_VALIDATION_ERROR' | 'UNRECOGNIZED_KEY' | 'INVALID_NIP_CHECKSUM' | 'INVALID_PESEL_CHECKSUM' | 'FUTURE_INVOICE_DATE';
|
|
628
|
+
type InvoiceValidationErrorCode = 'XML_PROCESSING_INSTRUCTION' | 'XML_DISCOURAGED_UNICODE' | 'MALFORMED_XML' | 'MISSING_REQUIRED_ELEMENT' | 'INVALID_VALUE' | 'INVALID_ENUM_VALUE' | 'PATTERN_MISMATCH' | 'MAX_OCCURS_EXCEEDED' | 'UNKNOWN_SCHEMA' | 'SCHEMA_VALIDATION_ERROR' | 'UNRECOGNIZED_KEY' | 'INVALID_NIP_CHECKSUM' | 'INVALID_PESEL_CHECKSUM' | 'FUTURE_INVOICE_DATE';
|
|
530
629
|
interface InvoiceValidationError {
|
|
531
630
|
/** Error classification code. */
|
|
532
631
|
code: InvoiceValidationErrorCode;
|
|
@@ -546,6 +645,12 @@ interface InvoiceValidationResult {
|
|
|
546
645
|
interface ValidateOptions {
|
|
547
646
|
/** Explicit schema type override (skip auto-detection). */
|
|
548
647
|
schema?: SchemaType;
|
|
648
|
+
/**
|
|
649
|
+
* Skip Level 1a char-validity pre-parse check (processing instructions and
|
|
650
|
+
* discouraged Unicode code points). Defaults to `false` — the check runs and
|
|
651
|
+
* short-circuits the pipeline on failure.
|
|
652
|
+
*/
|
|
653
|
+
skipCharValidity?: boolean;
|
|
549
654
|
}
|
|
550
655
|
/**
|
|
551
656
|
* Check that the XML string is well-formed (parseable).
|
|
@@ -600,6 +705,30 @@ declare function batchValidationDetails(batch: BatchValidationResult): Array<{
|
|
|
600
705
|
message: string;
|
|
601
706
|
}>;
|
|
602
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Level 1a — Character validity pre-parse check.
|
|
710
|
+
*
|
|
711
|
+
* KSeF API v2.4.0 rejects invoice XML that contains either:
|
|
712
|
+
* - XML processing instructions outside the `<?xml ... ?>` prolog, or
|
|
713
|
+
* - Unicode code points discouraged by W3C XML 1.0 §2.2.
|
|
714
|
+
*
|
|
715
|
+
* Strict server-side enforcement on KSeF production begins 2026-07-16.
|
|
716
|
+
* Running this check before `xmlToObject()` catches issues client-side
|
|
717
|
+
* with precise offsets instead of relying on a generic server rejection.
|
|
718
|
+
*/
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* W3C XML 1.0 §2.2 discouraged Unicode code-point ranges (sorted, non-overlapping).
|
|
722
|
+
* Characters in any of these ranges are rejected by KSeF v2.4.0+.
|
|
723
|
+
*/
|
|
724
|
+
declare const DISCOURAGED_UNICODE_RANGES: ReadonlyArray<readonly [number, number]>;
|
|
725
|
+
/**
|
|
726
|
+
* Scan raw XML string for disallowed processing instructions and discouraged
|
|
727
|
+
* Unicode code points. Returns accumulated errors; empty array means the
|
|
728
|
+
* document is acceptable at this level.
|
|
729
|
+
*/
|
|
730
|
+
declare function validateCharValidity(xml: string): InvoiceValidationError[];
|
|
731
|
+
|
|
603
732
|
interface OperationResponse {
|
|
604
733
|
referenceNumber: string;
|
|
605
734
|
}
|
|
@@ -642,6 +771,10 @@ interface AuthChallengeResponse {
|
|
|
642
771
|
timestampMs: number;
|
|
643
772
|
clientIp: string;
|
|
644
773
|
}
|
|
774
|
+
interface LoginResult {
|
|
775
|
+
/** Client IP as seen by KSeF during the challenge — use to configure AuthorizationPolicy.allowedIps. */
|
|
776
|
+
clientIp: string;
|
|
777
|
+
}
|
|
645
778
|
interface AuthenticationInitResponse {
|
|
646
779
|
referenceNumber: string;
|
|
647
780
|
authenticationToken: TokenInfo;
|
|
@@ -1975,8 +2108,19 @@ declare class PermissionsService {
|
|
|
1975
2108
|
queryEuEntitiesGrants(options?: QueryEuEntitiesGrantsRequest, pageOffset?: number, pageSize?: number): Promise<PagedPermissionsResponse<EuEntityPermission>>;
|
|
1976
2109
|
getOperationStatus(ref: string): Promise<PermissionsOperationStatusResponse>;
|
|
1977
2110
|
getAttachmentStatus(): Promise<PermissionsAttachmentAllowedResponse>;
|
|
2111
|
+
private static validateContextIdentifier;
|
|
1978
2112
|
}
|
|
1979
2113
|
|
|
2114
|
+
interface RevokeSelfOptions {
|
|
2115
|
+
/** Known reference number — skips discovery. */
|
|
2116
|
+
referenceNumber?: string;
|
|
2117
|
+
/** Access token used to infer the caller's context when discovery is needed. */
|
|
2118
|
+
accessToken?: string;
|
|
2119
|
+
}
|
|
2120
|
+
interface RevokeSelfResult {
|
|
2121
|
+
referenceNumber: string;
|
|
2122
|
+
alreadyRevoked: boolean;
|
|
2123
|
+
}
|
|
1980
2124
|
declare class TokenService {
|
|
1981
2125
|
private readonly restClient;
|
|
1982
2126
|
constructor(restClient: RestClient);
|
|
@@ -1984,6 +2128,23 @@ declare class TokenService {
|
|
|
1984
2128
|
queryTokens(options?: QueryKsefTokensOptions): Promise<QueryKsefTokensResponse>;
|
|
1985
2129
|
getToken(ref: string): Promise<TokenStatusResponse>;
|
|
1986
2130
|
revokeToken(ref: string): Promise<void>;
|
|
2131
|
+
/**
|
|
2132
|
+
* Resolves the reference number of the token currently in use for authentication.
|
|
2133
|
+
* The only JWT payload field treated as authoritative is the KSeF-specific `trn`
|
|
2134
|
+
* (token reference number). Standard RFC 7519 claims such as `jti` are NOT a safe
|
|
2135
|
+
* fallback — a `jti` that differs from the KSeF reference would cause a DELETE to
|
|
2136
|
+
* hit a non-existent path, which `revokeSelf` treats as already-revoked, falsely
|
|
2137
|
+
* reporting success while leaving the token active on the server. When `trn` is
|
|
2138
|
+
* absent, we fall back to `GET /tokens` filtered by author and context; requires
|
|
2139
|
+
* exactly one active match and returns undefined when ambiguous.
|
|
2140
|
+
*/
|
|
2141
|
+
findSelfReferenceNumber(accessToken: string): Promise<string | undefined>;
|
|
2142
|
+
/**
|
|
2143
|
+
* Revokes the token currently used for authentication.
|
|
2144
|
+
* Treats 404/409/410 on DELETE as "already revoked" and returns successfully with
|
|
2145
|
+
* `alreadyRevoked: true` so callers can still clear local state.
|
|
2146
|
+
*/
|
|
2147
|
+
revokeSelf(opts?: RevokeSelfOptions): Promise<RevokeSelfResult>;
|
|
1987
2148
|
}
|
|
1988
2149
|
|
|
1989
2150
|
declare class CertificateApiService {
|
|
@@ -2465,6 +2626,158 @@ interface InvoiceFields {
|
|
|
2465
2626
|
*/
|
|
2466
2627
|
declare function extractInvoiceFields(xml: string): InvoiceFields;
|
|
2467
2628
|
|
|
2629
|
+
type XmlValue = string | number | boolean | null | XmlObject | XmlValue[];
|
|
2630
|
+
type XmlObject = {
|
|
2631
|
+
[key: string]: XmlValue;
|
|
2632
|
+
};
|
|
2633
|
+
type XmlDocument = Array<Record<string, unknown>>;
|
|
2634
|
+
type FakturaSchema = 'FA2' | 'FA3';
|
|
2635
|
+
type PefSchema = 'PEF' | 'PEF_KOR';
|
|
2636
|
+
type InvoiceSchema = FakturaSchema | PefSchema;
|
|
2637
|
+
interface FakturaInput {
|
|
2638
|
+
Naglowek: XmlObject;
|
|
2639
|
+
Podmiot1?: XmlObject;
|
|
2640
|
+
Podmiot2?: XmlObject;
|
|
2641
|
+
Podmiot3?: XmlObject;
|
|
2642
|
+
Fa: XmlObject;
|
|
2643
|
+
Stopka?: XmlObject;
|
|
2644
|
+
[key: string]: XmlValue | undefined;
|
|
2645
|
+
}
|
|
2646
|
+
interface PefUblInvoiceInput {
|
|
2647
|
+
schema?: 'PEF';
|
|
2648
|
+
Invoice: XmlObject;
|
|
2649
|
+
}
|
|
2650
|
+
interface PefUblCreditNoteInput {
|
|
2651
|
+
schema?: 'PEF_KOR';
|
|
2652
|
+
CreditNote: XmlObject;
|
|
2653
|
+
}
|
|
2654
|
+
type PefUblDocumentInput = PefUblInvoiceInput | PefUblCreditNoteInput;
|
|
2655
|
+
interface SerializeInvoiceOptions {
|
|
2656
|
+
schema?: InvoiceSchema;
|
|
2657
|
+
fakturaNamespace?: string;
|
|
2658
|
+
etdNamespace?: string;
|
|
2659
|
+
pretty?: boolean;
|
|
2660
|
+
}
|
|
2661
|
+
type InvoiceSerializerInput = string | Buffer | XmlDocument | FakturaInput | PefUblDocumentInput;
|
|
2662
|
+
|
|
2663
|
+
declare function parseXml(xml: string): XmlDocument;
|
|
2664
|
+
declare function buildXml(document: XmlDocument): string;
|
|
2665
|
+
declare function buildXmlFromObject(document: XmlObject, options?: {
|
|
2666
|
+
pretty?: boolean;
|
|
2667
|
+
}): string;
|
|
2668
|
+
declare function stripBom(input: string): string;
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* ORDER_MAP declares element ordering for every known parent element in the
|
|
2672
|
+
* KSeF FA2/FA3 XSDs (docs/schemas/FA/schemat_FA(2|3)_v1-0E.xsd).
|
|
2673
|
+
*
|
|
2674
|
+
* Inside `Fa` the VAT amount fields P_13_N / P_14_N / P_14_NW must interleave
|
|
2675
|
+
* per tax group (P_13_1, P_14_1, P_14_1W, P_13_2, P_14_2, P_14_2W, ...) rather
|
|
2676
|
+
* than listing every P_13_* before every P_14_*. smekcio TS 0.5.0 (commit
|
|
2677
|
+
* d1ec8fe, 2026-04-14) corrected this bug; the dedicated regression test lives
|
|
2678
|
+
* in tests/unit/xml/faktura-builder.test.ts ("multi-rate interleave").
|
|
2679
|
+
*
|
|
2680
|
+
* `Fa` is intentionally a union of FA2 and FA3 child keys (e.g. P_14_NW and
|
|
2681
|
+
* P_13_6_N are FA3-only). Ordering is permissive by design: keys absent from
|
|
2682
|
+
* the input are silently skipped, and shape enforcement is the job of
|
|
2683
|
+
* `isFakturaInput` + XSD validation in the test harness, not this table.
|
|
2684
|
+
*/
|
|
2685
|
+
declare const ORDER_MAP: Record<string, string[]>;
|
|
2686
|
+
/**
|
|
2687
|
+
* Natural-order sort for KSeF `P_*` keys.
|
|
2688
|
+
*
|
|
2689
|
+
* Splits on `_` after stripping the `P_` prefix, coerces numeric parts to
|
|
2690
|
+
* numbers, and compares numerically first, then lexicographically for any
|
|
2691
|
+
* trailing alphabetic parts (e.g. `P_20_A`, `P_20_B`).
|
|
2692
|
+
*
|
|
2693
|
+
* Examples:
|
|
2694
|
+
* P_13_1 < P_13_2 < P_13_10 < P_20_A < P_20_B
|
|
2695
|
+
*/
|
|
2696
|
+
declare function comparePKey(a: string, b: string): number;
|
|
2697
|
+
/**
|
|
2698
|
+
* Recursively orders an XML-shaped object according to ORDER_MAP + P_* natural
|
|
2699
|
+
* sort + input-insertion for unknown keys.
|
|
2700
|
+
*
|
|
2701
|
+
* Algorithm:
|
|
2702
|
+
* 1. Apply ORDER_MAP[contextKey] keys in declared order.
|
|
2703
|
+
* 2. Append remaining P_* keys via comparePKey.
|
|
2704
|
+
* 3. Append all other unknown keys in input insertion order.
|
|
2705
|
+
* 4. `undefined` values are omitted.
|
|
2706
|
+
*/
|
|
2707
|
+
declare function orderXmlObject(value: XmlObject, contextKey?: string): XmlObject;
|
|
2708
|
+
|
|
2709
|
+
declare const FAKTURA_NAMESPACE: Record<FakturaSchema, string>;
|
|
2710
|
+
declare const ETD_NAMESPACE: Record<FakturaSchema, string>;
|
|
2711
|
+
interface BuildFakturaOptions {
|
|
2712
|
+
schema?: FakturaSchema;
|
|
2713
|
+
fakturaNamespace?: string;
|
|
2714
|
+
etdNamespace?: string;
|
|
2715
|
+
pretty?: boolean;
|
|
2716
|
+
}
|
|
2717
|
+
declare function toKodFormularza(formCode: FormCode): XmlObject;
|
|
2718
|
+
declare function isFormCodeShape(value: unknown): value is FormCode;
|
|
2719
|
+
/**
|
|
2720
|
+
* Builds a Faktura XML string from a typed FakturaInput.
|
|
2721
|
+
*
|
|
2722
|
+
* Applies ORDER_MAP-driven element ordering (with multi-rate P_13/P_14
|
|
2723
|
+
* interleaving) and injects FA2/FA3 namespace attributes on the root
|
|
2724
|
+
* `<Faktura>` element.
|
|
2725
|
+
*
|
|
2726
|
+
* Default schema is FA3. The `fakturaNamespace` / `etdNamespace` options
|
|
2727
|
+
* override the per-schema defaults for advanced use cases.
|
|
2728
|
+
*/
|
|
2729
|
+
declare function buildFakturaXml(faktura: FakturaInput, options?: BuildFakturaOptions): string;
|
|
2730
|
+
declare function isFakturaInput(input: unknown): input is FakturaInput;
|
|
2731
|
+
|
|
2732
|
+
declare const PEF_NAMESPACE: Record<PefSchema, string>;
|
|
2733
|
+
interface BuildPefOptions {
|
|
2734
|
+
schema?: PefSchema;
|
|
2735
|
+
pretty?: boolean;
|
|
2736
|
+
}
|
|
2737
|
+
declare function isPefUblDocumentInput(input: unknown): input is PefUblDocumentInput;
|
|
2738
|
+
/**
|
|
2739
|
+
* Builds a PEF (UBL) Invoice or CreditNote XML string.
|
|
2740
|
+
*
|
|
2741
|
+
* Detects the root by the presence of either `Invoice` or `CreditNote` and
|
|
2742
|
+
* injects the UBL namespace set on the root element. Throws
|
|
2743
|
+
* `KSeFValidationError` when the caller's `schema` option contradicts the
|
|
2744
|
+
* detected root, or when neither / both of the roots are provided.
|
|
2745
|
+
*/
|
|
2746
|
+
declare function buildPefXml(input: PefUblDocumentInput, options?: BuildPefOptions): string;
|
|
2747
|
+
|
|
2748
|
+
/**
|
|
2749
|
+
* Serializes a KSeF invoice from any supported input shape into a UTF-8
|
|
2750
|
+
* encoded `Buffer`.
|
|
2751
|
+
*
|
|
2752
|
+
* Input dispatch:
|
|
2753
|
+
* - `Buffer` — returned byte-for-byte as the same reference;
|
|
2754
|
+
* callers must not mutate the buffer after the call
|
|
2755
|
+
* - `string` — UTF-8 BOM stripped, wrapped in a `Buffer`
|
|
2756
|
+
* - pre-parsed `XmlDocument` array — rebuilt via the engine
|
|
2757
|
+
* - `FakturaInput` — FA2/FA3 builder (default schema: FA3)
|
|
2758
|
+
* - `PefUblDocumentInput` — PEF / PEF_KOR builder
|
|
2759
|
+
*
|
|
2760
|
+
* Structured inputs that match none of the known shapes throw
|
|
2761
|
+
* `KSeFValidationError` naming the first missing top-level key. Callers
|
|
2762
|
+
* with an already-shaped `XmlObject` that deliberately sidesteps schema
|
|
2763
|
+
* dispatch can use `buildRawXmlString` directly.
|
|
2764
|
+
*/
|
|
2765
|
+
declare function serializeInvoiceXml(input: InvoiceSerializerInput, options?: SerializeInvoiceOptions): Buffer;
|
|
2766
|
+
/**
|
|
2767
|
+
* Low-level escape hatch for callers that already have a plain XML-shaped
|
|
2768
|
+
* object (e.g. produced by `parseXml`) and want to build it back out without
|
|
2769
|
+
* running through the FakturaInput / PefUblDocumentInput dispatch.
|
|
2770
|
+
*
|
|
2771
|
+
* Returns a `string` (not a `Buffer`) — consumers that need bytes should
|
|
2772
|
+
* wrap the result with `Buffer.from(xml, 'utf8')` before handing it off to
|
|
2773
|
+
* `session.sendInvoice(...)`. The naming reflects the return type: the sibling
|
|
2774
|
+
* `serializeInvoiceXml` entry point stays the preferred API for byte-ready
|
|
2775
|
+
* output.
|
|
2776
|
+
*/
|
|
2777
|
+
declare function buildRawXmlString(document: XmlObject, options?: {
|
|
2778
|
+
pretty?: boolean;
|
|
2779
|
+
}): string;
|
|
2780
|
+
|
|
2468
2781
|
interface PollOptions {
|
|
2469
2782
|
intervalMs?: number;
|
|
2470
2783
|
maxAttempts?: number;
|
|
@@ -2685,9 +2998,9 @@ declare class KSeFClient {
|
|
|
2685
2998
|
get offline(): OfflineInvoiceWorkflow;
|
|
2686
2999
|
/** @internal Create a RestClient with a different AuthManager, preserving transport/retry/rateLimit config. */
|
|
2687
3000
|
createScopedRestClient(authManager: AuthManager): RestClient;
|
|
2688
|
-
loginWithToken(token: string, nip: string): Promise<
|
|
2689
|
-
loginWithCertificate(certPem: string, keyPem: string, nip: string, keyPassword?: string): Promise<
|
|
2690
|
-
loginWithPkcs12(p12: Buffer | Uint8Array, password: string, nip: string): Promise<
|
|
3001
|
+
loginWithToken(token: string, nip: string): Promise<LoginResult>;
|
|
3002
|
+
loginWithCertificate(certPem: string, keyPem: string, nip: string, keyPassword?: string): Promise<LoginResult>;
|
|
3003
|
+
loginWithPkcs12(p12: Buffer | Uint8Array, password: string, nip: string): Promise<LoginResult>;
|
|
2691
3004
|
private awaitAuthReady;
|
|
2692
3005
|
logout(): Promise<void>;
|
|
2693
3006
|
}
|
|
@@ -2915,4 +3228,4 @@ declare class FileOfflineInvoiceStorage implements OfflineInvoiceStorage {
|
|
|
2915
3228
|
delete(id: string): Promise<void>;
|
|
2916
3229
|
}
|
|
2917
3230
|
|
|
2918
|
-
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 BatchSessionState, type BatchStreamBuildResult, type BatchUploadOptions, type BatchUploadResult, type BatchValidationResult, 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, DEFAULT_FORM_CODE, 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, FileOfflineInvoiceStorage, 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, 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 InvoiceStatusInfo, type InvoiceSubjectType, type InvoiceType, type InvoiceValidationError, type InvoiceValidationErrorCode, type InvoiceValidationResult, type InvoicingMode, Ip4Address, Ip4Mask, Ip4Range, KSEF_FEATURE_HEADER, KSeFApiError, KSeFAuthStatusError, KSeFClient, type KSeFClientOptions, KSeFError, KSeFForbiddenError, KSeFRateLimitError, KSeFSessionExpiredError, type KSeFTokenContext, KSeFUnauthorizedError, KSeFValidationError, type KsefMessagesResponse, KsefNumber, KsefNumberV35, KsefNumberV36, type KsefStatusResponse, type KsefSystemStatus, type KsefTokenPermissionType, type KsefTokenRequest, type KsefTokenResponse, type KsefTokenStatus, type LighthouseMessage, LighthouseService, LimitsService, type MaintenanceWindow, Nip, NipVatUe, 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, 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, SchemaRegistry, 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 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 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 ValidateOptions, type ValidationDetail, VatUe, VerificationLinkService, type X500NameFields, type XadesSubjectIdentifierType, type XmlConversionResult, type ZipEntryInput, addBusinessDays, authenticateWithCertificate, authenticateWithExternalSignature, authenticateWithPkcs12, authenticateWithToken, batchValidationDetails, buildUnsignedAuthTokenRequestXml, calculateBackoff, calculateOfflineDeadline, createZip, decodeJwtPayload, deduplicateByKsefNumber, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, extendDeadlineForMaintenance, extractInvoiceFields, getDefaultReason, getEffectiveStartDate, getFormCode, getPolishHolidays, getTimeUntilDeadline, incrementalExportAndDownload, isExpired, isPolishHoliday, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, nextBusinessDay, openOnlineSession, openSendAndClose, parseFormCode, parseKSeFTokenContext, parseRetryAfter, parseUpoXml, pollUntil, resolveOptions, resumeOnlineSession, runWithConcurrency, sha256Base64, sleep, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validate, validateBatch, validateBusinessRules, validateFormCodeForSession, validatePresignedUrl, validateSchema, validateWellFormedness, verifyHash, xmlToObject };
|
|
3231
|
+
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 ContextIdentifier, type ContextIdentifierType, type ContinuationPoints, type CryptoEncryptionMethod, CryptographyService, type CsrResult, DEFAULT_FORM_CODE, DISCOURAGED_UNICODE_RANGES, DefaultAuthManager, 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, 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 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, KSeFClient, type KSeFClientOptions, KSeFError, KSeFErrorCode, KSeFForbiddenError, KSeFGoneError, KSeFRateLimitError, KSeFSessionExpiredError, type KSeFTokenContext, KSeFUnauthorizedError, KSeFValidationError, 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, 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 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, createZip, decodeJwtPayload, deduplicateByKsefNumber, defaultPresignedUrlPolicy, defaultRateLimitPolicy, defaultRetryPolicy, defaultTransport, exportAndDownload, exportInvoices, extendDeadlineForMaintenance, extractInvoiceFields, getDefaultReason, getEffectiveStartDate, getFormCode, getPolishHolidays, getTimeUntilDeadline, incrementalExportAndDownload, isExpired, isFakturaInput, isFormCodeShape, isPefUblDocumentInput, isPolishHoliday, isRetryableError, isRetryableStatus, isValidBase64, isValidCertificateFingerprint, isValidCertificateName, isValidInternalId, isValidIp4Address, isValidKsefNumber, isValidKsefNumberV35, isValidKsefNumberV36, isValidNip, isValidNipVatUe, isValidPeppolId, isValidPesel, isValidReferenceNumber, isValidSha256Base64, isValidVatUe, nextBusinessDay, openOnlineSession, openSendAndClose, orderXmlObject, parseFormCode, parseKSeFTokenContext, parseRetryAfter, parseUpoXml, parseXml, pollUntil, resolveOptions, resumeOnlineSession, runWithConcurrency, serializeInvoiceXml, sha256Base64, sleep, stripBom, toKodFormularza, unzip, updateContinuationPoint, uploadBatch, uploadBatchParsed, uploadBatchStream, uploadBatchStreamParsed, validate, validateBatch, validateBusinessRules, validateCharValidity, validateFormCodeForSession, validatePresignedUrl, validateSchema, validateWellFormedness, verifyHash, xmlToObject };
|