@ksefnik/shared 0.0.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/LICENSE +21 -0
- package/dist/errors/bank.error.d.ts +8 -0
- package/dist/errors/bank.error.d.ts.map +1 -0
- package/dist/errors/bank.error.js +14 -0
- package/dist/errors/bank.error.js.map +1 -0
- package/dist/errors/base.d.ts +6 -0
- package/dist/errors/base.d.ts.map +1 -0
- package/dist/errors/base.js +11 -0
- package/dist/errors/base.js.map +1 -0
- package/dist/errors/index.d.ts +6 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +6 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/errors/ksef.error.d.ts +12 -0
- package/dist/errors/ksef.error.d.ts.map +1 -0
- package/dist/errors/ksef.error.js +22 -0
- package/dist/errors/ksef.error.js.map +1 -0
- package/dist/errors/reconciliation.error.d.ts +5 -0
- package/dist/errors/reconciliation.error.d.ts.map +1 -0
- package/dist/errors/reconciliation.error.js +8 -0
- package/dist/errors/reconciliation.error.js.map +1 -0
- package/dist/errors/validation.error.d.ts +8 -0
- package/dist/errors/validation.error.d.ts.map +1 -0
- package/dist/errors/validation.error.js +18 -0
- package/dist/errors/validation.error.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/schemas/bank-transaction.schema.d.ts +40 -0
- package/dist/schemas/bank-transaction.schema.d.ts.map +1 -0
- package/dist/schemas/bank-transaction.schema.js +15 -0
- package/dist/schemas/bank-transaction.schema.js.map +1 -0
- package/dist/schemas/helpers.d.ts +4 -0
- package/dist/schemas/helpers.d.ts.map +1 -0
- package/dist/schemas/helpers.js +14 -0
- package/dist/schemas/helpers.js.map +1 -0
- package/dist/schemas/index.d.ts +6 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/invoice.schema.d.ts +127 -0
- package/dist/schemas/invoice.schema.d.ts.map +1 -0
- package/dist/schemas/invoice.schema.js +32 -0
- package/dist/schemas/invoice.schema.js.map +1 -0
- package/dist/schemas/match.schema.d.ts +34 -0
- package/dist/schemas/match.schema.d.ts.map +1 -0
- package/dist/schemas/match.schema.js +13 -0
- package/dist/schemas/match.schema.js.map +1 -0
- package/dist/schemas/reconciliation-report.schema.d.ts +356 -0
- package/dist/schemas/reconciliation-report.schema.d.ts.map +1 -0
- package/dist/schemas/reconciliation-report.schema.js +23 -0
- package/dist/schemas/reconciliation-report.schema.js.map +1 -0
- package/dist/types/bank-parser.d.ts +7 -0
- package/dist/types/bank-parser.d.ts.map +1 -0
- package/dist/types/bank-parser.js +2 -0
- package/dist/types/bank-parser.js.map +1 -0
- package/dist/types/config.d.ts +13 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/ksef-adapter.d.ts +36 -0
- package/dist/types/ksef-adapter.d.ts.map +1 -0
- package/dist/types/ksef-adapter.js +2 -0
- package/dist/types/ksef-adapter.js.map +1 -0
- package/dist/types/plugin.d.ts +24 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +2 -0
- package/dist/types/plugin.js.map +1 -0
- package/dist/types/reconciliation-pass.d.ts +19 -0
- package/dist/types/reconciliation-pass.d.ts.map +1 -0
- package/dist/types/reconciliation-pass.js +2 -0
- package/dist/types/reconciliation-pass.js.map +1 -0
- package/dist/types/storage.d.ts +23 -0
- package/dist/types/storage.d.ts.map +1 -0
- package/dist/types/storage.js +2 -0
- package/dist/types/storage.js.map +1 -0
- package/package.json +39 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 CodeFormers-it
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export declare class BankParseError extends KsefnikError {
|
|
3
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
4
|
+
}
|
|
5
|
+
export declare class UnsupportedBankFormatError extends KsefnikError {
|
|
6
|
+
constructor(format: string);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=bank.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bank.error.d.ts","sourceRoot":"","sources":["../../src/errors/bank.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,qBAAa,cAAe,SAAQ,YAAY;gBAClC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D;AAED,qBAAa,0BAA2B,SAAQ,YAAY;gBAC9C,MAAM,EAAE,MAAM;CAI3B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export class BankParseError extends KsefnikError {
|
|
3
|
+
constructor(message, context) {
|
|
4
|
+
super('BANK_PARSE_ERROR', message, context);
|
|
5
|
+
this.name = 'BankParseError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export class UnsupportedBankFormatError extends KsefnikError {
|
|
9
|
+
constructor(format) {
|
|
10
|
+
super('BANK_FORMAT_UNSUPPORTED', `Unsupported bank format: ${format}`, { format });
|
|
11
|
+
this.name = 'UnsupportedBankFormatError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=bank.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bank.error.js","sourceRoot":"","sources":["../../src/errors/bank.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,OAAO,cAAe,SAAQ,YAAY;IAC9C,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,kBAAkB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAC3C,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAA;IAC9B,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,YAAY;IAC1D,YAAY,MAAc;QACxB,KAAK,CAAC,yBAAyB,EAAE,4BAA4B,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAA;QAClF,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAA;IAC1C,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/errors/base.ts"],"names":[],"mappings":"AAAA,qBAAa,YAAa,SAAQ,KAAK;aAEnB,IAAI,EAAE,MAAM;aAEZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAKpD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/errors/base.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,YAAa,SAAQ,KAAK;IAEnB;IAEA;IAHlB,YACkB,IAAY,EAC5B,OAAe,EACC,OAAiC;QAEjD,KAAK,CAAC,OAAO,CAAC,CAAA;QAJE,SAAI,GAAJ,IAAI,CAAQ;QAEZ,YAAO,GAAP,OAAO,CAA0B;QAGjD,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { KsefnikError } from './base.js';
|
|
2
|
+
export { KsefApiError, KsefSessionError, KsefTimeoutError } from './ksef.error.js';
|
|
3
|
+
export { InvoiceValidationError } from './validation.error.js';
|
|
4
|
+
export { BankParseError, UnsupportedBankFormatError } from './bank.error.js';
|
|
5
|
+
export { ReconciliationError } from './reconciliation.error.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { KsefnikError } from './base.js';
|
|
2
|
+
export { KsefApiError, KsefSessionError, KsefTimeoutError } from './ksef.error.js';
|
|
3
|
+
export { InvoiceValidationError } from './validation.error.js';
|
|
4
|
+
export { BankParseError, UnsupportedBankFormatError } from './bank.error.js';
|
|
5
|
+
export { ReconciliationError } from './reconciliation.error.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAA;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export declare class KsefApiError extends KsefnikError {
|
|
3
|
+
readonly statusCode?: number | undefined;
|
|
4
|
+
constructor(message: string, statusCode?: number | undefined, context?: Record<string, unknown>);
|
|
5
|
+
}
|
|
6
|
+
export declare class KsefSessionError extends KsefnikError {
|
|
7
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
8
|
+
}
|
|
9
|
+
export declare class KsefTimeoutError extends KsefnikError {
|
|
10
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ksef.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ksef.error.d.ts","sourceRoot":"","sources":["../../src/errors/ksef.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,qBAAa,YAAa,SAAQ,YAAY;aAG1B,UAAU,CAAC,EAAE,MAAM;gBADnC,OAAO,EAAE,MAAM,EACC,UAAU,CAAC,EAAE,MAAM,YAAA,EACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAKpC;AAED,qBAAa,gBAAiB,SAAQ,YAAY;gBACpC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D;AAED,qBAAa,gBAAiB,SAAQ,YAAY;gBACpC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export class KsefApiError extends KsefnikError {
|
|
3
|
+
statusCode;
|
|
4
|
+
constructor(message, statusCode, context) {
|
|
5
|
+
super('KSEF_API_ERROR', message, context);
|
|
6
|
+
this.statusCode = statusCode;
|
|
7
|
+
this.name = 'KsefApiError';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export class KsefSessionError extends KsefnikError {
|
|
11
|
+
constructor(message, context) {
|
|
12
|
+
super('KSEF_SESSION_ERROR', message, context);
|
|
13
|
+
this.name = 'KsefSessionError';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export class KsefTimeoutError extends KsefnikError {
|
|
17
|
+
constructor(message, context) {
|
|
18
|
+
super('KSEF_TIMEOUT_ERROR', message, context);
|
|
19
|
+
this.name = 'KsefTimeoutError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=ksef.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ksef.error.js","sourceRoot":"","sources":["../../src/errors/ksef.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,OAAO,YAAa,SAAQ,YAAY;IAG1B;IAFlB,YACE,OAAe,EACC,UAAmB,EACnC,OAAiC;QAEjC,KAAK,CAAC,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAHzB,eAAU,GAAV,UAAU,CAAS;QAInC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;IAC5B,CAAC;CACF;AAED,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAC7C,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAA;IAChC,CAAC;CACF;AAED,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,oBAAoB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAC7C,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAA;IAChC,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciliation.error.d.ts","sourceRoot":"","sources":["../../src/errors/reconciliation.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,qBAAa,mBAAoB,SAAQ,YAAY;gBACvC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAI/D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export class ReconciliationError extends KsefnikError {
|
|
3
|
+
constructor(message, context) {
|
|
4
|
+
super('RECONCILIATION_ERROR', message, context);
|
|
5
|
+
this.name = 'ReconciliationError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=reconciliation.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reconciliation.error.js","sourceRoot":"","sources":["../../src/errors/reconciliation.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,OAAO,mBAAoB,SAAQ,YAAY;IACnD,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,sBAAsB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;QAC/C,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACnC,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export declare class InvoiceValidationError extends KsefnikError {
|
|
3
|
+
readonly rule: string;
|
|
4
|
+
readonly field: string;
|
|
5
|
+
readonly value: unknown;
|
|
6
|
+
constructor(rule: string, field: string, value: unknown, message?: string);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=validation.error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.error.d.ts","sourceRoot":"","sources":["../../src/errors/validation.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,qBAAa,sBAAuB,SAAQ,YAAY;aAEpC,IAAI,EAAE,MAAM;aACZ,KAAK,EAAE,MAAM;aACb,KAAK,EAAE,OAAO;gBAFd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,OAAO,EAC9B,OAAO,CAAC,EAAE,MAAM;CASnB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KsefnikError } from './base.js';
|
|
2
|
+
export class InvoiceValidationError extends KsefnikError {
|
|
3
|
+
rule;
|
|
4
|
+
field;
|
|
5
|
+
value;
|
|
6
|
+
constructor(rule, field, value, message) {
|
|
7
|
+
super('VALIDATION_INVOICE', message ?? `Validation failed: rule "${rule}" on field "${field}"`, {
|
|
8
|
+
rule,
|
|
9
|
+
field,
|
|
10
|
+
value,
|
|
11
|
+
});
|
|
12
|
+
this.rule = rule;
|
|
13
|
+
this.field = field;
|
|
14
|
+
this.value = value;
|
|
15
|
+
this.name = 'InvoiceValidationError';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=validation.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.error.js","sourceRoot":"","sources":["../../src/errors/validation.error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,MAAM,OAAO,sBAAuB,SAAQ,YAAY;IAEpC;IACA;IACA;IAHlB,YACkB,IAAY,EACZ,KAAa,EACb,KAAc,EAC9B,OAAgB;QAEhB,KAAK,CAAC,oBAAoB,EAAE,OAAO,IAAI,4BAA4B,IAAI,eAAe,KAAK,GAAG,EAAE;YAC9F,IAAI;YACJ,KAAK;YACL,KAAK;SACN,CAAC,CAAA;QATc,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAQ;QACb,UAAK,GAAL,KAAK,CAAS;QAQ9B,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAA;IACtC,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BankTransactionSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
date: z.ZodString;
|
|
5
|
+
amount: z.ZodNumber;
|
|
6
|
+
description: z.ZodString;
|
|
7
|
+
senderName: z.ZodOptional<z.ZodString>;
|
|
8
|
+
senderNIP: z.ZodOptional<z.ZodString>;
|
|
9
|
+
recipientName: z.ZodOptional<z.ZodString>;
|
|
10
|
+
recipientNIP: z.ZodOptional<z.ZodString>;
|
|
11
|
+
bank: z.ZodEnum<["mt940", "mbank", "ing", "pko", "santander", "other"]>;
|
|
12
|
+
raw: z.ZodString;
|
|
13
|
+
createdAt: z.ZodString;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
id: string;
|
|
16
|
+
date: string;
|
|
17
|
+
description: string;
|
|
18
|
+
createdAt: string;
|
|
19
|
+
amount: number;
|
|
20
|
+
bank: "mbank" | "mt940" | "ing" | "pko" | "santander" | "other";
|
|
21
|
+
raw: string;
|
|
22
|
+
senderName?: string | undefined;
|
|
23
|
+
senderNIP?: string | undefined;
|
|
24
|
+
recipientName?: string | undefined;
|
|
25
|
+
recipientNIP?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
id: string;
|
|
28
|
+
date: string;
|
|
29
|
+
description: string;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
amount: number;
|
|
32
|
+
bank: "mbank" | "mt940" | "ing" | "pko" | "santander" | "other";
|
|
33
|
+
raw: string;
|
|
34
|
+
senderName?: string | undefined;
|
|
35
|
+
senderNIP?: string | undefined;
|
|
36
|
+
recipientName?: string | undefined;
|
|
37
|
+
recipientNIP?: string | undefined;
|
|
38
|
+
}>;
|
|
39
|
+
export type BankTransaction = z.infer<typeof BankTransactionSchema>;
|
|
40
|
+
//# sourceMappingURL=bank-transaction.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bank-transaction.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/bank-transaction.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYhC,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const BankTransactionSchema = z.object({
|
|
3
|
+
id: z.string().uuid(),
|
|
4
|
+
date: z.string().date(),
|
|
5
|
+
amount: z.number().int(),
|
|
6
|
+
description: z.string(),
|
|
7
|
+
senderName: z.string().optional(),
|
|
8
|
+
senderNIP: z.string().regex(/^\d{10}$/).optional(),
|
|
9
|
+
recipientName: z.string().optional(),
|
|
10
|
+
recipientNIP: z.string().regex(/^\d{10}$/).optional(),
|
|
11
|
+
bank: z.enum(['mt940', 'mbank', 'ing', 'pko', 'santander', 'other']),
|
|
12
|
+
raw: z.string(),
|
|
13
|
+
createdAt: z.string().datetime(),
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=bank-transaction.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bank-transaction.schema.js","sourceRoot":"","sources":["../../src/schemas/bank-transaction.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACvB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACxB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IAClD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IACrD,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACpE,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/schemas/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAK/C;AAED,eAAO,MAAM,SAAS,2CAGoC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const NIP_WEIGHTS = [6, 5, 7, 2, 3, 4, 5, 6, 7];
|
|
3
|
+
export function isValidNIP(nip) {
|
|
4
|
+
if (!/^\d{10}$/.test(nip))
|
|
5
|
+
return false;
|
|
6
|
+
const digits = nip.split('').map(Number);
|
|
7
|
+
const sum = NIP_WEIGHTS.reduce((acc, weight, i) => acc + weight * digits[i], 0);
|
|
8
|
+
return sum % 11 === digits[9];
|
|
9
|
+
}
|
|
10
|
+
export const nipSchema = z
|
|
11
|
+
.string()
|
|
12
|
+
.regex(/^\d{10}$/, 'NIP must be exactly 10 digits')
|
|
13
|
+
.refine(isValidNIP, { message: 'Invalid NIP checksum' });
|
|
14
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/schemas/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU,CAAA;AAExD,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAA;IACvC,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACxC,MAAM,GAAG,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAA;IAChF,OAAO,GAAG,GAAG,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,CAAA;AAC/B,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,KAAK,CAAC,UAAU,EAAE,+BAA+B,CAAC;KAClD,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { InvoiceSchema, LineItemSchema, type Invoice, type LineItem } from './invoice.schema.js';
|
|
2
|
+
export { BankTransactionSchema, type BankTransaction } from './bank-transaction.schema.js';
|
|
3
|
+
export { MatchSchema, type Match } from './match.schema.js';
|
|
4
|
+
export { ReconciliationReportSchema, type ReconciliationReport, type Summary, } from './reconciliation-report.schema.js';
|
|
5
|
+
export { isValidNIP, nipSchema } from './helpers.js';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAChG,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EACL,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,OAAO,GACb,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { InvoiceSchema, LineItemSchema } from './invoice.schema.js';
|
|
2
|
+
export { BankTransactionSchema } from './bank-transaction.schema.js';
|
|
3
|
+
export { MatchSchema } from './match.schema.js';
|
|
4
|
+
export { ReconciliationReportSchema, } from './reconciliation-report.schema.js';
|
|
5
|
+
export { isValidNIP, nipSchema } from './helpers.js';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAA+B,MAAM,qBAAqB,CAAA;AAChG,OAAO,EAAE,qBAAqB,EAAwB,MAAM,8BAA8B,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAc,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EACL,0BAA0B,GAG3B,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const LineItemSchema: z.ZodObject<{
|
|
3
|
+
lineNumber: z.ZodNumber;
|
|
4
|
+
description: z.ZodString;
|
|
5
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
6
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
unitNetPrice: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
netAmount: z.ZodNumber;
|
|
9
|
+
vatRate: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
lineNumber: number;
|
|
12
|
+
description: string;
|
|
13
|
+
netAmount: number;
|
|
14
|
+
unit?: string | undefined;
|
|
15
|
+
quantity?: number | undefined;
|
|
16
|
+
unitNetPrice?: number | undefined;
|
|
17
|
+
vatRate?: number | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
lineNumber: number;
|
|
20
|
+
description: string;
|
|
21
|
+
netAmount: number;
|
|
22
|
+
unit?: string | undefined;
|
|
23
|
+
quantity?: number | undefined;
|
|
24
|
+
unitNetPrice?: number | undefined;
|
|
25
|
+
vatRate?: number | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const InvoiceSchema: z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
invoiceNumber: z.ZodString;
|
|
30
|
+
sellerNIP: z.ZodEffects<z.ZodString, string, string>;
|
|
31
|
+
buyerNIP: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
32
|
+
grossAmount: z.ZodNumber;
|
|
33
|
+
netAmount: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
vatAmount: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
currency: z.ZodLiteral<"PLN">;
|
|
36
|
+
issueDate: z.ZodString;
|
|
37
|
+
salesDate: z.ZodOptional<z.ZodString>;
|
|
38
|
+
dueDate: z.ZodOptional<z.ZodString>;
|
|
39
|
+
ksefReference: z.ZodOptional<z.ZodString>;
|
|
40
|
+
sellerName: z.ZodOptional<z.ZodString>;
|
|
41
|
+
buyerName: z.ZodOptional<z.ZodString>;
|
|
42
|
+
description: z.ZodOptional<z.ZodString>;
|
|
43
|
+
lineItems: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
|
+
lineNumber: z.ZodNumber;
|
|
45
|
+
description: z.ZodString;
|
|
46
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
47
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
unitNetPrice: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
netAmount: z.ZodNumber;
|
|
50
|
+
vatRate: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, "strip", z.ZodTypeAny, {
|
|
52
|
+
lineNumber: number;
|
|
53
|
+
description: string;
|
|
54
|
+
netAmount: number;
|
|
55
|
+
unit?: string | undefined;
|
|
56
|
+
quantity?: number | undefined;
|
|
57
|
+
unitNetPrice?: number | undefined;
|
|
58
|
+
vatRate?: number | undefined;
|
|
59
|
+
}, {
|
|
60
|
+
lineNumber: number;
|
|
61
|
+
description: string;
|
|
62
|
+
netAmount: number;
|
|
63
|
+
unit?: string | undefined;
|
|
64
|
+
quantity?: number | undefined;
|
|
65
|
+
unitNetPrice?: number | undefined;
|
|
66
|
+
vatRate?: number | undefined;
|
|
67
|
+
}>, "many">>;
|
|
68
|
+
rawXml: z.ZodOptional<z.ZodString>;
|
|
69
|
+
createdAt: z.ZodString;
|
|
70
|
+
}, "strip", z.ZodTypeAny, {
|
|
71
|
+
id: string;
|
|
72
|
+
invoiceNumber: string;
|
|
73
|
+
sellerNIP: string;
|
|
74
|
+
grossAmount: number;
|
|
75
|
+
currency: "PLN";
|
|
76
|
+
issueDate: string;
|
|
77
|
+
createdAt: string;
|
|
78
|
+
description?: string | undefined;
|
|
79
|
+
netAmount?: number | undefined;
|
|
80
|
+
buyerNIP?: string | undefined;
|
|
81
|
+
vatAmount?: number | undefined;
|
|
82
|
+
salesDate?: string | undefined;
|
|
83
|
+
dueDate?: string | undefined;
|
|
84
|
+
ksefReference?: string | undefined;
|
|
85
|
+
sellerName?: string | undefined;
|
|
86
|
+
buyerName?: string | undefined;
|
|
87
|
+
lineItems?: {
|
|
88
|
+
lineNumber: number;
|
|
89
|
+
description: string;
|
|
90
|
+
netAmount: number;
|
|
91
|
+
unit?: string | undefined;
|
|
92
|
+
quantity?: number | undefined;
|
|
93
|
+
unitNetPrice?: number | undefined;
|
|
94
|
+
vatRate?: number | undefined;
|
|
95
|
+
}[] | undefined;
|
|
96
|
+
rawXml?: string | undefined;
|
|
97
|
+
}, {
|
|
98
|
+
id: string;
|
|
99
|
+
invoiceNumber: string;
|
|
100
|
+
sellerNIP: string;
|
|
101
|
+
grossAmount: number;
|
|
102
|
+
currency: "PLN";
|
|
103
|
+
issueDate: string;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
description?: string | undefined;
|
|
106
|
+
netAmount?: number | undefined;
|
|
107
|
+
buyerNIP?: string | undefined;
|
|
108
|
+
vatAmount?: number | undefined;
|
|
109
|
+
salesDate?: string | undefined;
|
|
110
|
+
dueDate?: string | undefined;
|
|
111
|
+
ksefReference?: string | undefined;
|
|
112
|
+
sellerName?: string | undefined;
|
|
113
|
+
buyerName?: string | undefined;
|
|
114
|
+
lineItems?: {
|
|
115
|
+
lineNumber: number;
|
|
116
|
+
description: string;
|
|
117
|
+
netAmount: number;
|
|
118
|
+
unit?: string | undefined;
|
|
119
|
+
quantity?: number | undefined;
|
|
120
|
+
unitNetPrice?: number | undefined;
|
|
121
|
+
vatRate?: number | undefined;
|
|
122
|
+
}[] | undefined;
|
|
123
|
+
rawXml?: string | undefined;
|
|
124
|
+
}>;
|
|
125
|
+
export type Invoice = z.infer<typeof InvoiceSchema>;
|
|
126
|
+
export type LineItem = z.infer<typeof LineItemSchema>;
|
|
127
|
+
//# sourceMappingURL=invoice.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/invoice.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;EAQzB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBxB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AACnD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { nipSchema } from './helpers.js';
|
|
3
|
+
export const LineItemSchema = z.object({
|
|
4
|
+
lineNumber: z.number().int().positive(),
|
|
5
|
+
description: z.string().min(1),
|
|
6
|
+
unit: z.string().optional(),
|
|
7
|
+
quantity: z.number().positive().optional(),
|
|
8
|
+
unitNetPrice: z.number().int().optional(),
|
|
9
|
+
netAmount: z.number().int().positive(),
|
|
10
|
+
vatRate: z.number().int().min(0).max(100).optional(),
|
|
11
|
+
});
|
|
12
|
+
export const InvoiceSchema = z.object({
|
|
13
|
+
id: z.string().uuid(),
|
|
14
|
+
invoiceNumber: z.string().min(1),
|
|
15
|
+
sellerNIP: nipSchema,
|
|
16
|
+
buyerNIP: nipSchema.optional(),
|
|
17
|
+
grossAmount: z.number().int().nonnegative(),
|
|
18
|
+
netAmount: z.number().int().positive().optional(),
|
|
19
|
+
vatAmount: z.number().int().nonnegative().optional(),
|
|
20
|
+
currency: z.literal('PLN'),
|
|
21
|
+
issueDate: z.string().date(),
|
|
22
|
+
salesDate: z.string().date().optional(),
|
|
23
|
+
dueDate: z.string().date().optional(),
|
|
24
|
+
ksefReference: z.string().optional(),
|
|
25
|
+
sellerName: z.string().optional(),
|
|
26
|
+
buyerName: z.string().optional(),
|
|
27
|
+
description: z.string().optional(),
|
|
28
|
+
lineItems: z.array(LineItemSchema).optional(),
|
|
29
|
+
rawXml: z.string().optional(),
|
|
30
|
+
createdAt: z.string().datetime(),
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=invoice.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoice.schema.js","sourceRoot":"","sources":["../../src/schemas/invoice.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC1C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAChC,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS,CAAC,QAAQ,EAAE;IAC9B,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IAC3C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACjD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IACpD,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACvC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MatchSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
invoiceId: z.ZodString;
|
|
5
|
+
transactionId: z.ZodString;
|
|
6
|
+
transactionIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
7
|
+
confidence: z.ZodNumber;
|
|
8
|
+
passName: z.ZodString;
|
|
9
|
+
reasons: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
confirmed: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
createdAt: z.ZodString;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
confirmed: boolean;
|
|
14
|
+
id: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
invoiceId: string;
|
|
17
|
+
transactionId: string;
|
|
18
|
+
confidence: number;
|
|
19
|
+
passName: string;
|
|
20
|
+
reasons: string[];
|
|
21
|
+
transactionIds?: string[] | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
id: string;
|
|
24
|
+
createdAt: string;
|
|
25
|
+
invoiceId: string;
|
|
26
|
+
transactionId: string;
|
|
27
|
+
confidence: number;
|
|
28
|
+
passName: string;
|
|
29
|
+
reasons: string[];
|
|
30
|
+
confirmed?: boolean | undefined;
|
|
31
|
+
transactionIds?: string[] | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type Match = z.infer<typeof MatchSchema>;
|
|
34
|
+
//# sourceMappingURL=match.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/match.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUtB,CAAA;AAEF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export const MatchSchema = z.object({
|
|
3
|
+
id: z.string().uuid(),
|
|
4
|
+
invoiceId: z.string().uuid(),
|
|
5
|
+
transactionId: z.string().uuid(),
|
|
6
|
+
transactionIds: z.array(z.string().uuid()).optional(),
|
|
7
|
+
confidence: z.number().int().min(0).max(100),
|
|
8
|
+
passName: z.string(),
|
|
9
|
+
reasons: z.array(z.string()),
|
|
10
|
+
confirmed: z.boolean().default(false),
|
|
11
|
+
createdAt: z.string().datetime(),
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=match.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"match.schema.js","sourceRoot":"","sources":["../../src/schemas/match.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAChC,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,QAAQ,EAAE;IACrD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAA"}
|