@luca-financial/luca-schema 3.0.3 → 3.2.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 CHANGED
@@ -5,6 +5,38 @@ 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.2.0] - 2026-04-04
9
+
10
+ ### Added
11
+
12
+ - Add a new `transactionLink` schema to represent links between related transactions across accounts.
13
+ - Add optional `transactionLinks` support to the aggregate Luca Schema, schema exports, enums, and validator metadata.
14
+ - Add bundled transaction-link example data and validation tests covering valid transaction-link usage.
15
+
16
+ ### Changed
17
+
18
+ - Update README and example documentation to describe transaction links and how they fit into the aggregate schema.
19
+
20
+ ## [3.1.0] - 2026-04-04
21
+
22
+ ### Added
23
+
24
+ - Support `CASH` and `ESCROW` as valid `AccountType` enum values.
25
+ - Add `CASH` and `ESCROW` account examples to bundled example datasets.
26
+ - Add validation tests covering `CASH` and `ESCROW` account types.
27
+
28
+ ### Changed
29
+
30
+ - Update README account schema documentation to include the new account types.
31
+
32
+ ## [3.0.3] - 2026-03-18
33
+
34
+ ### Changed
35
+
36
+ - Upgrade runtime and development dependencies to their latest compatible versions.
37
+ - Refresh the linting and test toolchain, including the ESLint and Jest stacks.
38
+ - Regenerate `pnpm-lock.yaml` to capture the updated dependency graph for the 3.0.3 release.
39
+
8
40
  ## [3.0.2] - 2026-02-14
9
41
 
10
42
  ### Changed
package/README.md CHANGED
@@ -52,11 +52,13 @@ const common = {
52
52
 
53
53
  Validates financial accounts.
54
54
 
55
+ Supported account types include `CHECKING`, `SAVINGS`, `CASH`, `CREDIT_CARD`, `ESCROW`, and `EXTERNAL`. Use `CASH` for physical cash balances and `ESCROW` for held-funds accounts such as deposits or tax escrows.
56
+
55
57
  ```typescript
56
58
  const account = {
57
59
  id: string;
58
60
  name: string;
59
- type: 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
61
+ type: 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
60
62
  institution: string | null;
61
63
  aggregationServiceId: string | null;
62
64
  statementClosingDay: number | null;
@@ -208,6 +210,24 @@ const transactionSplit = {
208
210
  };
209
211
  ```
210
212
 
213
+ ### TransactionLink
214
+
215
+ Validates links between related transactions, such as transfers recorded in separate accounts.
216
+
217
+ ```typescript
218
+ const transactionLink = {
219
+ id: string;
220
+ sourceTransactionId: string;
221
+ destinationTransactionId: string;
222
+ createdAt: string;
223
+ updatedAt: string | null;
224
+ deletedAt?: string | null;
225
+ version?: number;
226
+ };
227
+ ```
228
+
229
+ Cross-transaction rules like matching dates, matching amounts, or opposite signs are not enforced by this schema and should be handled in application logic.
230
+
211
231
  ### LucaSchema
212
232
 
213
233
  Validates the full ledger export.
@@ -221,6 +241,7 @@ const lucaSchema = {
221
241
  recurringTransactions: RecurringTransaction[];
222
242
  recurringTransactionEvents: RecurringTransactionEvent[];
223
243
  transactions: Transaction[];
244
+ transactionLinks?: TransactionLink[];
224
245
  transactionSplits: TransactionSplit[];
225
246
  };
226
247
  ```
@@ -249,7 +270,7 @@ import {
249
270
  - `validate(schemaKey, data)` → `{ valid: boolean, errors: AjvError[] }`
250
271
  - `validateCollection(schemaKey, array)` → `{ valid: boolean, errors: [{ index, entity, errors }] }`
251
272
  - `getDateFieldPaths(schemaKey)` → `string[]` of `format: date` fields for a schema key
252
- - `getDateFieldPathsByCollection()` → `{ accounts, categories, statements, recurringTransactions, recurringTransactionEvents, transactions, transactionSplits }`
273
+ - `getDateFieldPathsByCollection()` → `{ accounts, categories, statements, recurringTransactions, recurringTransactionEvents, transactions, transactionLinks, transactionSplits }`
253
274
  - `getValidFields(schemaKey)` → `Set<string>` of all fields (includes common fields when applicable)
254
275
  - `getRequiredFields(schemaKey)` → `Set<string>` of required fields (includes common required fields)
255
276
  - `stripInvalidFields(schemaKey, data)` → new object with only schema-defined keys
@@ -6,7 +6,7 @@ export type Account = Common & {
6
6
  /**
7
7
  * Allowed account types
8
8
  */
9
- type: 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
9
+ type: 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
10
10
  institution?: Institution;
11
11
  aggregationServiceId?: AggregationServiceID;
12
12
  statementClosingDay?: StatementClosingDay;
@@ -174,7 +174,7 @@ export interface Common {
174
174
  * This interface was referenced by `LucaSchemaEnums`'s JSON-Schema
175
175
  * via the `definition` "AccountType".
176
176
  */
177
- export type AccountType = 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
177
+ export type AccountType = 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
178
178
  /**
179
179
  * Allowed transaction lifecycle states
180
180
  *
@@ -274,7 +274,7 @@ export type Account = Common1 & {
274
274
  /**
275
275
  * Allowed account types
276
276
  */
277
- type: 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
277
+ type: 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
278
278
  institution?: Institution;
279
279
  aggregationServiceId?: AggregationServiceID;
280
280
  statementClosingDay?: StatementClosingDay;
@@ -617,10 +617,45 @@ export type StatementID = string | null;
617
617
  * Identifier for this transaction in a financial data aggregation service.
618
618
  */
619
619
  export type AggregationServiceID1 = string | null;
620
+ /**
621
+ * Links two related transactions, such as transfer legs recorded in separate accounts.
622
+ */
623
+ export type TransactionLink = Common6 & {
624
+ sourceTransactionId: SourceTransactionID;
625
+ destinationTransactionId: DestinationTransactionID;
626
+ };
627
+ /**
628
+ * UUID for the item
629
+ */
630
+ export type ID6 = string;
631
+ /**
632
+ * The timestamp of the creation of the item
633
+ */
634
+ export type DateCreated6 = string;
635
+ /**
636
+ * The timestamp of the last update or null if the item has not been updated yet
637
+ */
638
+ export type LastUpdated6 = string | null;
639
+ /**
640
+ * The timestamp of when the item was soft-deleted
641
+ */
642
+ export type DateDeleted6 = string | null;
643
+ /**
644
+ * Version number for optimistic concurrency control
645
+ */
646
+ export type Version6 = number;
647
+ /**
648
+ * UUID of the source transaction in the link.
649
+ */
650
+ export type SourceTransactionID = string;
651
+ /**
652
+ * UUID of the destination transaction in the link.
653
+ */
654
+ export type DestinationTransactionID = string;
620
655
  /**
621
656
  * Defines a split within a transaction.
622
657
  */
623
- export type TransactionSplit = Common6 & {
658
+ export type TransactionSplit = Common7 & {
624
659
  transactionId: TransactionID;
625
660
  amount: Amount2;
626
661
  categoryId: CategoryID2;
@@ -630,23 +665,23 @@ export type TransactionSplit = Common6 & {
630
665
  /**
631
666
  * UUID for the item
632
667
  */
633
- export type ID6 = string;
668
+ export type ID7 = string;
634
669
  /**
635
670
  * The timestamp of the creation of the item
636
671
  */
637
- export type DateCreated6 = string;
672
+ export type DateCreated7 = string;
638
673
  /**
639
674
  * The timestamp of the last update or null if the item has not been updated yet
640
675
  */
641
- export type LastUpdated6 = string | null;
676
+ export type LastUpdated7 = string | null;
642
677
  /**
643
678
  * The timestamp of when the item was soft-deleted
644
679
  */
645
- export type DateDeleted6 = string | null;
680
+ export type DateDeleted7 = string | null;
646
681
  /**
647
682
  * Version number for optimistic concurrency control
648
683
  */
649
- export type Version6 = number;
684
+ export type Version7 = number;
650
685
  /**
651
686
  * The identifier of the parent transaction.
652
687
  */
@@ -700,6 +735,10 @@ export interface LucaSchema {
700
735
  * List of transactions
701
736
  */
702
737
  transactions: Transaction[];
738
+ /**
739
+ * List of links between related transactions
740
+ */
741
+ transactionLinks?: TransactionLink[];
703
742
  /**
704
743
  * List of transaction splits
705
744
  */
@@ -775,6 +814,16 @@ export interface Common6 {
775
814
  deletedAt?: DateDeleted6;
776
815
  version?: Version6;
777
816
  }
817
+ /**
818
+ * Common properties for all schemas
819
+ */
820
+ export interface Common7 {
821
+ id: ID7;
822
+ createdAt: DateCreated7;
823
+ updatedAt: LastUpdated7;
824
+ deletedAt?: DateDeleted7;
825
+ version?: Version7;
826
+ }
778
827
 
779
828
  /**
780
829
  * Defines recurring financial transactions within the application.
@@ -1106,6 +1155,53 @@ export interface Common {
1106
1155
  version?: Version;
1107
1156
  }
1108
1157
 
1158
+ /**
1159
+ * Links two related transactions, such as transfer legs recorded in separate accounts.
1160
+ */
1161
+ export type TransactionLink = Common & {
1162
+ sourceTransactionId: SourceTransactionID;
1163
+ destinationTransactionId: DestinationTransactionID;
1164
+ };
1165
+ /**
1166
+ * UUID for the item
1167
+ */
1168
+ export type ID = string;
1169
+ /**
1170
+ * The timestamp of the creation of the item
1171
+ */
1172
+ export type DateCreated = string;
1173
+ /**
1174
+ * The timestamp of the last update or null if the item has not been updated yet
1175
+ */
1176
+ export type LastUpdated = string | null;
1177
+ /**
1178
+ * The timestamp of when the item was soft-deleted
1179
+ */
1180
+ export type DateDeleted = string | null;
1181
+ /**
1182
+ * Version number for optimistic concurrency control
1183
+ */
1184
+ export type Version = number;
1185
+ /**
1186
+ * UUID of the source transaction in the link.
1187
+ */
1188
+ export type SourceTransactionID = string;
1189
+ /**
1190
+ * UUID of the destination transaction in the link.
1191
+ */
1192
+ export type DestinationTransactionID = string;
1193
+
1194
+ /**
1195
+ * Common properties for all schemas
1196
+ */
1197
+ export interface Common {
1198
+ id: ID;
1199
+ createdAt: DateCreated;
1200
+ updatedAt: LastUpdated;
1201
+ deletedAt?: DateDeleted;
1202
+ version?: Version;
1203
+ }
1204
+
1109
1205
  /**
1110
1206
  * Defines a split within a transaction.
1111
1207
  */
package/dist/esm/index.js CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  recurringTransactionEvent,
9
9
  statement,
10
10
  transaction,
11
+ transactionLink,
11
12
  transactionSplit
12
13
  } from './schemas/index.js';
13
14
  import { enums, LucaSchemas } from './enums.js';
@@ -30,6 +31,7 @@ const schemas = {
30
31
  recurringTransaction,
31
32
  recurringTransactionEvent,
32
33
  transaction,
34
+ transactionLink,
33
35
  transactionSplit,
34
36
  enums: enumsSchema
35
37
  };
@@ -43,6 +45,7 @@ export const recurringTransactionSchema = schemas.recurringTransaction;
43
45
  export const recurringTransactionEventSchema =
44
46
  schemas.recurringTransactionEvent;
45
47
  export const transactionSchema = schemas.transaction;
48
+ export const transactionLinkSchema = schemas.transactionLink;
46
49
  export const transactionSplitSchema = schemas.transactionSplit;
47
50
 
48
51
  export {
@@ -9,6 +9,7 @@ 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
11
  import transactionSchemaJson from './schemas/transaction.json' with { type: 'json' };
12
+ import transactionLinkSchemaJson from './schemas/transactionLink.json' with { type: 'json' };
12
13
  import transactionSplitSchemaJson from './schemas/transactionSplit.json' with { type: 'json' };
13
14
 
14
15
  const schemas = {
@@ -19,6 +20,7 @@ const schemas = {
19
20
  recurringTransaction: recurringTransactionSchemaJson,
20
21
  recurringTransactionEvent: recurringTransactionEventSchemaJson,
21
22
  transaction: transactionSchemaJson,
23
+ transactionLink: transactionLinkSchemaJson,
22
24
  transactionSplit: transactionSplitSchemaJson
23
25
  };
24
26
 
@@ -193,6 +195,7 @@ export function getDateFieldPaths(schemaKey) {
193
195
  * recurringTransactions: Array<string>,
194
196
  * recurringTransactionEvents: Array<string>,
195
197
  * transactions: Array<string>,
198
+ * transactionLinks: Array<string>,
196
199
  * transactionSplits: Array<string>
197
200
  * }}
198
201
  */
@@ -204,6 +207,7 @@ export function getDateFieldPathsByCollection() {
204
207
  recurringTransactions: getDateFieldPaths('recurringTransaction'),
205
208
  recurringTransactionEvents: getDateFieldPaths('recurringTransactionEvent'),
206
209
  transactions: getDateFieldPaths('transaction'),
210
+ transactionLinks: getDateFieldPaths('transactionLink'),
207
211
  transactionSplits: getDateFieldPaths('transactionSplit')
208
212
  };
209
213
  }
@@ -11,12 +11,20 @@
11
11
  "RECURRING_TRANSACTION": "recurringTransaction",
12
12
  "RECURRING_TRANSACTION_EVENT": "recurringTransactionEvent",
13
13
  "TRANSACTION": "transaction",
14
+ "TRANSACTION_LINK": "transactionLink",
14
15
  "TRANSACTION_SPLIT": "transactionSplit"
15
16
  },
16
17
  "$defs": {
17
18
  "AccountType": {
18
19
  "type": "string",
19
- "enum": ["CHECKING", "SAVINGS", "CREDIT_CARD", "EXTERNAL"],
20
+ "enum": [
21
+ "CHECKING",
22
+ "SAVINGS",
23
+ "CASH",
24
+ "CREDIT_CARD",
25
+ "ESCROW",
26
+ "EXTERNAL"
27
+ ],
20
28
  "description": "Allowed account types"
21
29
  },
22
30
  "TransactionState": {
@@ -6,6 +6,7 @@ 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
8
  import transaction from './transaction.json' with { type: 'json' };
9
+ import transactionLink from './transactionLink.json' with { type: 'json' };
9
10
  import transactionSplit from './transactionSplit.json' with { type: 'json' };
10
11
  import enums from './enums.json' with { type: 'json' };
11
12
 
@@ -18,6 +19,7 @@ export {
18
19
  recurringTransaction,
19
20
  recurringTransactionEvent,
20
21
  transaction,
22
+ transactionLink,
21
23
  transactionSplit,
22
24
  enums
23
25
  };
@@ -31,6 +33,7 @@ export default {
31
33
  recurringTransaction,
32
34
  recurringTransactionEvent,
33
35
  transaction,
36
+ transactionLink,
34
37
  transactionSplit,
35
38
  enums
36
39
  };
@@ -68,6 +68,14 @@
68
68
  "$ref": "./transaction.json"
69
69
  }
70
70
  },
71
+ "transactionLinks": {
72
+ "type": "array",
73
+ "description": "List of links between related transactions",
74
+ "uniqueItems": true,
75
+ "items": {
76
+ "$ref": "./transactionLink.json"
77
+ }
78
+ },
71
79
  "transactionSplits": {
72
80
  "type": "array",
73
81
  "description": "List of transaction splits",
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/LucaFinancial/LucaSchema/main/src/schemas/transactionLink.json",
4
+ "title": "Transaction Link",
5
+ "description": "Links two related transactions, such as transfer legs recorded in separate accounts.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "./common.json"
10
+ }
11
+ ],
12
+ "properties": {
13
+ "sourceTransactionId": {
14
+ "type": "string",
15
+ "title": "Source Transaction ID",
16
+ "format": "uuid",
17
+ "description": "UUID of the source transaction in the link."
18
+ },
19
+ "destinationTransactionId": {
20
+ "type": "string",
21
+ "title": "Destination Transaction ID",
22
+ "format": "uuid",
23
+ "description": "UUID of the destination transaction in the link."
24
+ }
25
+ },
26
+ "unevaluatedProperties": false,
27
+ "required": ["sourceTransactionId", "destinationTransactionId"]
28
+ }
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export type Account = Common & {
6
6
  /**
7
7
  * Allowed account types
8
8
  */
9
- type: 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
9
+ type: 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
10
10
  institution?: Institution;
11
11
  aggregationServiceId?: AggregationServiceID;
12
12
  statementClosingDay?: StatementClosingDay;
@@ -174,7 +174,7 @@ export interface Common {
174
174
  * This interface was referenced by `LucaSchemaEnums`'s JSON-Schema
175
175
  * via the `definition` "AccountType".
176
176
  */
177
- export type AccountType = 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
177
+ export type AccountType = 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
178
178
  /**
179
179
  * Allowed transaction lifecycle states
180
180
  *
@@ -274,7 +274,7 @@ export type Account = Common1 & {
274
274
  /**
275
275
  * Allowed account types
276
276
  */
277
- type: 'CHECKING' | 'SAVINGS' | 'CREDIT_CARD' | 'EXTERNAL';
277
+ type: 'CHECKING' | 'SAVINGS' | 'CASH' | 'CREDIT_CARD' | 'ESCROW' | 'EXTERNAL';
278
278
  institution?: Institution;
279
279
  aggregationServiceId?: AggregationServiceID;
280
280
  statementClosingDay?: StatementClosingDay;
@@ -617,10 +617,45 @@ export type StatementID = string | null;
617
617
  * Identifier for this transaction in a financial data aggregation service.
618
618
  */
619
619
  export type AggregationServiceID1 = string | null;
620
+ /**
621
+ * Links two related transactions, such as transfer legs recorded in separate accounts.
622
+ */
623
+ export type TransactionLink = Common6 & {
624
+ sourceTransactionId: SourceTransactionID;
625
+ destinationTransactionId: DestinationTransactionID;
626
+ };
627
+ /**
628
+ * UUID for the item
629
+ */
630
+ export type ID6 = string;
631
+ /**
632
+ * The timestamp of the creation of the item
633
+ */
634
+ export type DateCreated6 = string;
635
+ /**
636
+ * The timestamp of the last update or null if the item has not been updated yet
637
+ */
638
+ export type LastUpdated6 = string | null;
639
+ /**
640
+ * The timestamp of when the item was soft-deleted
641
+ */
642
+ export type DateDeleted6 = string | null;
643
+ /**
644
+ * Version number for optimistic concurrency control
645
+ */
646
+ export type Version6 = number;
647
+ /**
648
+ * UUID of the source transaction in the link.
649
+ */
650
+ export type SourceTransactionID = string;
651
+ /**
652
+ * UUID of the destination transaction in the link.
653
+ */
654
+ export type DestinationTransactionID = string;
620
655
  /**
621
656
  * Defines a split within a transaction.
622
657
  */
623
- export type TransactionSplit = Common6 & {
658
+ export type TransactionSplit = Common7 & {
624
659
  transactionId: TransactionID;
625
660
  amount: Amount2;
626
661
  categoryId: CategoryID2;
@@ -630,23 +665,23 @@ export type TransactionSplit = Common6 & {
630
665
  /**
631
666
  * UUID for the item
632
667
  */
633
- export type ID6 = string;
668
+ export type ID7 = string;
634
669
  /**
635
670
  * The timestamp of the creation of the item
636
671
  */
637
- export type DateCreated6 = string;
672
+ export type DateCreated7 = string;
638
673
  /**
639
674
  * The timestamp of the last update or null if the item has not been updated yet
640
675
  */
641
- export type LastUpdated6 = string | null;
676
+ export type LastUpdated7 = string | null;
642
677
  /**
643
678
  * The timestamp of when the item was soft-deleted
644
679
  */
645
- export type DateDeleted6 = string | null;
680
+ export type DateDeleted7 = string | null;
646
681
  /**
647
682
  * Version number for optimistic concurrency control
648
683
  */
649
- export type Version6 = number;
684
+ export type Version7 = number;
650
685
  /**
651
686
  * The identifier of the parent transaction.
652
687
  */
@@ -700,6 +735,10 @@ export interface LucaSchema {
700
735
  * List of transactions
701
736
  */
702
737
  transactions: Transaction[];
738
+ /**
739
+ * List of links between related transactions
740
+ */
741
+ transactionLinks?: TransactionLink[];
703
742
  /**
704
743
  * List of transaction splits
705
744
  */
@@ -775,6 +814,16 @@ export interface Common6 {
775
814
  deletedAt?: DateDeleted6;
776
815
  version?: Version6;
777
816
  }
817
+ /**
818
+ * Common properties for all schemas
819
+ */
820
+ export interface Common7 {
821
+ id: ID7;
822
+ createdAt: DateCreated7;
823
+ updatedAt: LastUpdated7;
824
+ deletedAt?: DateDeleted7;
825
+ version?: Version7;
826
+ }
778
827
 
779
828
  /**
780
829
  * Defines recurring financial transactions within the application.
@@ -1106,6 +1155,53 @@ export interface Common {
1106
1155
  version?: Version;
1107
1156
  }
1108
1157
 
1158
+ /**
1159
+ * Links two related transactions, such as transfer legs recorded in separate accounts.
1160
+ */
1161
+ export type TransactionLink = Common & {
1162
+ sourceTransactionId: SourceTransactionID;
1163
+ destinationTransactionId: DestinationTransactionID;
1164
+ };
1165
+ /**
1166
+ * UUID for the item
1167
+ */
1168
+ export type ID = string;
1169
+ /**
1170
+ * The timestamp of the creation of the item
1171
+ */
1172
+ export type DateCreated = string;
1173
+ /**
1174
+ * The timestamp of the last update or null if the item has not been updated yet
1175
+ */
1176
+ export type LastUpdated = string | null;
1177
+ /**
1178
+ * The timestamp of when the item was soft-deleted
1179
+ */
1180
+ export type DateDeleted = string | null;
1181
+ /**
1182
+ * Version number for optimistic concurrency control
1183
+ */
1184
+ export type Version = number;
1185
+ /**
1186
+ * UUID of the source transaction in the link.
1187
+ */
1188
+ export type SourceTransactionID = string;
1189
+ /**
1190
+ * UUID of the destination transaction in the link.
1191
+ */
1192
+ export type DestinationTransactionID = string;
1193
+
1194
+ /**
1195
+ * Common properties for all schemas
1196
+ */
1197
+ export interface Common {
1198
+ id: ID;
1199
+ createdAt: DateCreated;
1200
+ updatedAt: LastUpdated;
1201
+ deletedAt?: DateDeleted;
1202
+ version?: Version;
1203
+ }
1204
+
1109
1205
  /**
1110
1206
  * Defines a split within a transaction.
1111
1207
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luca-financial/luca-schema",
3
- "version": "3.0.3",
3
+ "version": "3.2.0",
4
4
  "description": "Schemas for the Luca Ledger application",
5
5
  "author": "Johnathan Aspinwall",
6
6
  "main": "dist/esm/index.js",