@luca-financial/luca-schema 3.3.0 → 3.3.2

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,20 @@ 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.2] - 2026-04-05
9
+
10
+ ### Changed
11
+
12
+ - Bump the Luca Schema contract version to `3.3.2`.
13
+ - Align bundled aggregate example files with `SCHEMA_VERSION` so example validation and version-consistency checks stay in sync.
14
+
15
+ ## [3.3.1] - 2026-04-05
16
+
17
+ ### Changed
18
+
19
+ - Require `isSameSign` on both `transactionLink` and `recurringTransactionLink` so linked amounts can explicitly indicate same-sign versus opposite-sign matching behavior.
20
+ - Update bundled examples, fixtures, tests, and README documentation to reflect the new required link-sign behavior flag.
21
+
8
22
  ## [3.3.0] - 2026-04-05
9
23
 
10
24
  ### Added
package/README.md CHANGED
@@ -219,6 +219,7 @@ const recurringTransactionLink = {
219
219
  id: string;
220
220
  sourceRecurringTransactionId: string;
221
221
  destinationRecurringTransactionId: string;
222
+ isSameSign: boolean;
222
223
  createdAt: string;
223
224
  updatedAt: string | null;
224
225
  deletedAt?: string | null;
@@ -235,6 +236,7 @@ const transactionLink = {
235
236
  id: string;
236
237
  sourceTransactionId: string;
237
238
  destinationTransactionId: string;
239
+ isSameSign: boolean;
238
240
  createdAt: string;
239
241
  updatedAt: string | null;
240
242
  deletedAt?: string | null;
@@ -242,7 +244,7 @@ const transactionLink = {
242
244
  };
243
245
  ```
244
246
 
245
- Cross-transaction rules like matching dates, matching amounts, or opposite signs are not enforced by this schema and should be handled in application logic.
247
+ `isSameSign` indicates whether linked amounts should share the same sign (`true`) or use opposite signs (`false`) while still matching by absolute value. Cross-transaction rules like matching dates or verifying absolute-value equality are not enforced by this schema and should be handled in application logic.
246
248
 
247
249
  ### LucaSchema
248
250
 
@@ -250,7 +252,7 @@ Validates the full ledger export.
250
252
 
251
253
  ```typescript
252
254
  const lucaSchema = {
253
- schemaVersion: '3.0.0';
255
+ schemaVersion: '3.3.2';
254
256
  categories: Category[];
255
257
  accounts: Account[];
256
258
  statements: Statement[];
@@ -532,6 +532,7 @@ export type ExpectedDate = string;
532
532
  export type RecurringTransactionLink = Common5 & {
533
533
  sourceRecurringTransactionId: SourceRecurringTransactionID;
534
534
  destinationRecurringTransactionId: DestinationRecurringTransactionID;
535
+ isSameSign: IsSameSign;
535
536
  };
536
537
  /**
537
538
  * UUID for the item
@@ -561,6 +562,10 @@ export type SourceRecurringTransactionID = string;
561
562
  * UUID of the destination recurring transaction in the link.
562
563
  */
563
564
  export type DestinationRecurringTransactionID = string;
565
+ /**
566
+ * Whether the linked recurring transactions are expected to have matching signs. When false, the linked recurring transactions are expected to have opposite signs.
567
+ */
568
+ export type IsSameSign = boolean;
564
569
  export type Transaction = Common6 & {
565
570
  accountId: AccountID2;
566
571
  date: Date;
@@ -658,6 +663,7 @@ export type AggregationServiceID1 = string | null;
658
663
  export type TransactionLink = Common7 & {
659
664
  sourceTransactionId: SourceTransactionID;
660
665
  destinationTransactionId: DestinationTransactionID;
666
+ isSameSign: IsSameSign1;
661
667
  };
662
668
  /**
663
669
  * UUID for the item
@@ -687,6 +693,10 @@ export type SourceTransactionID = string;
687
693
  * UUID of the destination transaction in the link.
688
694
  */
689
695
  export type DestinationTransactionID = string;
696
+ /**
697
+ * Whether the linked transactions are expected to have matching signs. When false, the linked transactions are expected to have opposite signs.
698
+ */
699
+ export type IsSameSign1 = boolean;
690
700
  /**
691
701
  * Defines a split within a transaction.
692
702
  */
@@ -745,7 +755,7 @@ export interface LucaSchema {
745
755
  /**
746
756
  * Schema contract version of the luca ledger
747
757
  */
748
- schemaVersion: '3.0.0';
758
+ schemaVersion: '3.3.2';
749
759
  /**
750
760
  * List of categories
751
761
  */
@@ -1030,6 +1040,7 @@ export interface Common {
1030
1040
  export type RecurringTransactionLink = Common & {
1031
1041
  sourceRecurringTransactionId: SourceRecurringTransactionID;
1032
1042
  destinationRecurringTransactionId: DestinationRecurringTransactionID;
1043
+ isSameSign: IsSameSign;
1033
1044
  };
1034
1045
  /**
1035
1046
  * UUID for the item
@@ -1059,6 +1070,10 @@ export type SourceRecurringTransactionID = string;
1059
1070
  * UUID of the destination recurring transaction in the link.
1060
1071
  */
1061
1072
  export type DestinationRecurringTransactionID = string;
1073
+ /**
1074
+ * Whether the linked recurring transactions are expected to have matching signs. When false, the linked recurring transactions are expected to have opposite signs.
1075
+ */
1076
+ export type IsSameSign = boolean;
1062
1077
 
1063
1078
  /**
1064
1079
  * Common properties for all schemas
@@ -1257,6 +1272,7 @@ export interface Common {
1257
1272
  export type TransactionLink = Common & {
1258
1273
  sourceTransactionId: SourceTransactionID;
1259
1274
  destinationTransactionId: DestinationTransactionID;
1275
+ isSameSign: IsSameSign;
1260
1276
  };
1261
1277
  /**
1262
1278
  * UUID for the item
@@ -1286,6 +1302,10 @@ export type SourceTransactionID = string;
1286
1302
  * UUID of the destination transaction in the link.
1287
1303
  */
1288
1304
  export type DestinationTransactionID = string;
1305
+ /**
1306
+ * Whether the linked transactions are expected to have matching signs. When false, the linked transactions are expected to have opposite signs.
1307
+ */
1308
+ export type IsSameSign = boolean;
1289
1309
 
1290
1310
  /**
1291
1311
  * Common properties for all schemas
@@ -17,7 +17,7 @@
17
17
  "properties": {
18
18
  "schemaVersion": {
19
19
  "type": "string",
20
- "const": "3.0.0",
20
+ "const": "3.3.2",
21
21
  "description": "Schema contract version of the luca ledger"
22
22
  },
23
23
  "categories": {
@@ -21,11 +21,17 @@
21
21
  "title": "Destination Recurring Transaction ID",
22
22
  "format": "uuid",
23
23
  "description": "UUID of the destination recurring transaction in the link."
24
+ },
25
+ "isSameSign": {
26
+ "type": "boolean",
27
+ "title": "Is Same Sign",
28
+ "description": "Whether the linked recurring transactions are expected to have matching signs. When false, the linked recurring transactions are expected to have opposite signs."
24
29
  }
25
30
  },
26
31
  "unevaluatedProperties": false,
27
32
  "required": [
28
33
  "sourceRecurringTransactionId",
29
- "destinationRecurringTransactionId"
34
+ "destinationRecurringTransactionId",
35
+ "isSameSign"
30
36
  ]
31
37
  }
@@ -21,8 +21,13 @@
21
21
  "title": "Destination Transaction ID",
22
22
  "format": "uuid",
23
23
  "description": "UUID of the destination transaction in the link."
24
+ },
25
+ "isSameSign": {
26
+ "type": "boolean",
27
+ "title": "Is Same Sign",
28
+ "description": "Whether the linked transactions are expected to have matching signs. When false, the linked transactions are expected to have opposite signs."
24
29
  }
25
30
  },
26
31
  "unevaluatedProperties": false,
27
- "required": ["sourceTransactionId", "destinationTransactionId"]
32
+ "required": ["sourceTransactionId", "destinationTransactionId", "isSameSign"]
28
33
  }
package/dist/index.d.ts CHANGED
@@ -532,6 +532,7 @@ export type ExpectedDate = string;
532
532
  export type RecurringTransactionLink = Common5 & {
533
533
  sourceRecurringTransactionId: SourceRecurringTransactionID;
534
534
  destinationRecurringTransactionId: DestinationRecurringTransactionID;
535
+ isSameSign: IsSameSign;
535
536
  };
536
537
  /**
537
538
  * UUID for the item
@@ -561,6 +562,10 @@ export type SourceRecurringTransactionID = string;
561
562
  * UUID of the destination recurring transaction in the link.
562
563
  */
563
564
  export type DestinationRecurringTransactionID = string;
565
+ /**
566
+ * Whether the linked recurring transactions are expected to have matching signs. When false, the linked recurring transactions are expected to have opposite signs.
567
+ */
568
+ export type IsSameSign = boolean;
564
569
  export type Transaction = Common6 & {
565
570
  accountId: AccountID2;
566
571
  date: Date;
@@ -658,6 +663,7 @@ export type AggregationServiceID1 = string | null;
658
663
  export type TransactionLink = Common7 & {
659
664
  sourceTransactionId: SourceTransactionID;
660
665
  destinationTransactionId: DestinationTransactionID;
666
+ isSameSign: IsSameSign1;
661
667
  };
662
668
  /**
663
669
  * UUID for the item
@@ -687,6 +693,10 @@ export type SourceTransactionID = string;
687
693
  * UUID of the destination transaction in the link.
688
694
  */
689
695
  export type DestinationTransactionID = string;
696
+ /**
697
+ * Whether the linked transactions are expected to have matching signs. When false, the linked transactions are expected to have opposite signs.
698
+ */
699
+ export type IsSameSign1 = boolean;
690
700
  /**
691
701
  * Defines a split within a transaction.
692
702
  */
@@ -745,7 +755,7 @@ export interface LucaSchema {
745
755
  /**
746
756
  * Schema contract version of the luca ledger
747
757
  */
748
- schemaVersion: '3.0.0';
758
+ schemaVersion: '3.3.2';
749
759
  /**
750
760
  * List of categories
751
761
  */
@@ -1030,6 +1040,7 @@ export interface Common {
1030
1040
  export type RecurringTransactionLink = Common & {
1031
1041
  sourceRecurringTransactionId: SourceRecurringTransactionID;
1032
1042
  destinationRecurringTransactionId: DestinationRecurringTransactionID;
1043
+ isSameSign: IsSameSign;
1033
1044
  };
1034
1045
  /**
1035
1046
  * UUID for the item
@@ -1059,6 +1070,10 @@ export type SourceRecurringTransactionID = string;
1059
1070
  * UUID of the destination recurring transaction in the link.
1060
1071
  */
1061
1072
  export type DestinationRecurringTransactionID = string;
1073
+ /**
1074
+ * Whether the linked recurring transactions are expected to have matching signs. When false, the linked recurring transactions are expected to have opposite signs.
1075
+ */
1076
+ export type IsSameSign = boolean;
1062
1077
 
1063
1078
  /**
1064
1079
  * Common properties for all schemas
@@ -1257,6 +1272,7 @@ export interface Common {
1257
1272
  export type TransactionLink = Common & {
1258
1273
  sourceTransactionId: SourceTransactionID;
1259
1274
  destinationTransactionId: DestinationTransactionID;
1275
+ isSameSign: IsSameSign;
1260
1276
  };
1261
1277
  /**
1262
1278
  * UUID for the item
@@ -1286,6 +1302,10 @@ export type SourceTransactionID = string;
1286
1302
  * UUID of the destination transaction in the link.
1287
1303
  */
1288
1304
  export type DestinationTransactionID = string;
1305
+ /**
1306
+ * Whether the linked transactions are expected to have matching signs. When false, the linked transactions are expected to have opposite signs.
1307
+ */
1308
+ export type IsSameSign = boolean;
1289
1309
 
1290
1310
  /**
1291
1311
  * Common properties for all schemas
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luca-financial/luca-schema",
3
- "version": "3.3.0",
3
+ "version": "3.3.2",
4
4
  "description": "Schemas for the Luca Ledger application",
5
5
  "author": "Johnathan Aspinwall",
6
6
  "main": "dist/esm/index.js",