@luca-financial/luca-schema 2.1.4 → 2.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,7 +5,11 @@ 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
- ## [Unreleased]
8
+ ## [v2.2.0]
9
+
10
+ ### Changed
11
+
12
+ - Replace statement `status` with boolean `isLocked` and remove `StatementStatus` enum.
9
13
 
10
14
  ## [2.1.3] - 2026-01-18
11
15
 
package/README.md CHANGED
@@ -121,7 +121,7 @@ const statement = {
121
121
  endingBalance: number;
122
122
  totalCharges: number;
123
123
  totalPayments: number;
124
- status: 'draft' | 'current' | 'past' | 'locked';
124
+ isLocked: boolean;
125
125
  createdAt: string;
126
126
  updatedAt: string | null;
127
127
  };
@@ -213,13 +213,6 @@ export type RecurringTransactionState = 'ACTIVE' | 'PAUSED' | 'COMPLETED' | 'CAN
213
213
  * via the `definition` "RecurringTransactionEventStatus".
214
214
  */
215
215
  export type RecurringTransactionEventStatus = 'MODIFIED' | 'DELETED';
216
- /**
217
- * Allowed statuses for statements
218
- *
219
- * This interface was referenced by `LucaSchemaEnums`'s JSON-Schema
220
- * via the `definition` "StatementStatus".
221
- */
222
- export type StatementStatus = 'draft' | 'current' | 'past' | 'locked';
223
216
 
224
217
  /**
225
218
  * Shared enumerations for Luca Schema objects
@@ -353,10 +346,7 @@ export type Statement = Common2 & {
353
346
  endingBalance: EndingBalance;
354
347
  totalCharges: TotalCharges;
355
348
  totalPayments: TotalPayments;
356
- /**
357
- * Allowed statuses for statements
358
- */
359
- status: 'draft' | 'current' | 'past' | 'locked';
349
+ isLocked: IsLocked;
360
350
  };
361
351
  /**
362
352
  * UUID for the item
@@ -406,6 +396,10 @@ export type TotalCharges = number;
406
396
  * Sum of all payments/credits during the statement period in integer minor units
407
397
  */
408
398
  export type TotalPayments = number;
399
+ /**
400
+ * Whether the statement is locked for editing
401
+ */
402
+ export type IsLocked = boolean;
409
403
  /**
410
404
  * Defines recurring financial transactions within the application.
411
405
  */
@@ -953,10 +947,7 @@ export type Statement = Common & {
953
947
  endingBalance: EndingBalance;
954
948
  totalCharges: TotalCharges;
955
949
  totalPayments: TotalPayments;
956
- /**
957
- * Allowed statuses for statements
958
- */
959
- status: 'draft' | 'current' | 'past' | 'locked';
950
+ isLocked: IsLocked;
960
951
  };
961
952
  /**
962
953
  * UUID for the item
@@ -1006,6 +997,10 @@ export type TotalCharges = number;
1006
997
  * Sum of all payments/credits during the statement period in integer minor units
1007
998
  */
1008
999
  export type TotalPayments = number;
1000
+ /**
1001
+ * Whether the statement is locked for editing
1002
+ */
1003
+ export type IsLocked = boolean;
1009
1004
 
1010
1005
  /**
1011
1006
  * Common properties for all schemas
@@ -49,11 +49,6 @@
49
49
  "type": "string",
50
50
  "enum": ["MODIFIED", "DELETED"],
51
51
  "description": "Allowed statuses for recurring transaction events"
52
- },
53
- "StatementStatus": {
54
- "type": "string",
55
- "enum": ["draft", "current", "past", "locked"],
56
- "description": "Allowed statuses for statements"
57
52
  }
58
53
  }
59
54
  }
@@ -50,11 +50,11 @@
50
50
  "minimum": 0,
51
51
  "description": "Sum of all payments/credits during the statement period in integer minor units"
52
52
  },
53
- "status": {
54
- "type": "string",
55
- "title": "Statement Status",
56
- "$ref": "./enums.json#/$defs/StatementStatus",
57
- "description": "Current status of the statement"
53
+ "isLocked": {
54
+ "type": "boolean",
55
+ "title": "Is Locked",
56
+ "default": false,
57
+ "description": "Whether the statement is locked for editing"
58
58
  }
59
59
  },
60
60
  "required": [
@@ -65,6 +65,6 @@
65
65
  "endingBalance",
66
66
  "totalCharges",
67
67
  "totalPayments",
68
- "status"
68
+ "isLocked"
69
69
  ]
70
70
  }
package/dist/index.d.ts CHANGED
@@ -213,13 +213,6 @@ export type RecurringTransactionState = 'ACTIVE' | 'PAUSED' | 'COMPLETED' | 'CAN
213
213
  * via the `definition` "RecurringTransactionEventStatus".
214
214
  */
215
215
  export type RecurringTransactionEventStatus = 'MODIFIED' | 'DELETED';
216
- /**
217
- * Allowed statuses for statements
218
- *
219
- * This interface was referenced by `LucaSchemaEnums`'s JSON-Schema
220
- * via the `definition` "StatementStatus".
221
- */
222
- export type StatementStatus = 'draft' | 'current' | 'past' | 'locked';
223
216
 
224
217
  /**
225
218
  * Shared enumerations for Luca Schema objects
@@ -353,10 +346,7 @@ export type Statement = Common2 & {
353
346
  endingBalance: EndingBalance;
354
347
  totalCharges: TotalCharges;
355
348
  totalPayments: TotalPayments;
356
- /**
357
- * Allowed statuses for statements
358
- */
359
- status: 'draft' | 'current' | 'past' | 'locked';
349
+ isLocked: IsLocked;
360
350
  };
361
351
  /**
362
352
  * UUID for the item
@@ -406,6 +396,10 @@ export type TotalCharges = number;
406
396
  * Sum of all payments/credits during the statement period in integer minor units
407
397
  */
408
398
  export type TotalPayments = number;
399
+ /**
400
+ * Whether the statement is locked for editing
401
+ */
402
+ export type IsLocked = boolean;
409
403
  /**
410
404
  * Defines recurring financial transactions within the application.
411
405
  */
@@ -953,10 +947,7 @@ export type Statement = Common & {
953
947
  endingBalance: EndingBalance;
954
948
  totalCharges: TotalCharges;
955
949
  totalPayments: TotalPayments;
956
- /**
957
- * Allowed statuses for statements
958
- */
959
- status: 'draft' | 'current' | 'past' | 'locked';
950
+ isLocked: IsLocked;
960
951
  };
961
952
  /**
962
953
  * UUID for the item
@@ -1006,6 +997,10 @@ export type TotalCharges = number;
1006
997
  * Sum of all payments/credits during the statement period in integer minor units
1007
998
  */
1008
999
  export type TotalPayments = number;
1000
+ /**
1001
+ * Whether the statement is locked for editing
1002
+ */
1003
+ export type IsLocked = boolean;
1009
1004
 
1010
1005
  /**
1011
1006
  * Common properties for all schemas
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luca-financial/luca-schema",
3
- "version": "2.1.4",
3
+ "version": "2.2.0",
4
4
  "description": "Schemas for the Luca Ledger application",
5
5
  "author": "Johnathan Aspinwall",
6
6
  "main": "dist/esm/index.js",