@firela/api-types 0.0.0-canary.6feee68d → 0.0.0-canary.70d4c0d2
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/dist/index.d.mts +5383 -2837
- package/dist/index.d.ts +5383 -2837
- package/dist/index.js +93 -7
- package/dist/index.mjs +93 -7
- package/package.json +2 -3
- package/src/generated/schemas.gen.ts +5921 -3010
- package/src/generated/services.gen.ts +1737 -704
- package/src/generated/types.gen.ts +26571 -3176
package/dist/index.js
CHANGED
|
@@ -484,7 +484,7 @@ var BeanAccountsService = class {
|
|
|
484
484
|
* @param data.type Filter by account type
|
|
485
485
|
* @param data.status Filter by status
|
|
486
486
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
487
|
-
* @param data.search Search term
|
|
487
|
+
* @param data.search Search term matched against account path and user-set display name (case-insensitive)
|
|
488
488
|
* @param data.limit Maximum number of results
|
|
489
489
|
* @param data.offset Number of results to skip
|
|
490
490
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -556,7 +556,7 @@ var BeanAccountsService = class {
|
|
|
556
556
|
}
|
|
557
557
|
/**
|
|
558
558
|
* Delete account
|
|
559
|
-
* Deletes an account (only if no transactions)
|
|
559
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
560
560
|
* @param data The data for the request.
|
|
561
561
|
* @param data.id Account UUID
|
|
562
562
|
* @param data.region Region code for tenant context
|
|
@@ -573,7 +573,7 @@ var BeanAccountsService = class {
|
|
|
573
573
|
},
|
|
574
574
|
errors: {
|
|
575
575
|
404: "Account not found",
|
|
576
|
-
409: "Account has transactions and cannot be deleted"
|
|
576
|
+
409: "Account has active transactions and cannot be deleted"
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
579
|
}
|
|
@@ -629,6 +629,32 @@ var BeanAccountsService = class {
|
|
|
629
629
|
}
|
|
630
630
|
});
|
|
631
631
|
}
|
|
632
|
+
/**
|
|
633
|
+
* Post an opening-balance transaction
|
|
634
|
+
* Posts a double-entry opening-balance transaction against Equity:Opening-Balances for an existing Assets/Liabilities account. At most one active opening balance per account.
|
|
635
|
+
* @param data The data for the request.
|
|
636
|
+
* @param data.id Account UUID
|
|
637
|
+
* @param data.region Region code for tenant context
|
|
638
|
+
* @param data.requestBody
|
|
639
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
640
|
+
* @throws ApiError
|
|
641
|
+
*/
|
|
642
|
+
static accountControllerAddOpeningBalance(data) {
|
|
643
|
+
return request(OpenAPI, {
|
|
644
|
+
method: "POST",
|
|
645
|
+
url: "/api/v1/{region}/bean/accounts/{id}/opening-balance",
|
|
646
|
+
path: {
|
|
647
|
+
id: data.id,
|
|
648
|
+
region: data.region
|
|
649
|
+
},
|
|
650
|
+
body: data.requestBody,
|
|
651
|
+
mediaType: "application/json",
|
|
652
|
+
errors: {
|
|
653
|
+
404: "Account not found",
|
|
654
|
+
409: "An opening balance already exists for this account"
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
}
|
|
632
658
|
};
|
|
633
659
|
var BeanTransactionsService = class {
|
|
634
660
|
/**
|
|
@@ -667,9 +693,11 @@ var BeanTransactionsService = class {
|
|
|
667
693
|
* @param data.offset Number of items to skip (default: 0)
|
|
668
694
|
* @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
|
|
669
695
|
* @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
|
|
670
|
-
* @param data.status Filter by transaction status
|
|
696
|
+
* @param data.status Filter by transaction status: single value, comma-separated multi-value (e.g. VOIDED,SUPERSEDED), or ALL to include audit rows. Defaults to ACTIVE-only (ADR-0128; previously unfiltered — breaking change).
|
|
671
697
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
672
698
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
699
|
+
* @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an account whose derived Group segment equals this value. Must be accompanied by flow (ADR-0126).
|
|
700
|
+
* @param data.flow Required when category is present (400 otherwise) and vice versa (ADR-0126). Restricts the category account set to the flow root (income → Income:, expense → Expenses:) and drives the per-leg sign normalization of row viewpointAmount and the summary. OpenAPI cannot express conditional requiredness — the pairing is enforced at runtime.
|
|
673
701
|
* @returns TransactionListResponseDto Transaction list
|
|
674
702
|
* @throws ApiError
|
|
675
703
|
*/
|
|
@@ -687,7 +715,9 @@ var BeanTransactionsService = class {
|
|
|
687
715
|
dateTo: data.dateTo,
|
|
688
716
|
status: data.status,
|
|
689
717
|
search: data.search,
|
|
690
|
-
accountId: data.accountId
|
|
718
|
+
accountId: data.accountId,
|
|
719
|
+
category: data.category,
|
|
720
|
+
flow: data.flow
|
|
691
721
|
},
|
|
692
722
|
errors: {
|
|
693
723
|
400: "Validation failed",
|
|
@@ -720,6 +750,62 @@ var BeanTransactionsService = class {
|
|
|
720
750
|
}
|
|
721
751
|
});
|
|
722
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* Correct (supersede) a transaction
|
|
755
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
756
|
+
* @param data The data for the request.
|
|
757
|
+
* @param data.id Original transaction ID to correct
|
|
758
|
+
* @param data.region Region code for tenant context
|
|
759
|
+
* @param data.requestBody
|
|
760
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
761
|
+
* @throws ApiError
|
|
762
|
+
*/
|
|
763
|
+
static transactionControllerCorrect(data) {
|
|
764
|
+
return request(OpenAPI, {
|
|
765
|
+
method: "POST",
|
|
766
|
+
url: "/api/v1/{region}/bean/transactions/{id}/correct",
|
|
767
|
+
path: {
|
|
768
|
+
id: data.id,
|
|
769
|
+
region: data.region
|
|
770
|
+
},
|
|
771
|
+
body: data.requestBody,
|
|
772
|
+
mediaType: "application/json",
|
|
773
|
+
errors: {
|
|
774
|
+
404: "Original transaction not found",
|
|
775
|
+
409: "Original no longer ACTIVE (concurrent modification)",
|
|
776
|
+
422: "Pipeline validation failed (does not balance, invalid accounts)"
|
|
777
|
+
}
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Suggest transaction tags
|
|
782
|
+
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
783
|
+
* @param data The data for the request.
|
|
784
|
+
* @param data.region Region code for tenant context
|
|
785
|
+
* @param data.q Prefix match, case-insensitive (max 50 chars)
|
|
786
|
+
* @param data.sort usage (default) or name
|
|
787
|
+
* @param data.limit Max suggestions (1-100, default 10)
|
|
788
|
+
* @returns TagSuggestionsResponseDto Tag suggestions
|
|
789
|
+
* @throws ApiError
|
|
790
|
+
*/
|
|
791
|
+
static transactionControllerSuggestTags(data) {
|
|
792
|
+
return request(OpenAPI, {
|
|
793
|
+
method: "GET",
|
|
794
|
+
url: "/api/v1/{region}/bean/transactions/tags",
|
|
795
|
+
path: {
|
|
796
|
+
region: data.region
|
|
797
|
+
},
|
|
798
|
+
query: {
|
|
799
|
+
q: data.q,
|
|
800
|
+
sort: data.sort,
|
|
801
|
+
limit: data.limit
|
|
802
|
+
},
|
|
803
|
+
errors: {
|
|
804
|
+
400: "Validation failed",
|
|
805
|
+
401: "Authentication required"
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
}
|
|
723
809
|
/**
|
|
724
810
|
* Get transaction detail
|
|
725
811
|
* Returns transaction details including all postings
|
|
@@ -800,7 +886,7 @@ var BeanBalancesService = class {
|
|
|
800
886
|
* Query account balance
|
|
801
887
|
* Calculate account balance at a specific date for a single currency
|
|
802
888
|
* @param data The data for the request.
|
|
803
|
-
* @param data.account Account name (e.g., "Assets:
|
|
889
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
804
890
|
* @param data.region Region code for tenant context
|
|
805
891
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
806
892
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -1028,7 +1114,7 @@ var ProviderSyncService = class {
|
|
|
1028
1114
|
*
|
|
1029
1115
|
* @param data The data for the request.
|
|
1030
1116
|
* @param data.providerName Provider name
|
|
1031
|
-
* @param data.region Region code
|
|
1117
|
+
* @param data.region Region code for tenant context
|
|
1032
1118
|
* @param data.requestBody
|
|
1033
1119
|
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
1034
1120
|
* @throws ApiError
|
package/dist/index.mjs
CHANGED
|
@@ -452,7 +452,7 @@ var BeanAccountsService = class {
|
|
|
452
452
|
* @param data.type Filter by account type
|
|
453
453
|
* @param data.status Filter by status
|
|
454
454
|
* @param data.isCustom Filter by custom (user-created) accounts only
|
|
455
|
-
* @param data.search Search term
|
|
455
|
+
* @param data.search Search term matched against account path and user-set display name (case-insensitive)
|
|
456
456
|
* @param data.limit Maximum number of results
|
|
457
457
|
* @param data.offset Number of results to skip
|
|
458
458
|
* @returns AccountListResponseDto Accounts retrieved successfully
|
|
@@ -524,7 +524,7 @@ var BeanAccountsService = class {
|
|
|
524
524
|
}
|
|
525
525
|
/**
|
|
526
526
|
* Delete account
|
|
527
|
-
* Deletes an account (only if no transactions)
|
|
527
|
+
* Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
|
|
528
528
|
* @param data The data for the request.
|
|
529
529
|
* @param data.id Account UUID
|
|
530
530
|
* @param data.region Region code for tenant context
|
|
@@ -541,7 +541,7 @@ var BeanAccountsService = class {
|
|
|
541
541
|
},
|
|
542
542
|
errors: {
|
|
543
543
|
404: "Account not found",
|
|
544
|
-
409: "Account has transactions and cannot be deleted"
|
|
544
|
+
409: "Account has active transactions and cannot be deleted"
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
}
|
|
@@ -597,6 +597,32 @@ var BeanAccountsService = class {
|
|
|
597
597
|
}
|
|
598
598
|
});
|
|
599
599
|
}
|
|
600
|
+
/**
|
|
601
|
+
* Post an opening-balance transaction
|
|
602
|
+
* Posts a double-entry opening-balance transaction against Equity:Opening-Balances for an existing Assets/Liabilities account. At most one active opening balance per account.
|
|
603
|
+
* @param data The data for the request.
|
|
604
|
+
* @param data.id Account UUID
|
|
605
|
+
* @param data.region Region code for tenant context
|
|
606
|
+
* @param data.requestBody
|
|
607
|
+
* @returns OpeningBalanceResultDto Opening-balance transaction created
|
|
608
|
+
* @throws ApiError
|
|
609
|
+
*/
|
|
610
|
+
static accountControllerAddOpeningBalance(data) {
|
|
611
|
+
return request(OpenAPI, {
|
|
612
|
+
method: "POST",
|
|
613
|
+
url: "/api/v1/{region}/bean/accounts/{id}/opening-balance",
|
|
614
|
+
path: {
|
|
615
|
+
id: data.id,
|
|
616
|
+
region: data.region
|
|
617
|
+
},
|
|
618
|
+
body: data.requestBody,
|
|
619
|
+
mediaType: "application/json",
|
|
620
|
+
errors: {
|
|
621
|
+
404: "Account not found",
|
|
622
|
+
409: "An opening balance already exists for this account"
|
|
623
|
+
}
|
|
624
|
+
});
|
|
625
|
+
}
|
|
600
626
|
};
|
|
601
627
|
var BeanTransactionsService = class {
|
|
602
628
|
/**
|
|
@@ -635,9 +661,11 @@ var BeanTransactionsService = class {
|
|
|
635
661
|
* @param data.offset Number of items to skip (default: 0)
|
|
636
662
|
* @param data.dateFrom Filter by start date (inclusive), format: YYYY-MM-DD
|
|
637
663
|
* @param data.dateTo Filter by end date (inclusive), format: YYYY-MM-DD
|
|
638
|
-
* @param data.status Filter by transaction status
|
|
664
|
+
* @param data.status Filter by transaction status: single value, comma-separated multi-value (e.g. VOIDED,SUPERSEDED), or ALL to include audit rows. Defaults to ACTIVE-only (ADR-0128; previously unfiltered — breaking change).
|
|
639
665
|
* @param data.search Search in narration and payee fields (max 200 chars)
|
|
640
666
|
* @param data.accountId Filter by account ID (transactions with postings to this account)
|
|
667
|
+
* @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an account whose derived Group segment equals this value. Must be accompanied by flow (ADR-0126).
|
|
668
|
+
* @param data.flow Required when category is present (400 otherwise) and vice versa (ADR-0126). Restricts the category account set to the flow root (income → Income:, expense → Expenses:) and drives the per-leg sign normalization of row viewpointAmount and the summary. OpenAPI cannot express conditional requiredness — the pairing is enforced at runtime.
|
|
641
669
|
* @returns TransactionListResponseDto Transaction list
|
|
642
670
|
* @throws ApiError
|
|
643
671
|
*/
|
|
@@ -655,7 +683,9 @@ var BeanTransactionsService = class {
|
|
|
655
683
|
dateTo: data.dateTo,
|
|
656
684
|
status: data.status,
|
|
657
685
|
search: data.search,
|
|
658
|
-
accountId: data.accountId
|
|
686
|
+
accountId: data.accountId,
|
|
687
|
+
category: data.category,
|
|
688
|
+
flow: data.flow
|
|
659
689
|
},
|
|
660
690
|
errors: {
|
|
661
691
|
400: "Validation failed",
|
|
@@ -688,6 +718,62 @@ var BeanTransactionsService = class {
|
|
|
688
718
|
}
|
|
689
719
|
});
|
|
690
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* Correct (supersede) a transaction
|
|
723
|
+
* Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
|
|
724
|
+
* @param data The data for the request.
|
|
725
|
+
* @param data.id Original transaction ID to correct
|
|
726
|
+
* @param data.region Region code for tenant context
|
|
727
|
+
* @param data.requestBody
|
|
728
|
+
* @returns TransactionDetailDto Corrected transaction created
|
|
729
|
+
* @throws ApiError
|
|
730
|
+
*/
|
|
731
|
+
static transactionControllerCorrect(data) {
|
|
732
|
+
return request(OpenAPI, {
|
|
733
|
+
method: "POST",
|
|
734
|
+
url: "/api/v1/{region}/bean/transactions/{id}/correct",
|
|
735
|
+
path: {
|
|
736
|
+
id: data.id,
|
|
737
|
+
region: data.region
|
|
738
|
+
},
|
|
739
|
+
body: data.requestBody,
|
|
740
|
+
mediaType: "application/json",
|
|
741
|
+
errors: {
|
|
742
|
+
404: "Original transaction not found",
|
|
743
|
+
409: "Original no longer ACTIVE (concurrent modification)",
|
|
744
|
+
422: "Pipeline validation failed (does not balance, invalid accounts)"
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Suggest transaction tags
|
|
750
|
+
* Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
|
|
751
|
+
* @param data The data for the request.
|
|
752
|
+
* @param data.region Region code for tenant context
|
|
753
|
+
* @param data.q Prefix match, case-insensitive (max 50 chars)
|
|
754
|
+
* @param data.sort usage (default) or name
|
|
755
|
+
* @param data.limit Max suggestions (1-100, default 10)
|
|
756
|
+
* @returns TagSuggestionsResponseDto Tag suggestions
|
|
757
|
+
* @throws ApiError
|
|
758
|
+
*/
|
|
759
|
+
static transactionControllerSuggestTags(data) {
|
|
760
|
+
return request(OpenAPI, {
|
|
761
|
+
method: "GET",
|
|
762
|
+
url: "/api/v1/{region}/bean/transactions/tags",
|
|
763
|
+
path: {
|
|
764
|
+
region: data.region
|
|
765
|
+
},
|
|
766
|
+
query: {
|
|
767
|
+
q: data.q,
|
|
768
|
+
sort: data.sort,
|
|
769
|
+
limit: data.limit
|
|
770
|
+
},
|
|
771
|
+
errors: {
|
|
772
|
+
400: "Validation failed",
|
|
773
|
+
401: "Authentication required"
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
}
|
|
691
777
|
/**
|
|
692
778
|
* Get transaction detail
|
|
693
779
|
* Returns transaction details including all postings
|
|
@@ -768,7 +854,7 @@ var BeanBalancesService = class {
|
|
|
768
854
|
* Query account balance
|
|
769
855
|
* Calculate account balance at a specific date for a single currency
|
|
770
856
|
* @param data The data for the request.
|
|
771
|
-
* @param data.account Account name (e.g., "Assets:
|
|
857
|
+
* @param data.account Account name (e.g., "Assets:Checking")
|
|
772
858
|
* @param data.region Region code for tenant context
|
|
773
859
|
* @param data.date Date to calculate balance at (ISO 8601 format)
|
|
774
860
|
* @param data.currency Currency to query (e.g., "USD", "CNY")
|
|
@@ -996,7 +1082,7 @@ var ProviderSyncService = class {
|
|
|
996
1082
|
*
|
|
997
1083
|
* @param data The data for the request.
|
|
998
1084
|
* @param data.providerName Provider name
|
|
999
|
-
* @param data.region Region code
|
|
1085
|
+
* @param data.region Region code for tenant context
|
|
1000
1086
|
* @param data.requestBody
|
|
1001
1087
|
* @returns ProviderSyncResponseDto Sync completed successfully
|
|
1002
1088
|
* @throws ApiError
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firela/api-types",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.70d4c0d2",
|
|
4
4
|
"description": "TypeScript types generated from IGN OpenAPI specification",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "FireLa Team",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"src"
|
|
25
25
|
],
|
|
26
26
|
"scripts": {
|
|
27
|
-
"
|
|
28
|
-
"generate": "npm run sync && openapi-ts",
|
|
27
|
+
"generate": "openapi-ts",
|
|
29
28
|
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
30
29
|
"lint": "spectral lint openapi.yaml",
|
|
31
30
|
"prepublishOnly": "npm run generate && npm run build"
|