bkper-js 1.0.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.
@@ -0,0 +1,719 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.Transaction = void 0;
36
+ const File_1 = require("./File");
37
+ const Account_1 = require("./Account");
38
+ const TransactionService = __importStar(require("../service/transaction-service"));
39
+ const Utils = __importStar(require("../utils"));
40
+ const Amount_1 = require("./Amount");
41
+ /**
42
+ *
43
+ * This class defines a Transaction between [credit and debit](http://en.wikipedia.org/wiki/Debits_and_credits) [[Accounts]].
44
+ *
45
+ * A Transaction is the main entity on the [Double Entry](http://en.wikipedia.org/wiki/Double-entry_bookkeeping_system) [Bookkeeping](http://en.wikipedia.org/wiki/Bookkeeping) system.
46
+ *
47
+ * @public
48
+ */
49
+ class Transaction {
50
+ /**
51
+ *
52
+ * @returns The wrapped plain json object
53
+ */
54
+ json() {
55
+ return this.wrapped;
56
+ }
57
+ /**
58
+ * @returns The id of the Transaction.
59
+ */
60
+ getId() {
61
+ return this.wrapped.id;
62
+ }
63
+ /**
64
+ * @returns The id of the agent that created this transaction
65
+ */
66
+ getAgentId() {
67
+ return this.wrapped.agentId;
68
+ }
69
+ /**
70
+ * Remote ids are used to avoid duplication.
71
+ *
72
+ * @returns The remote ids of the Transaction.
73
+ */
74
+ getRemoteIds() {
75
+ return this.wrapped.remoteIds;
76
+ }
77
+ /**
78
+ * Add a remote id to the Transaction.
79
+ *
80
+ * @param remoteId - The remote id to add.
81
+ *
82
+ * @returns This Transaction, for chainning.
83
+ */
84
+ addRemoteId(remoteId) {
85
+ if (this.wrapped.remoteIds == null) {
86
+ this.wrapped.remoteIds = [];
87
+ }
88
+ if (remoteId) {
89
+ this.wrapped.remoteIds.push(remoteId);
90
+ }
91
+ return this;
92
+ }
93
+ /**
94
+ * @returns True if transaction was already posted to the accounts. False if is still a Draft.
95
+ */
96
+ isPosted() {
97
+ return this.wrapped.posted;
98
+ }
99
+ /**
100
+ * @returns True if transaction is checked.
101
+ */
102
+ isChecked() {
103
+ return this.wrapped.checked;
104
+ }
105
+ /**
106
+ * Set the check state of the Transaction.
107
+ *
108
+ * @param checked - The check state.
109
+ *
110
+ * @returns This Transaction, for chainning.
111
+ */
112
+ setChecked(checked) {
113
+ this.wrapped.checked = checked;
114
+ return this;
115
+ }
116
+ /**
117
+ * @returns True if transaction is in trash.
118
+ */
119
+ isTrashed() {
120
+ return this.wrapped.trashed;
121
+ }
122
+ /**
123
+ * @returns All #hashtags used on the transaction.
124
+ */
125
+ getTags() {
126
+ return this.wrapped.tags;
127
+ }
128
+ /**
129
+ * @returns All urls of the transaction.
130
+ */
131
+ getUrls() {
132
+ return this.wrapped.urls;
133
+ }
134
+ /**
135
+ * Sets the Transaction urls. Url starts with https://
136
+ *
137
+ * @param urls - The urls array.
138
+ *
139
+ * @returns This Transaction, for chainning.
140
+ */
141
+ setUrls(urls) {
142
+ this.wrapped.urls = null;
143
+ if (urls) {
144
+ urls.forEach(url => {
145
+ this.addUrl(url);
146
+ });
147
+ }
148
+ return this;
149
+ }
150
+ /**
151
+ * Add a url to the Transaction. Url starts with https://
152
+ *
153
+ * @param url - The url to add.
154
+ *
155
+ * @returns This Transaction, for chainning.
156
+ */
157
+ addUrl(url) {
158
+ if (this.wrapped.urls == null) {
159
+ this.wrapped.urls = [];
160
+ }
161
+ if (url) {
162
+ this.wrapped.urls.push(url);
163
+ }
164
+ return this;
165
+ }
166
+ /**
167
+ * @returns The files attached to the transaction.
168
+ */
169
+ getFiles() {
170
+ if (this.wrapped.files && this.wrapped.files.length > 0) {
171
+ const files = Utils.wrapObjects(new File_1.File(), this.wrapped.files);
172
+ if (files != null) {
173
+ for (const file of files) {
174
+ file.book = this.book;
175
+ }
176
+ }
177
+ return files;
178
+ }
179
+ else {
180
+ return [];
181
+ }
182
+ }
183
+ /**
184
+ *
185
+ * Adds a file attachment to the Transaction.
186
+ *
187
+ * Files not previously created in the Book will be automatically created.
188
+ *
189
+ * @param file - The file to add
190
+ *
191
+ * @returns This Transaction, for chainning.
192
+ */
193
+ addFile(file) {
194
+ return __awaiter(this, void 0, void 0, function* () {
195
+ if (this.wrapped.files == null) {
196
+ this.wrapped.files = [];
197
+ }
198
+ //Make sure file is already created
199
+ if (file.getId() == null || file.book.getId() != this.book.getId()) {
200
+ file.book = this.book;
201
+ file = yield file.create();
202
+ }
203
+ this.wrapped.files.push(file.wrapped);
204
+ return this;
205
+ });
206
+ }
207
+ /**
208
+ * Check if the transaction has the specified tag.
209
+ */
210
+ hasTag(tag) {
211
+ var tags = this.getTags();
212
+ for (var i = 0; i < tags.length; i++) {
213
+ if (tags[i] == tag) {
214
+ return true;
215
+ }
216
+ }
217
+ return false;
218
+ }
219
+ /**
220
+ * Gets the custom properties stored in this Transaction.
221
+ */
222
+ getProperties() {
223
+ return this.wrapped.properties != null ? Object.assign({}, this.wrapped.properties) : {};
224
+ }
225
+ /**
226
+ * Sets the custom properties of the Transaction
227
+ *
228
+ * @param properties - Object with key/value pair properties
229
+ *
230
+ * @returns This Transaction, for chainning.
231
+ */
232
+ setProperties(properties) {
233
+ this.wrapped.properties = Object.assign({}, properties);
234
+ return this;
235
+ }
236
+ /**
237
+ * Gets the property value for given keys. First property found will be retrieved
238
+ *
239
+ * @param keys - The property key
240
+ */
241
+ getProperty(...keys) {
242
+ for (let index = 0; index < keys.length; index++) {
243
+ const key = keys[index];
244
+ let value = this.wrapped.properties != null ? this.wrapped.properties[key] : null;
245
+ if (value != null && value.trim() != '') {
246
+ return value;
247
+ }
248
+ }
249
+ return null;
250
+ }
251
+ /**
252
+ * Gets the custom properties keys stored in this Transaction.
253
+ */
254
+ getPropertyKeys() {
255
+ let properties = this.getProperties();
256
+ let propertyKeys = [];
257
+ if (properties) {
258
+ for (var key in properties) {
259
+ if (Object.prototype.hasOwnProperty.call(properties, key)) {
260
+ propertyKeys.push(key);
261
+ }
262
+ }
263
+ }
264
+ propertyKeys = propertyKeys.sort();
265
+ return propertyKeys;
266
+ }
267
+ /**
268
+ * Sets a custom property in the Transaction.
269
+ *
270
+ * @param key - The property key
271
+ * @param value - The property value
272
+ *
273
+ * @returns This Transaction, for chainning.
274
+ */
275
+ setProperty(key, value) {
276
+ if (key == null || key.trim() == '') {
277
+ return this;
278
+ }
279
+ if (this.wrapped.properties == null) {
280
+ this.wrapped.properties = {};
281
+ }
282
+ this.wrapped.properties[key] = value;
283
+ return this;
284
+ }
285
+ /**
286
+ * Delete a custom property
287
+ *
288
+ * @param key - The property key
289
+ *
290
+ * @returns This Transaction, for chainning.
291
+ */
292
+ deleteProperty(key) {
293
+ this.setProperty(key, null);
294
+ return this;
295
+ }
296
+ //ORIGIN ACCOUNT
297
+ /**
298
+ * @returns The credit account. The same as origin account.
299
+ */
300
+ getCreditAccount() {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ if (!this.wrapped.creditAccount) {
303
+ return null;
304
+ }
305
+ return yield this.book.getAccount(this.wrapped.creditAccount.id);
306
+ });
307
+ }
308
+ /**
309
+ * @returns The credit account name.
310
+ */
311
+ getCreditAccountName() {
312
+ return __awaiter(this, void 0, void 0, function* () {
313
+ if ((yield this.getCreditAccount()) != null) {
314
+ return (yield this.getCreditAccount()).getName();
315
+ }
316
+ else {
317
+ return "";
318
+ }
319
+ });
320
+ }
321
+ /**
322
+ *
323
+ * Sets the credit/origin Account of the Transaction. Same as from().
324
+ *
325
+ * @param account - Account id, name or object.
326
+ *
327
+ * @returns This Transaction, for chainning.
328
+ */
329
+ setCreditAccount(account) {
330
+ if (account instanceof Account_1.Account) {
331
+ if (account != null && account.getId() != null) {
332
+ this.wrapped.creditAccount = account.json();
333
+ }
334
+ }
335
+ else {
336
+ if (account != null && account.id != null) {
337
+ this.wrapped.creditAccount = account;
338
+ }
339
+ }
340
+ return this;
341
+ }
342
+ /**
343
+ *
344
+ * Sets the credit/origin Account of the Transaction. Same as setCreditAccount().
345
+ *
346
+ * @param account - Account id, name or object.
347
+ *
348
+ * @returns This Transaction, for chainning.
349
+ */
350
+ from(account) {
351
+ return this.setCreditAccount(account);
352
+ }
353
+ //DESTINATION ACCOUNT
354
+ /**
355
+ * @returns The debit account. The same as destination account.
356
+ *
357
+ */
358
+ getDebitAccount() {
359
+ return __awaiter(this, void 0, void 0, function* () {
360
+ if (!this.wrapped.debitAccount) {
361
+ return null;
362
+ }
363
+ return yield this.book.getAccount(this.wrapped.debitAccount.id);
364
+ });
365
+ }
366
+ /**
367
+ * @returns The debit account name.
368
+ */
369
+ getDebitAccountName() {
370
+ return __awaiter(this, void 0, void 0, function* () {
371
+ if ((yield this.getDebitAccount()) != null) {
372
+ return (yield this.getDebitAccount()).getName();
373
+ }
374
+ else {
375
+ return "";
376
+ }
377
+ });
378
+ }
379
+ /**
380
+ *
381
+ * Sets the debit/destination Account of the Transaction. Same as to().
382
+ *
383
+ * @param account - Account id, name or object.
384
+ *
385
+ * @returns This Transaction, for chainning.
386
+ */
387
+ setDebitAccount(account) {
388
+ if (account instanceof Account_1.Account) {
389
+ if (account != null && account.getId() != null) {
390
+ this.wrapped.debitAccount = account.json();
391
+ }
392
+ }
393
+ else {
394
+ if (account != null && account.id != null) {
395
+ this.wrapped.debitAccount = account;
396
+ }
397
+ }
398
+ return this;
399
+ }
400
+ /**
401
+ *
402
+ * Sets the debit/destination Account of the Transaction. Same as setDebitAccount().
403
+ *
404
+ * @param account - Account id, name or object.
405
+ *
406
+ * @returns This Transaction, for chainning.
407
+ */
408
+ to(account) {
409
+ return this.setDebitAccount(account);
410
+ }
411
+ //AMOUNT
412
+ /**
413
+ * @returns The amount of the transaction.
414
+ */
415
+ getAmount() {
416
+ return this.wrapped.amount != null && this.wrapped.amount.trim() != '' ? new Amount_1.Amount(this.wrapped.amount) : null;
417
+ }
418
+ /**
419
+ *
420
+ * Sets the amount of the Transaction.
421
+ *
422
+ * @returns This Transaction, for chainning.
423
+ */
424
+ setAmount(amount) {
425
+ if (typeof amount == "string") {
426
+ amount = Utils.parseValue(amount, this.book.getDecimalSeparator()) + '';
427
+ this.wrapped.amount = amount.toString();
428
+ return this;
429
+ }
430
+ amount = new Amount_1.Amount(amount);
431
+ if (amount.eq(0)) {
432
+ this.wrapped.amount = null;
433
+ return this;
434
+ }
435
+ this.wrapped.amount = amount.abs().toString();
436
+ return this;
437
+ }
438
+ /**
439
+ * Get the absolute amount of this transaction if the given account is at the credit side, else null.
440
+ *
441
+ * @param account - The account object, id or name.
442
+ */
443
+ getCreditAmount(account) {
444
+ return __awaiter(this, void 0, void 0, function* () {
445
+ let accountObject = yield this.getAccount_(account);
446
+ if (this.isCredit(accountObject)) {
447
+ return this.getAmount();
448
+ }
449
+ return null;
450
+ });
451
+ }
452
+ /**
453
+ * Gets the absolute amount of this transaction if the given account is at the debit side, else null.
454
+ *
455
+ * @param account - The account object, id or name.
456
+ */
457
+ getDebitAmount(account) {
458
+ return __awaiter(this, void 0, void 0, function* () {
459
+ let accountObject = yield this.getAccount_(account);
460
+ if (this.isDebit(accountObject)) {
461
+ return this.getAmount();
462
+ }
463
+ return null;
464
+ });
465
+ }
466
+ /**
467
+ * Gets the [[Account]] at the other side of the transaction given the one in one side.
468
+ *
469
+ * @param account - The account object, id or name.
470
+ */
471
+ getOtherAccount(account) {
472
+ return __awaiter(this, void 0, void 0, function* () {
473
+ let accountObject = yield this.getAccount_(account);
474
+ if (this.isCredit(accountObject)) {
475
+ return yield this.getDebitAccount();
476
+ }
477
+ if (this.isDebit(accountObject)) {
478
+ return yield this.getCreditAccount();
479
+ }
480
+ return null;
481
+ });
482
+ }
483
+ /**
484
+ *
485
+ * The account name at the other side of the transaction given the one in one side.
486
+ *
487
+ * @param account - The account object, id or name.
488
+ */
489
+ getOtherAccountName(account) {
490
+ return __awaiter(this, void 0, void 0, function* () {
491
+ var otherAccount = yield this.getOtherAccount(account);
492
+ if (otherAccount != null) {
493
+ return otherAccount.getName();
494
+ }
495
+ else {
496
+ return "";
497
+ }
498
+ });
499
+ }
500
+ /**
501
+ *
502
+ * Tell if the given account is credit on the transaction
503
+ *
504
+ * @param account - The account object
505
+ */
506
+ isCredit(account) {
507
+ return __awaiter(this, void 0, void 0, function* () {
508
+ return (yield this.getCreditAccount()) != null && account != null && (yield this.getCreditAccount()).getNormalizedName() == account.getNormalizedName();
509
+ });
510
+ }
511
+ /**
512
+ *
513
+ * Tell if the given account is debit on the transaction
514
+ *
515
+ * @param account - The account object
516
+ */
517
+ isDebit(account) {
518
+ return __awaiter(this, void 0, void 0, function* () {
519
+ return (yield this.getDebitAccount()) != null && account != null && (yield this.getDebitAccount()).getNormalizedName() == account.getNormalizedName();
520
+ });
521
+ }
522
+ /** @internal */
523
+ getAccount_(account) {
524
+ return __awaiter(this, void 0, void 0, function* () {
525
+ if (account == null || account instanceof Account_1.Account) {
526
+ return account;
527
+ }
528
+ return yield this.book.getAccount(account);
529
+ });
530
+ }
531
+ //DESCRIPTION
532
+ /**
533
+ * @returns The description of this transaction.
534
+ */
535
+ getDescription() {
536
+ if (this.wrapped.description == null) {
537
+ return "";
538
+ }
539
+ return this.wrapped.description;
540
+ }
541
+ /**
542
+ *
543
+ * Sets the description of the Transaction.
544
+ *
545
+ * @returns This Transaction, for chainning.
546
+ */
547
+ setDescription(description) {
548
+ this.wrapped.description = description;
549
+ return this;
550
+ }
551
+ //DATE
552
+ /**
553
+ * @returns The Transaction date, in ISO format yyyy-MM-dd.
554
+ */
555
+ getDate() {
556
+ return this.wrapped.date;
557
+ }
558
+ /**
559
+ *
560
+ * Sets the date of the Transaction.
561
+ *
562
+ * @returns This Transaction, for chainning
563
+ */
564
+ setDate(date) {
565
+ if (typeof date == "string") {
566
+ if (date.indexOf('/') > 0) {
567
+ let dateObject = Utils.parseDate(date, this.book.getDatePattern(), this.book.getTimeZone());
568
+ this.wrapped.date = Utils.formatDateISO(dateObject, this.book.getTimeZone());
569
+ }
570
+ else if (date.indexOf('-')) {
571
+ this.wrapped.date = date;
572
+ }
573
+ }
574
+ else if (Object.prototype.toString.call(date) === '[object Date]') {
575
+ this.wrapped.date = Utils.formatDateISO(date, this.book.getTimeZone());
576
+ }
577
+ return this;
578
+ }
579
+ /**
580
+ * @returns The Transaction Date object, on the time zone of the [[Book]].
581
+ */
582
+ getDateObject() {
583
+ return Utils.convertValueToDate(this.getDateValue(), this.book.getTimeZoneOffset());
584
+ }
585
+ /**
586
+ * @returns The Transaction date number, in format YYYYMMDD.
587
+ */
588
+ getDateValue() {
589
+ return this.wrapped.dateValue;
590
+ }
591
+ /**
592
+ * @returns The Transaction date, formatted on the date pattern of the [[Book]].
593
+ */
594
+ getDateFormatted() {
595
+ return this.wrapped.dateFormatted;
596
+ }
597
+ /**
598
+ * @returns The date the transaction was created.
599
+ */
600
+ getCreatedAt() {
601
+ return new Date(new Number(this.wrapped.createdAt).valueOf());
602
+ }
603
+ /**
604
+ * @returns The date the transaction was created, formatted according to the date pattern of [[Book]].
605
+ */
606
+ getCreatedAtFormatted() {
607
+ return Utils.formatDate(this.getCreatedAt(), this.book.getTimeZone(), this.book.getDatePattern() + " HH:mm:ss");
608
+ }
609
+ //EVOLVED BALANCES
610
+ /** @internal */
611
+ getCaEvolvedBalance_() {
612
+ return this.wrapped.creditAccount != null && this.wrapped.creditAccount.balance != null ? new Amount_1.Amount(this.wrapped.creditAccount.balance) : null;
613
+ }
614
+ /** @internal */
615
+ getDaEvolvedBalance_() {
616
+ return this.wrapped.debitAccount != null && this.wrapped.debitAccount.balance != null ? new Amount_1.Amount(this.wrapped.debitAccount.balance) : null;
617
+ }
618
+ /**
619
+ * Gets the balance that the [[Account]] has at that day, when listing transactions of that Account.
620
+ *
621
+ * Evolved balances is returned when searching for transactions of a permanent [[Account]].
622
+ *
623
+ * Only comes with the last posted transaction of the day.
624
+ *
625
+ * @param raw - True to get the raw balance, no matter the credit nature of the [[Account]].
626
+ */
627
+ getAccountBalance(raw) {
628
+ return __awaiter(this, void 0, void 0, function* () {
629
+ var accountBalance = this.getCaEvolvedBalance_();
630
+ var isCa = true;
631
+ if (accountBalance == null) {
632
+ accountBalance = this.getDaEvolvedBalance_();
633
+ isCa = false;
634
+ }
635
+ if (accountBalance != null) {
636
+ if (!raw) {
637
+ var account = isCa ? yield this.getCreditAccount() : yield this.getDebitAccount();
638
+ accountBalance = Utils.getRepresentativeValue(accountBalance, account.isCredit());
639
+ }
640
+ return Utils.round(accountBalance, this.book.getFractionDigits());
641
+ }
642
+ else {
643
+ return null;
644
+ }
645
+ });
646
+ }
647
+ /**
648
+ * Perform create new draft transaction.
649
+ */
650
+ create() {
651
+ return __awaiter(this, void 0, void 0, function* () {
652
+ let operation = yield TransactionService.createTransaction(this.book.getId(), this.wrapped);
653
+ this.wrapped = operation.transaction;
654
+ return this;
655
+ });
656
+ }
657
+ /**
658
+ * Upddate transaction, applying pending changes.
659
+ */
660
+ update() {
661
+ return __awaiter(this, void 0, void 0, function* () {
662
+ let operation = yield TransactionService.updateTransaction(this.book.getId(), this.wrapped);
663
+ this.wrapped = operation.transaction;
664
+ return this;
665
+ });
666
+ }
667
+ /**
668
+ * Perform check transaction.
669
+ */
670
+ check() {
671
+ return __awaiter(this, void 0, void 0, function* () {
672
+ let operation = yield TransactionService.checkTransaction(this.book.getId(), this.wrapped);
673
+ this.wrapped.checked = operation.transaction.checked;
674
+ return this;
675
+ });
676
+ }
677
+ /**
678
+ * Perform uncheck transaction.
679
+ */
680
+ uncheck() {
681
+ return __awaiter(this, void 0, void 0, function* () {
682
+ let operation = yield TransactionService.uncheckTransaction(this.book.getId(), this.wrapped);
683
+ this.wrapped.checked = operation.transaction.checked;
684
+ return this;
685
+ });
686
+ }
687
+ /**
688
+ * Perform post transaction, changing credit and debit [[Account]] balances.
689
+ */
690
+ post() {
691
+ return __awaiter(this, void 0, void 0, function* () {
692
+ let operation = yield TransactionService.postTransaction(this.book.getId(), this.wrapped);
693
+ this.wrapped = operation.transaction;
694
+ return this;
695
+ });
696
+ }
697
+ /**
698
+ * Remove the transaction, sending to trash.
699
+ */
700
+ remove() {
701
+ return __awaiter(this, void 0, void 0, function* () {
702
+ let operation = yield TransactionService.trashTransaction(this.book.getId(), this.wrapped);
703
+ this.wrapped.trashed = operation.transaction.trashed;
704
+ return this;
705
+ });
706
+ }
707
+ /**
708
+ * Restore the transaction from trash.
709
+ */
710
+ restore() {
711
+ return __awaiter(this, void 0, void 0, function* () {
712
+ let operation = yield TransactionService.restoreTransaction(this.book.getId(), this.wrapped);
713
+ this.wrapped.trashed = operation.transaction.trashed;
714
+ return this;
715
+ });
716
+ }
717
+ }
718
+ exports.Transaction = Transaction;
719
+ //# sourceMappingURL=Transaction.js.map