bkper 4.12.31 → 4.13.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/README.md +4 -1
- package/lib/auth/local-auth-service.d.ts.map +1 -1
- package/lib/auth/local-auth-service.js +83 -66
- package/lib/auth/local-auth-service.js.map +1 -1
- package/lib/cli.js +2 -0
- package/lib/cli.js.map +1 -1
- package/lib/commands/cli-helpers.d.ts +4 -0
- package/lib/commands/cli-helpers.d.ts.map +1 -1
- package/lib/commands/cli-helpers.js +8 -2
- package/lib/commands/cli-helpers.js.map +1 -1
- package/lib/commands/files/get.d.ts +14 -0
- package/lib/commands/files/get.d.ts.map +1 -0
- package/lib/commands/files/get.js +34 -0
- package/lib/commands/files/get.js.map +1 -0
- package/lib/commands/files/index.d.ts +3 -0
- package/lib/commands/files/index.d.ts.map +1 -0
- package/lib/commands/files/index.js +3 -0
- package/lib/commands/files/index.js.map +1 -0
- package/lib/commands/files/register.d.ts +3 -0
- package/lib/commands/files/register.d.ts.map +1 -0
- package/lib/commands/files/register.js +42 -0
- package/lib/commands/files/register.js.map +1 -0
- package/lib/commands/files/upload.d.ts +18 -0
- package/lib/commands/files/upload.d.ts.map +1 -0
- package/lib/commands/files/upload.js +94 -0
- package/lib/commands/files/upload.js.map +1 -0
- package/lib/commands/transactions/create.d.ts +9 -0
- package/lib/commands/transactions/create.d.ts.map +1 -1
- package/lib/commands/transactions/create.js +30 -1
- package/lib/commands/transactions/create.js.map +1 -1
- package/lib/commands/transactions/index.d.ts +2 -2
- package/lib/commands/transactions/index.d.ts.map +1 -1
- package/lib/commands/transactions/index.js +1 -1
- package/lib/commands/transactions/index.js.map +1 -1
- package/lib/commands/transactions/merge.d.ts +7 -12
- package/lib/commands/transactions/merge.d.ts.map +1 -1
- package/lib/commands/transactions/merge.js +7 -34
- package/lib/commands/transactions/merge.js.map +1 -1
- package/lib/commands/transactions/register.d.ts.map +1 -1
- package/lib/commands/transactions/register.js +7 -13
- package/lib/commands/transactions/register.js.map +1 -1
- package/lib/docs/bkper-js.md +1 -1
- package/lib/docs/cli-reference.md +4 -1
- package/lib/docs/data-management.md +45 -1
- package/lib/docs/index.md +2 -2
- package/lib/utils/local-file.d.ts +11 -0
- package/lib/utils/local-file.d.ts.map +1 -0
- package/lib/utils/local-file.js +55 -0
- package/lib/utils/local-file.js.map +1 -0
- package/package.json +3 -2
- package/lib/domain/transaction/merge-operation.d.ts +0 -48
- package/lib/domain/transaction/merge-operation.d.ts.map +0 -1
- package/lib/domain/transaction/merge-operation.js +0 -194
- package/lib/domain/transaction/merge-operation.js.map +0 -1
- package/lib/domain/transaction/merge-types.d.ts +0 -25
- package/lib/domain/transaction/merge-types.d.ts.map +0 -1
- package/lib/domain/transaction/merge-types.js +0 -8
- package/lib/domain/transaction/merge-types.js.map +0 -1
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transaction Merge Operation - Domain Logic
|
|
3
|
-
*
|
|
4
|
-
* Pure business logic for merging two transactions into one.
|
|
5
|
-
* This class contains no dependencies on MCP, HTTP, or other infrastructure concerns.
|
|
6
|
-
* It operates on Transaction domain objects from bkper-js.
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* Represents the result of a transaction merge operation
|
|
10
|
-
*
|
|
11
|
-
* Determines which transaction to keep (edit) vs discard (revert),
|
|
12
|
-
* then intelligently merges data from both transactions.
|
|
13
|
-
*/
|
|
14
|
-
export class TransactionMergeOperation {
|
|
15
|
-
constructor(book, transaction1, transaction2) {
|
|
16
|
-
var _a, _b;
|
|
17
|
-
this.book = book;
|
|
18
|
-
this.record = null;
|
|
19
|
-
// Determine which transaction to edit vs revert based on priority rules
|
|
20
|
-
const tx1IsPosted = (_a = transaction1.isPosted()) !== null && _a !== void 0 ? _a : false;
|
|
21
|
-
const tx2IsPosted = (_b = transaction2.isPosted()) !== null && _b !== void 0 ? _b : false;
|
|
22
|
-
// Rule 1: Prefer posted transactions over drafts
|
|
23
|
-
if (!tx1IsPosted && tx2IsPosted) {
|
|
24
|
-
this.revertTransaction = transaction1;
|
|
25
|
-
this.editTransaction = transaction2;
|
|
26
|
-
}
|
|
27
|
-
else if (tx1IsPosted && !tx2IsPosted) {
|
|
28
|
-
this.revertTransaction = transaction2;
|
|
29
|
-
this.editTransaction = transaction1;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
// Rule 2: If both same status, prefer newer transaction (higher createdAt)
|
|
33
|
-
const tx1Created = transaction1.getCreatedAt().getTime();
|
|
34
|
-
const tx2Created = transaction2.getCreatedAt().getTime();
|
|
35
|
-
if (tx1Created < tx2Created) {
|
|
36
|
-
this.revertTransaction = transaction1;
|
|
37
|
-
this.editTransaction = transaction2;
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.revertTransaction = transaction2;
|
|
41
|
-
this.editTransaction = transaction1;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
this.mergedData = this.merge();
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Merges data from both transactions into a single transaction data object
|
|
48
|
-
* @returns Merged transaction data
|
|
49
|
-
*/
|
|
50
|
-
merge() {
|
|
51
|
-
// Start with edit transaction's JSON data as base
|
|
52
|
-
const merged = Object.assign({}, this.editTransaction.json());
|
|
53
|
-
// Merge description using Transaction wrapper
|
|
54
|
-
const editDescription = this.editTransaction.getDescription();
|
|
55
|
-
const revertDescription = this.revertTransaction.getDescription();
|
|
56
|
-
merged.description = this.mergeDescription(editDescription || null, revertDescription || null);
|
|
57
|
-
// Merge files using Transaction wrapper
|
|
58
|
-
const editFiles = this.editTransaction.getFiles() || [];
|
|
59
|
-
const revertFiles = this.revertTransaction.getFiles() || [];
|
|
60
|
-
const mergedFiles = [...editFiles.map(f => f.json()), ...revertFiles.map(f => f.json())];
|
|
61
|
-
merged.files = mergedFiles;
|
|
62
|
-
// Keep "attachments" for backward compatibility with test fixtures
|
|
63
|
-
merged.attachments = mergedFiles;
|
|
64
|
-
// Merge remote IDs using Transaction wrapper
|
|
65
|
-
const editRemoteIds = this.editTransaction.getRemoteIds();
|
|
66
|
-
const revertRemoteIds = this.revertTransaction.getRemoteIds();
|
|
67
|
-
merged.remoteIds = [...new Set([...editRemoteIds, ...revertRemoteIds])];
|
|
68
|
-
// Merge URLs using Transaction wrapper
|
|
69
|
-
const editUrls = this.editTransaction.getUrls();
|
|
70
|
-
const revertUrls = this.revertTransaction.getUrls();
|
|
71
|
-
merged.urls = [...new Set([...editUrls, ...revertUrls])];
|
|
72
|
-
// Merge properties using Transaction wrapper (revert overwrites edit)
|
|
73
|
-
const editProperties = this.editTransaction.getProperties();
|
|
74
|
-
const revertProperties = this.revertTransaction.getProperties();
|
|
75
|
-
merged.properties = Object.assign(Object.assign({}, editProperties), revertProperties);
|
|
76
|
-
// Backfill credit account - get from revert if edit doesn't have it
|
|
77
|
-
const editData = this.editTransaction.json();
|
|
78
|
-
const revertData = this.revertTransaction.json();
|
|
79
|
-
if (!editData.creditAccount && !editData.creditAccountId) {
|
|
80
|
-
if (revertData.creditAccount)
|
|
81
|
-
merged.creditAccount = revertData.creditAccount;
|
|
82
|
-
const revertCompat = revertData;
|
|
83
|
-
if (revertCompat.creditAccountId)
|
|
84
|
-
merged.creditAccountId = revertCompat.creditAccountId;
|
|
85
|
-
}
|
|
86
|
-
// Backfill debit account - get from revert if edit doesn't have it
|
|
87
|
-
if (!editData.debitAccount && !editData.debitAccountId) {
|
|
88
|
-
if (revertData.debitAccount)
|
|
89
|
-
merged.debitAccount = revertData.debitAccount;
|
|
90
|
-
const revertCompat = revertData;
|
|
91
|
-
if (revertCompat.debitAccountId)
|
|
92
|
-
merged.debitAccountId = revertCompat.debitAccountId;
|
|
93
|
-
}
|
|
94
|
-
// Handle amount validation and merging using Transaction wrapper
|
|
95
|
-
const editAmount = this.editTransaction.getAmount();
|
|
96
|
-
const revertAmount = this.revertTransaction.getAmount();
|
|
97
|
-
if (editAmount && revertAmount) {
|
|
98
|
-
// Both have amounts - check if they differ
|
|
99
|
-
if (editAmount.cmp(revertAmount) !== 0) {
|
|
100
|
-
// Amounts differ - create audit record and keep edit's amount
|
|
101
|
-
const editDate = this.editTransaction.getDate();
|
|
102
|
-
const revertDate = this.revertTransaction.getDate();
|
|
103
|
-
const diff = editAmount.minus(revertAmount);
|
|
104
|
-
this.record = `Merged on ${editDate} with amount diff: ${diff.toString()} (edit: ${editAmount.toString()}, reverted: ${revertAmount.toString()} on ${revertDate})`;
|
|
105
|
-
}
|
|
106
|
-
// Keep edit's amount (already in merged from editTransaction.json())
|
|
107
|
-
}
|
|
108
|
-
else if (!editAmount && revertAmount) {
|
|
109
|
-
// Edit has no amount, use revert's amount
|
|
110
|
-
merged.amount = revertAmount.toString();
|
|
111
|
-
}
|
|
112
|
-
// If edit has amount and revert doesn't, keep edit's amount (already in merged)
|
|
113
|
-
return merged;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Merges two descriptions intelligently, avoiding duplicate words
|
|
117
|
-
* @param desc1 First description (from edit transaction)
|
|
118
|
-
* @param desc2 Second description (from revert transaction)
|
|
119
|
-
* @returns Merged description with unique words
|
|
120
|
-
*/
|
|
121
|
-
mergeDescription(desc1, desc2) {
|
|
122
|
-
if (!desc1)
|
|
123
|
-
return desc2 || '';
|
|
124
|
-
if (!desc2)
|
|
125
|
-
return desc1;
|
|
126
|
-
const desc1Lower = desc1.toLowerCase();
|
|
127
|
-
const words = desc2
|
|
128
|
-
.split(TransactionMergeOperation.WORD_SPLITTER)
|
|
129
|
-
.filter(word => word.length > 0);
|
|
130
|
-
const uniqueWords = words.filter(word => !desc1Lower.includes(word.toLowerCase()));
|
|
131
|
-
return this.trim(desc1 + ' ' + uniqueWords.join(' '));
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Trims and normalizes whitespace in text
|
|
135
|
-
* @param text Text to trim
|
|
136
|
-
* @returns Trimmed text with normalized whitespace
|
|
137
|
-
*/
|
|
138
|
-
trim(text) {
|
|
139
|
-
return text.trim().replace(/\s+/g, ' ');
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Apply the merged data to the edit transaction
|
|
143
|
-
* This mutates the edit transaction object with the merged data
|
|
144
|
-
*/
|
|
145
|
-
applyMergedData() {
|
|
146
|
-
var _a;
|
|
147
|
-
const edit = this.editTransaction;
|
|
148
|
-
const merged = this.mergedData;
|
|
149
|
-
// Set description (ensure it's a string)
|
|
150
|
-
if (merged.description !== undefined) {
|
|
151
|
-
edit.setDescription(merged.description);
|
|
152
|
-
}
|
|
153
|
-
// Set properties
|
|
154
|
-
if (merged.properties) {
|
|
155
|
-
edit.setProperties(merged.properties);
|
|
156
|
-
}
|
|
157
|
-
// Set URLs
|
|
158
|
-
if (merged.urls && merged.urls.length > 0) {
|
|
159
|
-
edit.setUrls(merged.urls);
|
|
160
|
-
}
|
|
161
|
-
// Set amount if changed
|
|
162
|
-
if (merged.amount) {
|
|
163
|
-
edit.setAmount(merged.amount);
|
|
164
|
-
}
|
|
165
|
-
// Set credit account if changed
|
|
166
|
-
if (merged.creditAccount) {
|
|
167
|
-
edit.setCreditAccount(merged.creditAccount);
|
|
168
|
-
}
|
|
169
|
-
// Set debit account if changed
|
|
170
|
-
if (merged.debitAccount) {
|
|
171
|
-
edit.setDebitAccount(merged.debitAccount);
|
|
172
|
-
}
|
|
173
|
-
// Add remote IDs
|
|
174
|
-
const currentRemoteIds = edit.getRemoteIds();
|
|
175
|
-
if (merged.remoteIds) {
|
|
176
|
-
merged.remoteIds.forEach((remoteId) => {
|
|
177
|
-
if (!currentRemoteIds.includes(remoteId)) {
|
|
178
|
-
edit.addRemoteId(remoteId);
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
}
|
|
182
|
-
// Add files
|
|
183
|
-
if (merged.files && merged.files.length > (((_a = this.editTransaction.getFiles()) === null || _a === void 0 ? void 0 : _a.length) || 0)) {
|
|
184
|
-
const currentFiles = this.editTransaction.getFiles() || [];
|
|
185
|
-
const newFiles = merged.files.slice(currentFiles.length);
|
|
186
|
-
newFiles.forEach((file) => {
|
|
187
|
-
// addFile expects File class but accepts raw bkper.File in practice
|
|
188
|
-
edit.addFile(file);
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
TransactionMergeOperation.WORD_SPLITTER = /[ \-_]+/;
|
|
194
|
-
//# sourceMappingURL=merge-operation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-operation.js","sourceRoot":"","sources":["../../../src/domain/transaction/merge-operation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH;;;;;GAKG;AACH,MAAM,OAAO,yBAAyB;IAQlC,YACY,IAAU,EAClB,YAAyB,EACzB,YAAyB;;QAFjB,SAAI,GAAJ,IAAI,CAAM;QALf,WAAM,GAAkB,IAAI,CAAC;QAShC,wEAAwE;QACxE,MAAM,WAAW,GAAG,MAAA,YAAY,CAAC,QAAQ,EAAE,mCAAI,KAAK,CAAC;QACrD,MAAM,WAAW,GAAG,MAAA,YAAY,CAAC,QAAQ,EAAE,mCAAI,KAAK,CAAC;QAErD,iDAAiD;QACjD,IAAI,CAAC,WAAW,IAAI,WAAW,EAAE,CAAC;YAC9B,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;YACtC,IAAI,CAAC,eAAe,GAAG,YAAY,CAAC;QACxC,CAAC;aAAM,IAAI,WAAW,IAAI,CAAC,WAAW,EAAE,CAAC;YACrC,IAAI,CAAC,iBAAiB,GAAG,YAAY,CAAC;YACtC,IAAI,CAAC,eAAe,GAAG,YAAY,CAAC;QACxC,CAAC;aAAM,CAAC;YACJ,2EAA2E;YAC3E,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC;YACzD,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC;YAEzD,IAAI,UAAU,GAAG,UAAU,EAAE,CAA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,CAAC;YAC7D,CAAC,CAAC,CAAC;QACP,CAAC;IACL,CAAC;;AA3MuB,uCAAa,GAAG,SAAS,AAAZ,CAAa"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Domain types for transaction merge operations
|
|
3
|
-
*
|
|
4
|
-
* These types represent the core business domain for merging transactions,
|
|
5
|
-
* independent of any specific API or protocol (MCP, REST, etc.)
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Merged transaction data that extends the base bkper.Transaction type
|
|
9
|
-
* with compatibility fields for legacy systems and test fixtures
|
|
10
|
-
*/
|
|
11
|
-
export interface MergedTransactionData extends bkper.Transaction {
|
|
12
|
-
/**
|
|
13
|
-
* Compatibility field: alias for 'files' used in test fixtures
|
|
14
|
-
*/
|
|
15
|
-
attachments?: bkper.File[];
|
|
16
|
-
/**
|
|
17
|
-
* Compatibility field: ID-only version of creditAccount for legacy systems
|
|
18
|
-
*/
|
|
19
|
-
creditAccountId?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Compatibility field: ID-only version of debitAccount for legacy systems
|
|
22
|
-
*/
|
|
23
|
-
debitAccountId?: string;
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=merge-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-types.d.ts","sourceRoot":"","sources":["../../../src/domain/transaction/merge-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,WAAW;IAC5D;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IAC3B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge-types.js","sourceRoot":"","sources":["../../../src/domain/transaction/merge-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|