@luca-financial/luca-schema 3.2.0 → 3.3.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/CHANGELOG.md +12 -0
- package/README.md +18 -1
- package/dist/esm/index.d.ts +114 -18
- package/dist/esm/index.js +3 -0
- package/dist/esm/lucaValidator.js +4 -0
- package/dist/esm/schemas/enums.json +1 -0
- package/dist/esm/schemas/index.js +3 -0
- package/dist/esm/schemas/lucaSchema.json +8 -0
- package/dist/esm/schemas/recurringTransactionLink.json +31 -0
- package/dist/index.d.ts +114 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.3.0] - 2026-04-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Add support for linking related recurring transactions with a new `recurringTransactionLink` schema.
|
|
13
|
+
- Add optional `recurringTransactionLinks` support to the aggregate Luca Schema, schema exports, enums, validator metadata, generated types, and bundled example data.
|
|
14
|
+
- Add validation coverage for recurring transaction links in both entity-level and aggregate/example tests.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Update README and example documentation to describe recurring transaction links and their scheduled-transfer use cases.
|
|
19
|
+
|
|
8
20
|
## [3.2.0] - 2026-04-04
|
|
9
21
|
|
|
10
22
|
### Added
|
package/README.md
CHANGED
|
@@ -210,6 +210,22 @@ const transactionSplit = {
|
|
|
210
210
|
};
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
+
### RecurringTransactionLink
|
|
214
|
+
|
|
215
|
+
Validates links between related recurring transactions, such as scheduled transfer legs recorded in separate accounts.
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
const recurringTransactionLink = {
|
|
219
|
+
id: string;
|
|
220
|
+
sourceRecurringTransactionId: string;
|
|
221
|
+
destinationRecurringTransactionId: string;
|
|
222
|
+
createdAt: string;
|
|
223
|
+
updatedAt: string | null;
|
|
224
|
+
deletedAt?: string | null;
|
|
225
|
+
version?: number;
|
|
226
|
+
};
|
|
227
|
+
```
|
|
228
|
+
|
|
213
229
|
### TransactionLink
|
|
214
230
|
|
|
215
231
|
Validates links between related transactions, such as transfers recorded in separate accounts.
|
|
@@ -240,6 +256,7 @@ const lucaSchema = {
|
|
|
240
256
|
statements: Statement[];
|
|
241
257
|
recurringTransactions: RecurringTransaction[];
|
|
242
258
|
recurringTransactionEvents: RecurringTransactionEvent[];
|
|
259
|
+
recurringTransactionLinks?: RecurringTransactionLink[];
|
|
243
260
|
transactions: Transaction[];
|
|
244
261
|
transactionLinks?: TransactionLink[];
|
|
245
262
|
transactionSplits: TransactionSplit[];
|
|
@@ -270,7 +287,7 @@ import {
|
|
|
270
287
|
- `validate(schemaKey, data)` → `{ valid: boolean, errors: AjvError[] }`
|
|
271
288
|
- `validateCollection(schemaKey, array)` → `{ valid: boolean, errors: [{ index, entity, errors }] }`
|
|
272
289
|
- `getDateFieldPaths(schemaKey)` → `string[]` of `format: date` fields for a schema key
|
|
273
|
-
- `getDateFieldPathsByCollection()` → `{ accounts, categories, statements, recurringTransactions, recurringTransactionEvents, transactions, transactionLinks, transactionSplits }`
|
|
290
|
+
- `getDateFieldPathsByCollection()` → `{ accounts, categories, statements, recurringTransactions, recurringTransactionEvents, recurringTransactionLinks, transactions, transactionLinks, transactionSplits }`
|
|
274
291
|
- `getValidFields(schemaKey)` → `Set<string>` of all fields (includes common fields when applicable)
|
|
275
292
|
- `getRequiredFields(schemaKey)` → `Set<string>` of required fields (includes common required fields)
|
|
276
293
|
- `stripInvalidFields(schemaKey, data)` → new object with only schema-defined keys
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -526,7 +526,42 @@ export type RecurringTransactionID = string;
|
|
|
526
526
|
* The date when the occurrence is expected.
|
|
527
527
|
*/
|
|
528
528
|
export type ExpectedDate = string;
|
|
529
|
-
|
|
529
|
+
/**
|
|
530
|
+
* Links two related recurring transactions, such as mirrored transfer schedules recorded in separate accounts.
|
|
531
|
+
*/
|
|
532
|
+
export type RecurringTransactionLink = Common5 & {
|
|
533
|
+
sourceRecurringTransactionId: SourceRecurringTransactionID;
|
|
534
|
+
destinationRecurringTransactionId: DestinationRecurringTransactionID;
|
|
535
|
+
};
|
|
536
|
+
/**
|
|
537
|
+
* UUID for the item
|
|
538
|
+
*/
|
|
539
|
+
export type ID5 = string;
|
|
540
|
+
/**
|
|
541
|
+
* The timestamp of the creation of the item
|
|
542
|
+
*/
|
|
543
|
+
export type DateCreated5 = string;
|
|
544
|
+
/**
|
|
545
|
+
* The timestamp of the last update or null if the item has not been updated yet
|
|
546
|
+
*/
|
|
547
|
+
export type LastUpdated5 = string | null;
|
|
548
|
+
/**
|
|
549
|
+
* The timestamp of when the item was soft-deleted
|
|
550
|
+
*/
|
|
551
|
+
export type DateDeleted5 = string | null;
|
|
552
|
+
/**
|
|
553
|
+
* Version number for optimistic concurrency control
|
|
554
|
+
*/
|
|
555
|
+
export type Version5 = number;
|
|
556
|
+
/**
|
|
557
|
+
* UUID of the source recurring transaction in the link.
|
|
558
|
+
*/
|
|
559
|
+
export type SourceRecurringTransactionID = string;
|
|
560
|
+
/**
|
|
561
|
+
* UUID of the destination recurring transaction in the link.
|
|
562
|
+
*/
|
|
563
|
+
export type DestinationRecurringTransactionID = string;
|
|
564
|
+
export type Transaction = Common6 & {
|
|
530
565
|
accountId: AccountID2;
|
|
531
566
|
date: Date;
|
|
532
567
|
authorizedAt?: AuthorizedAt;
|
|
@@ -556,23 +591,23 @@ export type Transaction = Common5 & {
|
|
|
556
591
|
/**
|
|
557
592
|
* UUID for the item
|
|
558
593
|
*/
|
|
559
|
-
export type
|
|
594
|
+
export type ID6 = string;
|
|
560
595
|
/**
|
|
561
596
|
* The timestamp of the creation of the item
|
|
562
597
|
*/
|
|
563
|
-
export type
|
|
598
|
+
export type DateCreated6 = string;
|
|
564
599
|
/**
|
|
565
600
|
* The timestamp of the last update or null if the item has not been updated yet
|
|
566
601
|
*/
|
|
567
|
-
export type
|
|
602
|
+
export type LastUpdated6 = string | null;
|
|
568
603
|
/**
|
|
569
604
|
* The timestamp of when the item was soft-deleted
|
|
570
605
|
*/
|
|
571
|
-
export type
|
|
606
|
+
export type DateDeleted6 = string | null;
|
|
572
607
|
/**
|
|
573
608
|
* Version number for optimistic concurrency control
|
|
574
609
|
*/
|
|
575
|
-
export type
|
|
610
|
+
export type Version6 = number;
|
|
576
611
|
/**
|
|
577
612
|
* ID of the account this transaction belongs to
|
|
578
613
|
*/
|
|
@@ -620,30 +655,30 @@ export type AggregationServiceID1 = string | null;
|
|
|
620
655
|
/**
|
|
621
656
|
* Links two related transactions, such as transfer legs recorded in separate accounts.
|
|
622
657
|
*/
|
|
623
|
-
export type TransactionLink =
|
|
658
|
+
export type TransactionLink = Common7 & {
|
|
624
659
|
sourceTransactionId: SourceTransactionID;
|
|
625
660
|
destinationTransactionId: DestinationTransactionID;
|
|
626
661
|
};
|
|
627
662
|
/**
|
|
628
663
|
* UUID for the item
|
|
629
664
|
*/
|
|
630
|
-
export type
|
|
665
|
+
export type ID7 = string;
|
|
631
666
|
/**
|
|
632
667
|
* The timestamp of the creation of the item
|
|
633
668
|
*/
|
|
634
|
-
export type
|
|
669
|
+
export type DateCreated7 = string;
|
|
635
670
|
/**
|
|
636
671
|
* The timestamp of the last update or null if the item has not been updated yet
|
|
637
672
|
*/
|
|
638
|
-
export type
|
|
673
|
+
export type LastUpdated7 = string | null;
|
|
639
674
|
/**
|
|
640
675
|
* The timestamp of when the item was soft-deleted
|
|
641
676
|
*/
|
|
642
|
-
export type
|
|
677
|
+
export type DateDeleted7 = string | null;
|
|
643
678
|
/**
|
|
644
679
|
* Version number for optimistic concurrency control
|
|
645
680
|
*/
|
|
646
|
-
export type
|
|
681
|
+
export type Version7 = number;
|
|
647
682
|
/**
|
|
648
683
|
* UUID of the source transaction in the link.
|
|
649
684
|
*/
|
|
@@ -655,7 +690,7 @@ export type DestinationTransactionID = string;
|
|
|
655
690
|
/**
|
|
656
691
|
* Defines a split within a transaction.
|
|
657
692
|
*/
|
|
658
|
-
export type TransactionSplit =
|
|
693
|
+
export type TransactionSplit = Common8 & {
|
|
659
694
|
transactionId: TransactionID;
|
|
660
695
|
amount: Amount2;
|
|
661
696
|
categoryId: CategoryID2;
|
|
@@ -665,23 +700,23 @@ export type TransactionSplit = Common7 & {
|
|
|
665
700
|
/**
|
|
666
701
|
* UUID for the item
|
|
667
702
|
*/
|
|
668
|
-
export type
|
|
703
|
+
export type ID8 = string;
|
|
669
704
|
/**
|
|
670
705
|
* The timestamp of the creation of the item
|
|
671
706
|
*/
|
|
672
|
-
export type
|
|
707
|
+
export type DateCreated8 = string;
|
|
673
708
|
/**
|
|
674
709
|
* The timestamp of the last update or null if the item has not been updated yet
|
|
675
710
|
*/
|
|
676
|
-
export type
|
|
711
|
+
export type LastUpdated8 = string | null;
|
|
677
712
|
/**
|
|
678
713
|
* The timestamp of when the item was soft-deleted
|
|
679
714
|
*/
|
|
680
|
-
export type
|
|
715
|
+
export type DateDeleted8 = string | null;
|
|
681
716
|
/**
|
|
682
717
|
* Version number for optimistic concurrency control
|
|
683
718
|
*/
|
|
684
|
-
export type
|
|
719
|
+
export type Version8 = number;
|
|
685
720
|
/**
|
|
686
721
|
* The identifier of the parent transaction.
|
|
687
722
|
*/
|
|
@@ -731,6 +766,10 @@ export interface LucaSchema {
|
|
|
731
766
|
* List of recurring transaction events
|
|
732
767
|
*/
|
|
733
768
|
recurringTransactionEvents: RecurringTransactionEvent[];
|
|
769
|
+
/**
|
|
770
|
+
* List of links between related recurring transactions
|
|
771
|
+
*/
|
|
772
|
+
recurringTransactionLinks?: RecurringTransactionLink[];
|
|
734
773
|
/**
|
|
735
774
|
* List of transactions
|
|
736
775
|
*/
|
|
@@ -824,6 +863,16 @@ export interface Common7 {
|
|
|
824
863
|
deletedAt?: DateDeleted7;
|
|
825
864
|
version?: Version7;
|
|
826
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* Common properties for all schemas
|
|
868
|
+
*/
|
|
869
|
+
export interface Common8 {
|
|
870
|
+
id: ID8;
|
|
871
|
+
createdAt: DateCreated8;
|
|
872
|
+
updatedAt: LastUpdated8;
|
|
873
|
+
deletedAt?: DateDeleted8;
|
|
874
|
+
version?: Version8;
|
|
875
|
+
}
|
|
827
876
|
|
|
828
877
|
/**
|
|
829
878
|
* Defines recurring financial transactions within the application.
|
|
@@ -975,6 +1024,53 @@ export interface Common {
|
|
|
975
1024
|
version?: Version;
|
|
976
1025
|
}
|
|
977
1026
|
|
|
1027
|
+
/**
|
|
1028
|
+
* Links two related recurring transactions, such as mirrored transfer schedules recorded in separate accounts.
|
|
1029
|
+
*/
|
|
1030
|
+
export type RecurringTransactionLink = Common & {
|
|
1031
|
+
sourceRecurringTransactionId: SourceRecurringTransactionID;
|
|
1032
|
+
destinationRecurringTransactionId: DestinationRecurringTransactionID;
|
|
1033
|
+
};
|
|
1034
|
+
/**
|
|
1035
|
+
* UUID for the item
|
|
1036
|
+
*/
|
|
1037
|
+
export type ID = string;
|
|
1038
|
+
/**
|
|
1039
|
+
* The timestamp of the creation of the item
|
|
1040
|
+
*/
|
|
1041
|
+
export type DateCreated = string;
|
|
1042
|
+
/**
|
|
1043
|
+
* The timestamp of the last update or null if the item has not been updated yet
|
|
1044
|
+
*/
|
|
1045
|
+
export type LastUpdated = string | null;
|
|
1046
|
+
/**
|
|
1047
|
+
* The timestamp of when the item was soft-deleted
|
|
1048
|
+
*/
|
|
1049
|
+
export type DateDeleted = string | null;
|
|
1050
|
+
/**
|
|
1051
|
+
* Version number for optimistic concurrency control
|
|
1052
|
+
*/
|
|
1053
|
+
export type Version = number;
|
|
1054
|
+
/**
|
|
1055
|
+
* UUID of the source recurring transaction in the link.
|
|
1056
|
+
*/
|
|
1057
|
+
export type SourceRecurringTransactionID = string;
|
|
1058
|
+
/**
|
|
1059
|
+
* UUID of the destination recurring transaction in the link.
|
|
1060
|
+
*/
|
|
1061
|
+
export type DestinationRecurringTransactionID = string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Common properties for all schemas
|
|
1065
|
+
*/
|
|
1066
|
+
export interface Common {
|
|
1067
|
+
id: ID;
|
|
1068
|
+
createdAt: DateCreated;
|
|
1069
|
+
updatedAt: LastUpdated;
|
|
1070
|
+
deletedAt?: DateDeleted;
|
|
1071
|
+
version?: Version;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
978
1074
|
/**
|
|
979
1075
|
* Defines the schema for credit card statements.
|
|
980
1076
|
*/
|
package/dist/esm/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
lucaSchema as lucaSchemaJson,
|
|
7
7
|
recurringTransaction,
|
|
8
8
|
recurringTransactionEvent,
|
|
9
|
+
recurringTransactionLink,
|
|
9
10
|
statement,
|
|
10
11
|
transaction,
|
|
11
12
|
transactionLink,
|
|
@@ -30,6 +31,7 @@ const schemas = {
|
|
|
30
31
|
statement,
|
|
31
32
|
recurringTransaction,
|
|
32
33
|
recurringTransactionEvent,
|
|
34
|
+
recurringTransactionLink,
|
|
33
35
|
transaction,
|
|
34
36
|
transactionLink,
|
|
35
37
|
transactionSplit,
|
|
@@ -44,6 +46,7 @@ export const statementSchema = schemas.statement;
|
|
|
44
46
|
export const recurringTransactionSchema = schemas.recurringTransaction;
|
|
45
47
|
export const recurringTransactionEventSchema =
|
|
46
48
|
schemas.recurringTransactionEvent;
|
|
49
|
+
export const recurringTransactionLinkSchema = schemas.recurringTransactionLink;
|
|
47
50
|
export const transactionSchema = schemas.transaction;
|
|
48
51
|
export const transactionLinkSchema = schemas.transactionLink;
|
|
49
52
|
export const transactionSplitSchema = schemas.transactionSplit;
|
|
@@ -8,6 +8,7 @@ import lucaSchemaJson from './schemas/lucaSchema.json' with { type: 'json' };
|
|
|
8
8
|
import statementSchemaJson from './schemas/statement.json' with { type: 'json' };
|
|
9
9
|
import recurringTransactionSchemaJson from './schemas/recurringTransaction.json' with { type: 'json' };
|
|
10
10
|
import recurringTransactionEventSchemaJson from './schemas/recurringTransactionEvent.json' with { type: 'json' };
|
|
11
|
+
import recurringTransactionLinkSchemaJson from './schemas/recurringTransactionLink.json' with { type: 'json' };
|
|
11
12
|
import transactionSchemaJson from './schemas/transaction.json' with { type: 'json' };
|
|
12
13
|
import transactionLinkSchemaJson from './schemas/transactionLink.json' with { type: 'json' };
|
|
13
14
|
import transactionSplitSchemaJson from './schemas/transactionSplit.json' with { type: 'json' };
|
|
@@ -19,6 +20,7 @@ const schemas = {
|
|
|
19
20
|
statement: statementSchemaJson,
|
|
20
21
|
recurringTransaction: recurringTransactionSchemaJson,
|
|
21
22
|
recurringTransactionEvent: recurringTransactionEventSchemaJson,
|
|
23
|
+
recurringTransactionLink: recurringTransactionLinkSchemaJson,
|
|
22
24
|
transaction: transactionSchemaJson,
|
|
23
25
|
transactionLink: transactionLinkSchemaJson,
|
|
24
26
|
transactionSplit: transactionSplitSchemaJson
|
|
@@ -194,6 +196,7 @@ export function getDateFieldPaths(schemaKey) {
|
|
|
194
196
|
* statements: Array<string>,
|
|
195
197
|
* recurringTransactions: Array<string>,
|
|
196
198
|
* recurringTransactionEvents: Array<string>,
|
|
199
|
+
* recurringTransactionLinks: Array<string>,
|
|
197
200
|
* transactions: Array<string>,
|
|
198
201
|
* transactionLinks: Array<string>,
|
|
199
202
|
* transactionSplits: Array<string>
|
|
@@ -206,6 +209,7 @@ export function getDateFieldPathsByCollection() {
|
|
|
206
209
|
statements: getDateFieldPaths('statement'),
|
|
207
210
|
recurringTransactions: getDateFieldPaths('recurringTransaction'),
|
|
208
211
|
recurringTransactionEvents: getDateFieldPaths('recurringTransactionEvent'),
|
|
212
|
+
recurringTransactionLinks: getDateFieldPaths('recurringTransactionLink'),
|
|
209
213
|
transactions: getDateFieldPaths('transaction'),
|
|
210
214
|
transactionLinks: getDateFieldPaths('transactionLink'),
|
|
211
215
|
transactionSplits: getDateFieldPaths('transactionSplit')
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"STATEMENT": "statement",
|
|
11
11
|
"RECURRING_TRANSACTION": "recurringTransaction",
|
|
12
12
|
"RECURRING_TRANSACTION_EVENT": "recurringTransactionEvent",
|
|
13
|
+
"RECURRING_TRANSACTION_LINK": "recurringTransactionLink",
|
|
13
14
|
"TRANSACTION": "transaction",
|
|
14
15
|
"TRANSACTION_LINK": "transactionLink",
|
|
15
16
|
"TRANSACTION_SPLIT": "transactionSplit"
|
|
@@ -5,6 +5,7 @@ import lucaSchema from './lucaSchema.json' with { type: 'json' };
|
|
|
5
5
|
import statement from './statement.json' with { type: 'json' };
|
|
6
6
|
import recurringTransaction from './recurringTransaction.json' with { type: 'json' };
|
|
7
7
|
import recurringTransactionEvent from './recurringTransactionEvent.json' with { type: 'json' };
|
|
8
|
+
import recurringTransactionLink from './recurringTransactionLink.json' with { type: 'json' };
|
|
8
9
|
import transaction from './transaction.json' with { type: 'json' };
|
|
9
10
|
import transactionLink from './transactionLink.json' with { type: 'json' };
|
|
10
11
|
import transactionSplit from './transactionSplit.json' with { type: 'json' };
|
|
@@ -18,6 +19,7 @@ export {
|
|
|
18
19
|
statement,
|
|
19
20
|
recurringTransaction,
|
|
20
21
|
recurringTransactionEvent,
|
|
22
|
+
recurringTransactionLink,
|
|
21
23
|
transaction,
|
|
22
24
|
transactionLink,
|
|
23
25
|
transactionSplit,
|
|
@@ -32,6 +34,7 @@ export default {
|
|
|
32
34
|
statement,
|
|
33
35
|
recurringTransaction,
|
|
34
36
|
recurringTransactionEvent,
|
|
37
|
+
recurringTransactionLink,
|
|
35
38
|
transaction,
|
|
36
39
|
transactionLink,
|
|
37
40
|
transactionSplit,
|
|
@@ -60,6 +60,14 @@
|
|
|
60
60
|
"$ref": "./recurringTransactionEvent.json"
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
|
+
"recurringTransactionLinks": {
|
|
64
|
+
"type": "array",
|
|
65
|
+
"description": "List of links between related recurring transactions",
|
|
66
|
+
"uniqueItems": true,
|
|
67
|
+
"items": {
|
|
68
|
+
"$ref": "./recurringTransactionLink.json"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
63
71
|
"transactions": {
|
|
64
72
|
"type": "array",
|
|
65
73
|
"description": "List of transactions",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/LucaFinancial/LucaSchema/main/src/schemas/recurringTransactionLink.json",
|
|
4
|
+
"title": "Recurring Transaction Link",
|
|
5
|
+
"description": "Links two related recurring transactions, such as mirrored transfer schedules recorded in separate accounts.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "./common.json"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"sourceRecurringTransactionId": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"title": "Source Recurring Transaction ID",
|
|
16
|
+
"format": "uuid",
|
|
17
|
+
"description": "UUID of the source recurring transaction in the link."
|
|
18
|
+
},
|
|
19
|
+
"destinationRecurringTransactionId": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"title": "Destination Recurring Transaction ID",
|
|
22
|
+
"format": "uuid",
|
|
23
|
+
"description": "UUID of the destination recurring transaction in the link."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"unevaluatedProperties": false,
|
|
27
|
+
"required": [
|
|
28
|
+
"sourceRecurringTransactionId",
|
|
29
|
+
"destinationRecurringTransactionId"
|
|
30
|
+
]
|
|
31
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -526,7 +526,42 @@ export type RecurringTransactionID = string;
|
|
|
526
526
|
* The date when the occurrence is expected.
|
|
527
527
|
*/
|
|
528
528
|
export type ExpectedDate = string;
|
|
529
|
-
|
|
529
|
+
/**
|
|
530
|
+
* Links two related recurring transactions, such as mirrored transfer schedules recorded in separate accounts.
|
|
531
|
+
*/
|
|
532
|
+
export type RecurringTransactionLink = Common5 & {
|
|
533
|
+
sourceRecurringTransactionId: SourceRecurringTransactionID;
|
|
534
|
+
destinationRecurringTransactionId: DestinationRecurringTransactionID;
|
|
535
|
+
};
|
|
536
|
+
/**
|
|
537
|
+
* UUID for the item
|
|
538
|
+
*/
|
|
539
|
+
export type ID5 = string;
|
|
540
|
+
/**
|
|
541
|
+
* The timestamp of the creation of the item
|
|
542
|
+
*/
|
|
543
|
+
export type DateCreated5 = string;
|
|
544
|
+
/**
|
|
545
|
+
* The timestamp of the last update or null if the item has not been updated yet
|
|
546
|
+
*/
|
|
547
|
+
export type LastUpdated5 = string | null;
|
|
548
|
+
/**
|
|
549
|
+
* The timestamp of when the item was soft-deleted
|
|
550
|
+
*/
|
|
551
|
+
export type DateDeleted5 = string | null;
|
|
552
|
+
/**
|
|
553
|
+
* Version number for optimistic concurrency control
|
|
554
|
+
*/
|
|
555
|
+
export type Version5 = number;
|
|
556
|
+
/**
|
|
557
|
+
* UUID of the source recurring transaction in the link.
|
|
558
|
+
*/
|
|
559
|
+
export type SourceRecurringTransactionID = string;
|
|
560
|
+
/**
|
|
561
|
+
* UUID of the destination recurring transaction in the link.
|
|
562
|
+
*/
|
|
563
|
+
export type DestinationRecurringTransactionID = string;
|
|
564
|
+
export type Transaction = Common6 & {
|
|
530
565
|
accountId: AccountID2;
|
|
531
566
|
date: Date;
|
|
532
567
|
authorizedAt?: AuthorizedAt;
|
|
@@ -556,23 +591,23 @@ export type Transaction = Common5 & {
|
|
|
556
591
|
/**
|
|
557
592
|
* UUID for the item
|
|
558
593
|
*/
|
|
559
|
-
export type
|
|
594
|
+
export type ID6 = string;
|
|
560
595
|
/**
|
|
561
596
|
* The timestamp of the creation of the item
|
|
562
597
|
*/
|
|
563
|
-
export type
|
|
598
|
+
export type DateCreated6 = string;
|
|
564
599
|
/**
|
|
565
600
|
* The timestamp of the last update or null if the item has not been updated yet
|
|
566
601
|
*/
|
|
567
|
-
export type
|
|
602
|
+
export type LastUpdated6 = string | null;
|
|
568
603
|
/**
|
|
569
604
|
* The timestamp of when the item was soft-deleted
|
|
570
605
|
*/
|
|
571
|
-
export type
|
|
606
|
+
export type DateDeleted6 = string | null;
|
|
572
607
|
/**
|
|
573
608
|
* Version number for optimistic concurrency control
|
|
574
609
|
*/
|
|
575
|
-
export type
|
|
610
|
+
export type Version6 = number;
|
|
576
611
|
/**
|
|
577
612
|
* ID of the account this transaction belongs to
|
|
578
613
|
*/
|
|
@@ -620,30 +655,30 @@ export type AggregationServiceID1 = string | null;
|
|
|
620
655
|
/**
|
|
621
656
|
* Links two related transactions, such as transfer legs recorded in separate accounts.
|
|
622
657
|
*/
|
|
623
|
-
export type TransactionLink =
|
|
658
|
+
export type TransactionLink = Common7 & {
|
|
624
659
|
sourceTransactionId: SourceTransactionID;
|
|
625
660
|
destinationTransactionId: DestinationTransactionID;
|
|
626
661
|
};
|
|
627
662
|
/**
|
|
628
663
|
* UUID for the item
|
|
629
664
|
*/
|
|
630
|
-
export type
|
|
665
|
+
export type ID7 = string;
|
|
631
666
|
/**
|
|
632
667
|
* The timestamp of the creation of the item
|
|
633
668
|
*/
|
|
634
|
-
export type
|
|
669
|
+
export type DateCreated7 = string;
|
|
635
670
|
/**
|
|
636
671
|
* The timestamp of the last update or null if the item has not been updated yet
|
|
637
672
|
*/
|
|
638
|
-
export type
|
|
673
|
+
export type LastUpdated7 = string | null;
|
|
639
674
|
/**
|
|
640
675
|
* The timestamp of when the item was soft-deleted
|
|
641
676
|
*/
|
|
642
|
-
export type
|
|
677
|
+
export type DateDeleted7 = string | null;
|
|
643
678
|
/**
|
|
644
679
|
* Version number for optimistic concurrency control
|
|
645
680
|
*/
|
|
646
|
-
export type
|
|
681
|
+
export type Version7 = number;
|
|
647
682
|
/**
|
|
648
683
|
* UUID of the source transaction in the link.
|
|
649
684
|
*/
|
|
@@ -655,7 +690,7 @@ export type DestinationTransactionID = string;
|
|
|
655
690
|
/**
|
|
656
691
|
* Defines a split within a transaction.
|
|
657
692
|
*/
|
|
658
|
-
export type TransactionSplit =
|
|
693
|
+
export type TransactionSplit = Common8 & {
|
|
659
694
|
transactionId: TransactionID;
|
|
660
695
|
amount: Amount2;
|
|
661
696
|
categoryId: CategoryID2;
|
|
@@ -665,23 +700,23 @@ export type TransactionSplit = Common7 & {
|
|
|
665
700
|
/**
|
|
666
701
|
* UUID for the item
|
|
667
702
|
*/
|
|
668
|
-
export type
|
|
703
|
+
export type ID8 = string;
|
|
669
704
|
/**
|
|
670
705
|
* The timestamp of the creation of the item
|
|
671
706
|
*/
|
|
672
|
-
export type
|
|
707
|
+
export type DateCreated8 = string;
|
|
673
708
|
/**
|
|
674
709
|
* The timestamp of the last update or null if the item has not been updated yet
|
|
675
710
|
*/
|
|
676
|
-
export type
|
|
711
|
+
export type LastUpdated8 = string | null;
|
|
677
712
|
/**
|
|
678
713
|
* The timestamp of when the item was soft-deleted
|
|
679
714
|
*/
|
|
680
|
-
export type
|
|
715
|
+
export type DateDeleted8 = string | null;
|
|
681
716
|
/**
|
|
682
717
|
* Version number for optimistic concurrency control
|
|
683
718
|
*/
|
|
684
|
-
export type
|
|
719
|
+
export type Version8 = number;
|
|
685
720
|
/**
|
|
686
721
|
* The identifier of the parent transaction.
|
|
687
722
|
*/
|
|
@@ -731,6 +766,10 @@ export interface LucaSchema {
|
|
|
731
766
|
* List of recurring transaction events
|
|
732
767
|
*/
|
|
733
768
|
recurringTransactionEvents: RecurringTransactionEvent[];
|
|
769
|
+
/**
|
|
770
|
+
* List of links between related recurring transactions
|
|
771
|
+
*/
|
|
772
|
+
recurringTransactionLinks?: RecurringTransactionLink[];
|
|
734
773
|
/**
|
|
735
774
|
* List of transactions
|
|
736
775
|
*/
|
|
@@ -824,6 +863,16 @@ export interface Common7 {
|
|
|
824
863
|
deletedAt?: DateDeleted7;
|
|
825
864
|
version?: Version7;
|
|
826
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* Common properties for all schemas
|
|
868
|
+
*/
|
|
869
|
+
export interface Common8 {
|
|
870
|
+
id: ID8;
|
|
871
|
+
createdAt: DateCreated8;
|
|
872
|
+
updatedAt: LastUpdated8;
|
|
873
|
+
deletedAt?: DateDeleted8;
|
|
874
|
+
version?: Version8;
|
|
875
|
+
}
|
|
827
876
|
|
|
828
877
|
/**
|
|
829
878
|
* Defines recurring financial transactions within the application.
|
|
@@ -975,6 +1024,53 @@ export interface Common {
|
|
|
975
1024
|
version?: Version;
|
|
976
1025
|
}
|
|
977
1026
|
|
|
1027
|
+
/**
|
|
1028
|
+
* Links two related recurring transactions, such as mirrored transfer schedules recorded in separate accounts.
|
|
1029
|
+
*/
|
|
1030
|
+
export type RecurringTransactionLink = Common & {
|
|
1031
|
+
sourceRecurringTransactionId: SourceRecurringTransactionID;
|
|
1032
|
+
destinationRecurringTransactionId: DestinationRecurringTransactionID;
|
|
1033
|
+
};
|
|
1034
|
+
/**
|
|
1035
|
+
* UUID for the item
|
|
1036
|
+
*/
|
|
1037
|
+
export type ID = string;
|
|
1038
|
+
/**
|
|
1039
|
+
* The timestamp of the creation of the item
|
|
1040
|
+
*/
|
|
1041
|
+
export type DateCreated = string;
|
|
1042
|
+
/**
|
|
1043
|
+
* The timestamp of the last update or null if the item has not been updated yet
|
|
1044
|
+
*/
|
|
1045
|
+
export type LastUpdated = string | null;
|
|
1046
|
+
/**
|
|
1047
|
+
* The timestamp of when the item was soft-deleted
|
|
1048
|
+
*/
|
|
1049
|
+
export type DateDeleted = string | null;
|
|
1050
|
+
/**
|
|
1051
|
+
* Version number for optimistic concurrency control
|
|
1052
|
+
*/
|
|
1053
|
+
export type Version = number;
|
|
1054
|
+
/**
|
|
1055
|
+
* UUID of the source recurring transaction in the link.
|
|
1056
|
+
*/
|
|
1057
|
+
export type SourceRecurringTransactionID = string;
|
|
1058
|
+
/**
|
|
1059
|
+
* UUID of the destination recurring transaction in the link.
|
|
1060
|
+
*/
|
|
1061
|
+
export type DestinationRecurringTransactionID = string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Common properties for all schemas
|
|
1065
|
+
*/
|
|
1066
|
+
export interface Common {
|
|
1067
|
+
id: ID;
|
|
1068
|
+
createdAt: DateCreated;
|
|
1069
|
+
updatedAt: LastUpdated;
|
|
1070
|
+
deletedAt?: DateDeleted;
|
|
1071
|
+
version?: Version;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
978
1074
|
/**
|
|
979
1075
|
* Defines the schema for credit card statements.
|
|
980
1076
|
*/
|