@firela/api-types 0.0.0-canary.8a8b3972 → 0.0.0-canary.8cbdced0
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 +61 -728
- package/dist/index.d.ts +61 -728
- package/dist/index.js +16 -71
- package/dist/index.mjs +16 -71
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +47 -818
- package/src/generated/services.gen.ts +20 -89
- package/src/generated/types.gen.ts +50 -734
|
@@ -442,6 +442,25 @@ export type CreateTransactionDto = {
|
|
|
442
442
|
*/
|
|
443
443
|
export type flag = '*' | '!';
|
|
444
444
|
|
|
445
|
+
export type CostDetailDto = {
|
|
446
|
+
/**
|
|
447
|
+
* Per-unit cost basis (mirrors engine Cost.number)
|
|
448
|
+
*/
|
|
449
|
+
number?: string;
|
|
450
|
+
/**
|
|
451
|
+
* Cost currency
|
|
452
|
+
*/
|
|
453
|
+
currency?: string;
|
|
454
|
+
/**
|
|
455
|
+
* Lot acquisition date (ISO yyyy-mm-dd)
|
|
456
|
+
*/
|
|
457
|
+
date?: string;
|
|
458
|
+
/**
|
|
459
|
+
* Lot label
|
|
460
|
+
*/
|
|
461
|
+
label?: string;
|
|
462
|
+
};
|
|
463
|
+
|
|
445
464
|
export type PostingResponseDto = {
|
|
446
465
|
/**
|
|
447
466
|
* Account name
|
|
@@ -455,6 +474,10 @@ export type PostingResponseDto = {
|
|
|
455
474
|
* Currency
|
|
456
475
|
*/
|
|
457
476
|
currency?: string;
|
|
477
|
+
/**
|
|
478
|
+
* Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.
|
|
479
|
+
*/
|
|
480
|
+
cost?: CostDetailDto;
|
|
458
481
|
};
|
|
459
482
|
|
|
460
483
|
export type RecurringSuggestionDto = {
|
|
@@ -698,6 +721,10 @@ export type PostingDetailDto = {
|
|
|
698
721
|
* Cost date
|
|
699
722
|
*/
|
|
700
723
|
costDate?: string;
|
|
724
|
+
/**
|
|
725
|
+
* Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.
|
|
726
|
+
*/
|
|
727
|
+
cost?: CostDetailDto;
|
|
701
728
|
/**
|
|
702
729
|
* Price amount
|
|
703
730
|
*/
|
|
@@ -1297,17 +1324,17 @@ export type ResolveResultDto = {
|
|
|
1297
1324
|
[key: string]: string;
|
|
1298
1325
|
};
|
|
1299
1326
|
/**
|
|
1300
|
-
* Resolution ID for undo
|
|
1327
|
+
* Resolution ID for undo. Absent when the resolver rejected the decision (review stayed PENDING).
|
|
1301
1328
|
*/
|
|
1302
|
-
resolutionId
|
|
1329
|
+
resolutionId?: string;
|
|
1303
1330
|
/**
|
|
1304
1331
|
* Whether this decision can be undone
|
|
1305
1332
|
*/
|
|
1306
|
-
canUndo
|
|
1333
|
+
canUndo?: boolean;
|
|
1307
1334
|
/**
|
|
1308
1335
|
* Deadline for undo (24h from resolution)
|
|
1309
1336
|
*/
|
|
1310
|
-
undoDeadline
|
|
1337
|
+
undoDeadline?: string;
|
|
1311
1338
|
/**
|
|
1312
1339
|
* Rule ID if learning was triggered (ACCEPT_AND_LEARN actions). Use this to deep-link to the rule management page.
|
|
1313
1340
|
*/
|
|
@@ -3430,33 +3457,6 @@ export type ProviderSyncDto = {
|
|
|
3430
3457
|
transactions: unknown[];
|
|
3431
3458
|
};
|
|
3432
3459
|
|
|
3433
|
-
export type ProviderSyncResponseDto = {
|
|
3434
|
-
/**
|
|
3435
|
-
* Number of transactions successfully imported
|
|
3436
|
-
*/
|
|
3437
|
-
imported: number;
|
|
3438
|
-
/**
|
|
3439
|
-
* Number of transactions skipped (duplicates)
|
|
3440
|
-
*/
|
|
3441
|
-
skipped: number;
|
|
3442
|
-
/**
|
|
3443
|
-
* Number of transactions pending review
|
|
3444
|
-
*/
|
|
3445
|
-
pendingReview: number;
|
|
3446
|
-
/**
|
|
3447
|
-
* Number of transactions that failed to import
|
|
3448
|
-
*/
|
|
3449
|
-
failed: number;
|
|
3450
|
-
/**
|
|
3451
|
-
* IDs of successfully imported transactions
|
|
3452
|
-
*/
|
|
3453
|
-
importedTransactionIds?: Array<string>;
|
|
3454
|
-
/**
|
|
3455
|
-
* IDs of review items created for branched transactions
|
|
3456
|
-
*/
|
|
3457
|
-
reviewItemIds?: Array<string>;
|
|
3458
|
-
};
|
|
3459
|
-
|
|
3460
3460
|
export type SupportedProvidersResponseDto = {
|
|
3461
3461
|
/**
|
|
3462
3462
|
* List of supported provider names
|
|
@@ -3485,564 +3485,6 @@ export type ProcessNlpDto = {
|
|
|
3485
3485
|
};
|
|
3486
3486
|
};
|
|
3487
3487
|
|
|
3488
|
-
export type NlpTransactionInfoDto = {
|
|
3489
|
-
/**
|
|
3490
|
-
* Transaction ID
|
|
3491
|
-
*/
|
|
3492
|
-
id: string;
|
|
3493
|
-
/**
|
|
3494
|
-
* Transaction date (ISO format)
|
|
3495
|
-
*/
|
|
3496
|
-
date: string;
|
|
3497
|
-
/**
|
|
3498
|
-
* Transaction amount
|
|
3499
|
-
*/
|
|
3500
|
-
amount: number;
|
|
3501
|
-
/**
|
|
3502
|
-
* Currency code
|
|
3503
|
-
*/
|
|
3504
|
-
currency: string;
|
|
3505
|
-
/**
|
|
3506
|
-
* Payee name
|
|
3507
|
-
*/
|
|
3508
|
-
payee?: string;
|
|
3509
|
-
/**
|
|
3510
|
-
* Transaction narration
|
|
3511
|
-
*/
|
|
3512
|
-
narration?: string;
|
|
3513
|
-
/**
|
|
3514
|
-
* Warning message for special transaction scenarios (e.g., cross-currency settlement)
|
|
3515
|
-
*/
|
|
3516
|
-
warning?: string;
|
|
3517
|
-
};
|
|
3518
|
-
|
|
3519
|
-
export type NlpParsedDataDto = {
|
|
3520
|
-
/**
|
|
3521
|
-
* Extracted amount
|
|
3522
|
-
*/
|
|
3523
|
-
amount?: number;
|
|
3524
|
-
/**
|
|
3525
|
-
* Currency code
|
|
3526
|
-
*/
|
|
3527
|
-
currency?: string;
|
|
3528
|
-
/**
|
|
3529
|
-
* Transaction date (ISO format)
|
|
3530
|
-
*/
|
|
3531
|
-
date?: string;
|
|
3532
|
-
/**
|
|
3533
|
-
* Payee name
|
|
3534
|
-
*/
|
|
3535
|
-
payee?: string;
|
|
3536
|
-
/**
|
|
3537
|
-
* Transaction narration
|
|
3538
|
-
*/
|
|
3539
|
-
narration?: string;
|
|
3540
|
-
/**
|
|
3541
|
-
* Category
|
|
3542
|
-
*/
|
|
3543
|
-
category?: string;
|
|
3544
|
-
/**
|
|
3545
|
-
* Income type (e.g., Salary, Bonus, Dividend, Interest)
|
|
3546
|
-
*/
|
|
3547
|
-
incomeType?: string;
|
|
3548
|
-
/**
|
|
3549
|
-
* Income source (e.g., company name)
|
|
3550
|
-
*/
|
|
3551
|
-
incomeSource?: string;
|
|
3552
|
-
/**
|
|
3553
|
-
* Security symbol code (e.g., 600519, AAPL)
|
|
3554
|
-
*/
|
|
3555
|
-
symbol?: string;
|
|
3556
|
-
/**
|
|
3557
|
-
* Quantity of shares/units
|
|
3558
|
-
*/
|
|
3559
|
-
quantity?: number;
|
|
3560
|
-
/**
|
|
3561
|
-
* Unit price per share/unit
|
|
3562
|
-
*/
|
|
3563
|
-
price?: number;
|
|
3564
|
-
/**
|
|
3565
|
-
* Investment action
|
|
3566
|
-
*/
|
|
3567
|
-
investmentAction?: 'buy' | 'sell';
|
|
3568
|
-
/**
|
|
3569
|
-
* Payment source: asset (default) or liability (credit card)
|
|
3570
|
-
*/
|
|
3571
|
-
paymentSource?: 'asset' | 'liability';
|
|
3572
|
-
/**
|
|
3573
|
-
* Liability account hint (CreditCard/Huabei/Baitiao)
|
|
3574
|
-
*/
|
|
3575
|
-
liabilityHint?: string;
|
|
3576
|
-
/**
|
|
3577
|
-
* Warning message for special scenarios (e.g., cross-currency settlement)
|
|
3578
|
-
*/
|
|
3579
|
-
warning?: string;
|
|
3580
|
-
};
|
|
3581
|
-
|
|
3582
|
-
/**
|
|
3583
|
-
* Investment action
|
|
3584
|
-
*/
|
|
3585
|
-
export type investmentAction = 'buy' | 'sell';
|
|
3586
|
-
|
|
3587
|
-
/**
|
|
3588
|
-
* Payment source: asset (default) or liability (credit card)
|
|
3589
|
-
*/
|
|
3590
|
-
export type paymentSource = 'asset' | 'liability';
|
|
3591
|
-
|
|
3592
|
-
export type NlpSourceTransactionDto = {
|
|
3593
|
-
/**
|
|
3594
|
-
* Transaction date (ISO format)
|
|
3595
|
-
*/
|
|
3596
|
-
date: string;
|
|
3597
|
-
/**
|
|
3598
|
-
* Amount as string
|
|
3599
|
-
*/
|
|
3600
|
-
amount: string;
|
|
3601
|
-
/**
|
|
3602
|
-
* Currency code
|
|
3603
|
-
*/
|
|
3604
|
-
currency: string;
|
|
3605
|
-
/**
|
|
3606
|
-
* Payee name
|
|
3607
|
-
*/
|
|
3608
|
-
payee?: string;
|
|
3609
|
-
/**
|
|
3610
|
-
* Transaction narration
|
|
3611
|
-
*/
|
|
3612
|
-
narration: string;
|
|
3613
|
-
};
|
|
3614
|
-
|
|
3615
|
-
export type NlpTargetTransactionDto = {
|
|
3616
|
-
/**
|
|
3617
|
-
* Existing transaction ID
|
|
3618
|
-
*/
|
|
3619
|
-
id: string;
|
|
3620
|
-
/**
|
|
3621
|
-
* Transaction date (ISO format)
|
|
3622
|
-
*/
|
|
3623
|
-
date: string;
|
|
3624
|
-
/**
|
|
3625
|
-
* Amount as string
|
|
3626
|
-
*/
|
|
3627
|
-
amount: string;
|
|
3628
|
-
/**
|
|
3629
|
-
* Currency code
|
|
3630
|
-
*/
|
|
3631
|
-
currency: string;
|
|
3632
|
-
/**
|
|
3633
|
-
* Payee name
|
|
3634
|
-
*/
|
|
3635
|
-
payee?: string;
|
|
3636
|
-
/**
|
|
3637
|
-
* Transaction narration
|
|
3638
|
-
*/
|
|
3639
|
-
narration: string;
|
|
3640
|
-
};
|
|
3641
|
-
|
|
3642
|
-
export type NlpSimilarityDto = {
|
|
3643
|
-
/**
|
|
3644
|
-
* Whether dates match
|
|
3645
|
-
*/
|
|
3646
|
-
dateMatch: boolean;
|
|
3647
|
-
/**
|
|
3648
|
-
* Date difference in days
|
|
3649
|
-
*/
|
|
3650
|
-
dateDiff: number;
|
|
3651
|
-
/**
|
|
3652
|
-
* Whether amounts match
|
|
3653
|
-
*/
|
|
3654
|
-
amountMatch: boolean;
|
|
3655
|
-
/**
|
|
3656
|
-
* Amount difference as decimal string
|
|
3657
|
-
*/
|
|
3658
|
-
amountDiff: string;
|
|
3659
|
-
/**
|
|
3660
|
-
* Whether payees match
|
|
3661
|
-
*/
|
|
3662
|
-
payeeMatch: boolean;
|
|
3663
|
-
/**
|
|
3664
|
-
* Payee similarity score (0-1)
|
|
3665
|
-
*/
|
|
3666
|
-
payeeSimilarity: number;
|
|
3667
|
-
/**
|
|
3668
|
-
* Account overlap score (0-1)
|
|
3669
|
-
*/
|
|
3670
|
-
accountOverlap: number;
|
|
3671
|
-
};
|
|
3672
|
-
|
|
3673
|
-
export type NlpDuplicateConfirmationDataDto = {
|
|
3674
|
-
/**
|
|
3675
|
-
* Duplicate detection confidence score (0.5-0.89)
|
|
3676
|
-
*/
|
|
3677
|
-
confidence: number;
|
|
3678
|
-
/**
|
|
3679
|
-
* Source transaction summary (the new transaction being entered)
|
|
3680
|
-
*/
|
|
3681
|
-
sourceTransaction: NlpSourceTransactionDto;
|
|
3682
|
-
/**
|
|
3683
|
-
* Target transaction summary (existing potential duplicate)
|
|
3684
|
-
*/
|
|
3685
|
-
targetTransaction: NlpTargetTransactionDto;
|
|
3686
|
-
/**
|
|
3687
|
-
* Detailed similarity information
|
|
3688
|
-
*/
|
|
3689
|
-
similarity: NlpSimilarityDto;
|
|
3690
|
-
/**
|
|
3691
|
-
* Human-readable reasons for duplicate detection
|
|
3692
|
-
*/
|
|
3693
|
-
reasons: Array<string>;
|
|
3694
|
-
};
|
|
3695
|
-
|
|
3696
|
-
export type NlpRuleConfirmationDataDto = {
|
|
3697
|
-
/**
|
|
3698
|
-
* Rule match confidence score (0.5-0.74)
|
|
3699
|
-
*/
|
|
3700
|
-
confidence: number;
|
|
3701
|
-
/**
|
|
3702
|
-
* Matched rule information
|
|
3703
|
-
*/
|
|
3704
|
-
matchedRule: {
|
|
3705
|
-
[key: string]: unknown;
|
|
3706
|
-
};
|
|
3707
|
-
/**
|
|
3708
|
-
* Suggested accounts from the rule
|
|
3709
|
-
*/
|
|
3710
|
-
suggestedAccounts: {
|
|
3711
|
-
[key: string]: unknown;
|
|
3712
|
-
};
|
|
3713
|
-
/**
|
|
3714
|
-
* Alternative rules that also match
|
|
3715
|
-
*/
|
|
3716
|
-
alternatives: unknown[];
|
|
3717
|
-
/**
|
|
3718
|
-
* Human-readable reasons for the match
|
|
3719
|
-
*/
|
|
3720
|
-
reasons: Array<string>;
|
|
3721
|
-
};
|
|
3722
|
-
|
|
3723
|
-
export type NlpAccountConfirmationDataDto = {
|
|
3724
|
-
/**
|
|
3725
|
-
* The invalid account name
|
|
3726
|
-
*/
|
|
3727
|
-
invalidAccount: string;
|
|
3728
|
-
/**
|
|
3729
|
-
* Suggested replacement account
|
|
3730
|
-
*/
|
|
3731
|
-
suggestedAccount: string;
|
|
3732
|
-
/**
|
|
3733
|
-
* Similar accounts for user selection
|
|
3734
|
-
*/
|
|
3735
|
-
similarAccounts: Array<string>;
|
|
3736
|
-
/**
|
|
3737
|
-
* Error message explaining the issue
|
|
3738
|
-
*/
|
|
3739
|
-
errorMessage: string;
|
|
3740
|
-
/**
|
|
3741
|
-
* Transaction context for reference
|
|
3742
|
-
*/
|
|
3743
|
-
transactionContext: {
|
|
3744
|
-
[key: string]: unknown;
|
|
3745
|
-
};
|
|
3746
|
-
};
|
|
3747
|
-
|
|
3748
|
-
export type NlpSuggestedPayeeDto = {
|
|
3749
|
-
/**
|
|
3750
|
-
* Payee ID
|
|
3751
|
-
*/
|
|
3752
|
-
id: string;
|
|
3753
|
-
/**
|
|
3754
|
-
* Payee name
|
|
3755
|
-
*/
|
|
3756
|
-
name: string;
|
|
3757
|
-
/**
|
|
3758
|
-
* Payee category
|
|
3759
|
-
*/
|
|
3760
|
-
category?: string;
|
|
3761
|
-
/**
|
|
3762
|
-
* Source of the payee
|
|
3763
|
-
*/
|
|
3764
|
-
source?: 'user' | 'global';
|
|
3765
|
-
/**
|
|
3766
|
-
* PayeeProfile ID (if matched from global)
|
|
3767
|
-
*/
|
|
3768
|
-
payeeProfileId?: string;
|
|
3769
|
-
};
|
|
3770
|
-
|
|
3771
|
-
/**
|
|
3772
|
-
* Source of the payee
|
|
3773
|
-
*/
|
|
3774
|
-
export type source = 'user' | 'global';
|
|
3775
|
-
|
|
3776
|
-
export type NlpAlternativePayeeDto = {
|
|
3777
|
-
/**
|
|
3778
|
-
* Payee ID
|
|
3779
|
-
*/
|
|
3780
|
-
id: string;
|
|
3781
|
-
/**
|
|
3782
|
-
* Payee name
|
|
3783
|
-
*/
|
|
3784
|
-
name: string;
|
|
3785
|
-
/**
|
|
3786
|
-
* Similarity score (0-1)
|
|
3787
|
-
*/
|
|
3788
|
-
similarity: number;
|
|
3789
|
-
};
|
|
3790
|
-
|
|
3791
|
-
export type NlpPayeeConfirmationDataDto = {
|
|
3792
|
-
/**
|
|
3793
|
-
* Confidence score for the payee match (0-1)
|
|
3794
|
-
*/
|
|
3795
|
-
confidence: number;
|
|
3796
|
-
/**
|
|
3797
|
-
* Original payee string from user input
|
|
3798
|
-
*/
|
|
3799
|
-
originalPayee: string;
|
|
3800
|
-
/**
|
|
3801
|
-
* Suggested payee to use (null when no similar payees found)
|
|
3802
|
-
*/
|
|
3803
|
-
suggestedPayee?: NlpSuggestedPayeeDto | null;
|
|
3804
|
-
/**
|
|
3805
|
-
* Similarity score between original and suggested (0-1)
|
|
3806
|
-
*/
|
|
3807
|
-
similarity: number;
|
|
3808
|
-
/**
|
|
3809
|
-
* Alternative payee options
|
|
3810
|
-
*/
|
|
3811
|
-
alternatives: Array<NlpAlternativePayeeDto>;
|
|
3812
|
-
/**
|
|
3813
|
-
* Human-readable reasons for the match
|
|
3814
|
-
*/
|
|
3815
|
-
reasons: Array<string>;
|
|
3816
|
-
};
|
|
3817
|
-
|
|
3818
|
-
export type RecurringMatchInfoDto = {
|
|
3819
|
-
/**
|
|
3820
|
-
* Expected transaction ID
|
|
3821
|
-
*/
|
|
3822
|
-
expectedId: string;
|
|
3823
|
-
/**
|
|
3824
|
-
* Recurring rule ID
|
|
3825
|
-
*/
|
|
3826
|
-
ruleId: string;
|
|
3827
|
-
/**
|
|
3828
|
-
* Rule name for display
|
|
3829
|
-
*/
|
|
3830
|
-
ruleName: string;
|
|
3831
|
-
/**
|
|
3832
|
-
* Rule icon
|
|
3833
|
-
*/
|
|
3834
|
-
ruleIcon?: string;
|
|
3835
|
-
/**
|
|
3836
|
-
* Expected date (YYYY-MM-DD)
|
|
3837
|
-
*/
|
|
3838
|
-
expectedDate: string;
|
|
3839
|
-
/**
|
|
3840
|
-
* Expected amount
|
|
3841
|
-
*/
|
|
3842
|
-
expectedAmount: number;
|
|
3843
|
-
/**
|
|
3844
|
-
* Match confidence score (0-1)
|
|
3845
|
-
*/
|
|
3846
|
-
confidence: number;
|
|
3847
|
-
/**
|
|
3848
|
-
* Whether auto-matched (confidence >= 0.82)
|
|
3849
|
-
*/
|
|
3850
|
-
isAutoMatched: boolean;
|
|
3851
|
-
};
|
|
3852
|
-
|
|
3853
|
-
export type NlpSuggestedAccountDto = {
|
|
3854
|
-
/**
|
|
3855
|
-
* Suggested account path
|
|
3856
|
-
*/
|
|
3857
|
-
account: string;
|
|
3858
|
-
/**
|
|
3859
|
-
* Confidence score for this suggestion (0-1)
|
|
3860
|
-
*/
|
|
3861
|
-
confidence?: number;
|
|
3862
|
-
};
|
|
3863
|
-
|
|
3864
|
-
export type NlpSuggestedAccountsDto = {
|
|
3865
|
-
/**
|
|
3866
|
-
* Source account suggestion (where money comes from). For expense: asset/liability account. For income: income account.
|
|
3867
|
-
*/
|
|
3868
|
-
source?: NlpSuggestedAccountDto;
|
|
3869
|
-
/**
|
|
3870
|
-
* Destination account suggestion (where money goes to). For expense: expense account. For income: asset/liability account.
|
|
3871
|
-
*/
|
|
3872
|
-
destination?: NlpSuggestedAccountDto;
|
|
3873
|
-
};
|
|
3874
|
-
|
|
3875
|
-
export type NlpDefaultAccountsDto = {
|
|
3876
|
-
/**
|
|
3877
|
-
* Default asset account
|
|
3878
|
-
*/
|
|
3879
|
-
asset: string;
|
|
3880
|
-
/**
|
|
3881
|
-
* Default expense account
|
|
3882
|
-
*/
|
|
3883
|
-
expense: string;
|
|
3884
|
-
/**
|
|
3885
|
-
* Default income account
|
|
3886
|
-
*/
|
|
3887
|
-
income: string;
|
|
3888
|
-
/**
|
|
3889
|
-
* Default liability account
|
|
3890
|
-
*/
|
|
3891
|
-
liability: string;
|
|
3892
|
-
};
|
|
3893
|
-
|
|
3894
|
-
export type NlpResponseDto = {
|
|
3895
|
-
/**
|
|
3896
|
-
* Response status
|
|
3897
|
-
*/
|
|
3898
|
-
status: 'success' | 'pending' | 'error';
|
|
3899
|
-
/**
|
|
3900
|
-
* Action taken or requested
|
|
3901
|
-
*/
|
|
3902
|
-
action:
|
|
3903
|
-
| 'created'
|
|
3904
|
-
| 'ask'
|
|
3905
|
-
| 'confirm'
|
|
3906
|
-
| 'confirm_duplicate'
|
|
3907
|
-
| 'confirm_rule'
|
|
3908
|
-
| 'confirm_account'
|
|
3909
|
-
| 'confirm_payee'
|
|
3910
|
-
| 'cancel';
|
|
3911
|
-
/**
|
|
3912
|
-
* Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
|
|
3913
|
-
*/
|
|
3914
|
-
intent?: 'expense' | 'asset' | 'income' | 'liability' | 'equity';
|
|
3915
|
-
/**
|
|
3916
|
-
* Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
|
|
3917
|
-
*/
|
|
3918
|
-
assetSubType?: 'transfer' | 'banking' | 'investment';
|
|
3919
|
-
/**
|
|
3920
|
-
* Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
|
|
3921
|
-
*/
|
|
3922
|
-
liabilitySubType?: 'borrow' | 'repay';
|
|
3923
|
-
/**
|
|
3924
|
-
* Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
|
|
3925
|
-
*/
|
|
3926
|
-
equitySubType?: 'opening' | 'adjustment';
|
|
3927
|
-
/**
|
|
3928
|
-
* Payment source for expense transactions (v6.1). Indicates whether payment comes from asset or liability account. Only present when intent is "expense".
|
|
3929
|
-
*/
|
|
3930
|
-
paymentSource?: 'asset' | 'liability';
|
|
3931
|
-
/**
|
|
3932
|
-
* Liability account type hint for credit card/BNPL spending (v6.1). Only present when paymentSource is "liability". Values: CreditCard, Huabei, Baitiao
|
|
3933
|
-
*/
|
|
3934
|
-
liabilityHint?: string;
|
|
3935
|
-
/**
|
|
3936
|
-
* Human-readable message (for ask or error actions). Deprecated: Use messageKey for i18n support.
|
|
3937
|
-
* @deprecated
|
|
3938
|
-
*/
|
|
3939
|
-
message?: string;
|
|
3940
|
-
/**
|
|
3941
|
-
* i18n message key for frontend translation. Use this instead of message for internationalization support.
|
|
3942
|
-
*/
|
|
3943
|
-
messageKey?: string;
|
|
3944
|
-
/**
|
|
3945
|
-
* Parameters for message interpolation. Used with messageKey for dynamic values in translated messages.
|
|
3946
|
-
*/
|
|
3947
|
-
messageParams?: {
|
|
3948
|
-
[key: string]: unknown;
|
|
3949
|
-
};
|
|
3950
|
-
/**
|
|
3951
|
-
* Session ID for multi-turn dialogue. Must be included in subsequent requests to continue the conversation.
|
|
3952
|
-
*/
|
|
3953
|
-
sessionId?: string;
|
|
3954
|
-
/**
|
|
3955
|
-
* Which slot is waiting for user input
|
|
3956
|
-
*/
|
|
3957
|
-
waitingFor?: string;
|
|
3958
|
-
/**
|
|
3959
|
-
* Created transaction info (for created action)
|
|
3960
|
-
*/
|
|
3961
|
-
transaction?: NlpTransactionInfoDto;
|
|
3962
|
-
/**
|
|
3963
|
-
* Parsed data for confirmation (when action is "confirm"). Contains extracted fields that user should verify before transaction creation.
|
|
3964
|
-
*/
|
|
3965
|
-
parsedData?: NlpParsedDataDto;
|
|
3966
|
-
/**
|
|
3967
|
-
* Duplicate detection data (when action is "confirm_duplicate"). Contains information about potential duplicate transaction for user confirmation.
|
|
3968
|
-
*/
|
|
3969
|
-
duplicateData?: NlpDuplicateConfirmationDataDto;
|
|
3970
|
-
/**
|
|
3971
|
-
* Rule match data (when action is "confirm_rule"). Contains information about medium-confidence rule match for user confirmation.
|
|
3972
|
-
*/
|
|
3973
|
-
ruleData?: NlpRuleConfirmationDataDto;
|
|
3974
|
-
/**
|
|
3975
|
-
* Account validation data (when action is "confirm_account"). Contains information about invalid account for user correction.
|
|
3976
|
-
*/
|
|
3977
|
-
accountData?: NlpAccountConfirmationDataDto;
|
|
3978
|
-
/**
|
|
3979
|
-
* Payee confirmation data (when action is "confirm_payee"). Contains information about medium/low confidence payee match for user confirmation.
|
|
3980
|
-
*/
|
|
3981
|
-
payeeData?: NlpPayeeConfirmationDataDto;
|
|
3982
|
-
/**
|
|
3983
|
-
* Overall confidence score (0-1)
|
|
3984
|
-
*/
|
|
3985
|
-
confidence?: number;
|
|
3986
|
-
/**
|
|
3987
|
-
* Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.
|
|
3988
|
-
*/
|
|
3989
|
-
confidenceThreshold?: number;
|
|
3990
|
-
/**
|
|
3991
|
-
* Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.
|
|
3992
|
-
*/
|
|
3993
|
-
recurringMatch?: RecurringMatchInfoDto;
|
|
3994
|
-
/**
|
|
3995
|
-
* Recurring rule creation suggestion (when action is "created"). Contains suggestion to create a recurring rule based on detected patterns. Only present when no existing rule matched and similar historical transactions were found.
|
|
3996
|
-
*/
|
|
3997
|
-
recurringSuggestion?: RecurringSuggestionDto;
|
|
3998
|
-
/**
|
|
3999
|
-
* Suggested accounts for this transaction. Contains recommended source and destination accounts based on the detected intent and rules.
|
|
4000
|
-
*/
|
|
4001
|
-
suggestedAccounts?: NlpSuggestedAccountsDto;
|
|
4002
|
-
/**
|
|
4003
|
-
* Default accounts for the user/region. These are fallback accounts used when no specific suggestion is available.
|
|
4004
|
-
*/
|
|
4005
|
-
defaultAccounts?: NlpDefaultAccountsDto;
|
|
4006
|
-
};
|
|
4007
|
-
|
|
4008
|
-
/**
|
|
4009
|
-
* Response status
|
|
4010
|
-
*/
|
|
4011
|
-
export type status4 = 'success' | 'pending' | 'error';
|
|
4012
|
-
|
|
4013
|
-
/**
|
|
4014
|
-
* Action taken or requested
|
|
4015
|
-
*/
|
|
4016
|
-
export type action2 =
|
|
4017
|
-
| 'created'
|
|
4018
|
-
| 'ask'
|
|
4019
|
-
| 'confirm'
|
|
4020
|
-
| 'confirm_duplicate'
|
|
4021
|
-
| 'confirm_rule'
|
|
4022
|
-
| 'confirm_account'
|
|
4023
|
-
| 'confirm_payee'
|
|
4024
|
-
| 'cancel';
|
|
4025
|
-
|
|
4026
|
-
/**
|
|
4027
|
-
* Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
|
|
4028
|
-
*/
|
|
4029
|
-
export type intent = 'expense' | 'asset' | 'income' | 'liability' | 'equity';
|
|
4030
|
-
|
|
4031
|
-
/**
|
|
4032
|
-
* Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
|
|
4033
|
-
*/
|
|
4034
|
-
export type assetSubType = 'transfer' | 'banking' | 'investment';
|
|
4035
|
-
|
|
4036
|
-
/**
|
|
4037
|
-
* Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
|
|
4038
|
-
*/
|
|
4039
|
-
export type liabilitySubType = 'borrow' | 'repay';
|
|
4040
|
-
|
|
4041
|
-
/**
|
|
4042
|
-
* Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
|
|
4043
|
-
*/
|
|
4044
|
-
export type equitySubType = 'opening' | 'adjustment';
|
|
4045
|
-
|
|
4046
3488
|
export type BalanceByCurrencyDto = {
|
|
4047
3489
|
/**
|
|
4048
3490
|
* ISO 4217 currency code
|
|
@@ -4262,7 +3704,7 @@ export type AccountItemWithAssetClassDto = {
|
|
|
4262
3704
|
/**
|
|
4263
3705
|
* ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
|
|
4264
3706
|
*/
|
|
4265
|
-
export type
|
|
3707
|
+
export type source =
|
|
4266
3708
|
| 'USER_META'
|
|
4267
3709
|
| 'FIAT_CURRENCY'
|
|
4268
3710
|
| 'OPENBB_MAPPING'
|
|
@@ -4541,7 +3983,7 @@ export type CurrentPriceDto = {
|
|
|
4541
3983
|
/**
|
|
4542
3984
|
* Price source
|
|
4543
3985
|
*/
|
|
4544
|
-
export type
|
|
3986
|
+
export type source2 = 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
|
|
4545
3987
|
|
|
4546
3988
|
export type FxRateDto = {
|
|
4547
3989
|
from: string;
|
|
@@ -4915,7 +4357,7 @@ export type AccountControllerCreateData = {
|
|
|
4915
4357
|
requestBody: CreateAccountDto;
|
|
4916
4358
|
};
|
|
4917
4359
|
|
|
4918
|
-
export type AccountControllerCreateResponse =
|
|
4360
|
+
export type AccountControllerCreateResponse = unknown;
|
|
4919
4361
|
|
|
4920
4362
|
export type AccountControllerFindAllData = {
|
|
4921
4363
|
/**
|
|
@@ -4964,9 +4406,6 @@ export type AccountControllerFindOneData = {
|
|
|
4964
4406
|
export type AccountControllerFindOneResponse = AccountResponseDto;
|
|
4965
4407
|
|
|
4966
4408
|
export type AccountControllerUpdateData = {
|
|
4967
|
-
/**
|
|
4968
|
-
* Account UUID
|
|
4969
|
-
*/
|
|
4970
4409
|
id: string;
|
|
4971
4410
|
/**
|
|
4972
4411
|
* Region code for tenant context
|
|
@@ -4975,12 +4414,9 @@ export type AccountControllerUpdateData = {
|
|
|
4975
4414
|
requestBody: UpdateAccountDto;
|
|
4976
4415
|
};
|
|
4977
4416
|
|
|
4978
|
-
export type AccountControllerUpdateResponse =
|
|
4417
|
+
export type AccountControllerUpdateResponse = unknown;
|
|
4979
4418
|
|
|
4980
4419
|
export type AccountControllerDeleteData = {
|
|
4981
|
-
/**
|
|
4982
|
-
* Account UUID
|
|
4983
|
-
*/
|
|
4984
4420
|
id: string;
|
|
4985
4421
|
/**
|
|
4986
4422
|
* Region code for tenant context
|
|
@@ -4988,12 +4424,9 @@ export type AccountControllerDeleteData = {
|
|
|
4988
4424
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
4989
4425
|
};
|
|
4990
4426
|
|
|
4991
|
-
export type AccountControllerDeleteResponse =
|
|
4427
|
+
export type AccountControllerDeleteResponse = unknown;
|
|
4992
4428
|
|
|
4993
4429
|
export type AccountControllerCloseData = {
|
|
4994
|
-
/**
|
|
4995
|
-
* Account UUID
|
|
4996
|
-
*/
|
|
4997
4430
|
id: string;
|
|
4998
4431
|
/**
|
|
4999
4432
|
* Region code for tenant context
|
|
@@ -5002,12 +4435,9 @@ export type AccountControllerCloseData = {
|
|
|
5002
4435
|
requestBody: CloseAccountDto;
|
|
5003
4436
|
};
|
|
5004
4437
|
|
|
5005
|
-
export type AccountControllerCloseResponse =
|
|
4438
|
+
export type AccountControllerCloseResponse = unknown;
|
|
5006
4439
|
|
|
5007
4440
|
export type AccountControllerReopenData = {
|
|
5008
|
-
/**
|
|
5009
|
-
* Account UUID
|
|
5010
|
-
*/
|
|
5011
4441
|
id: string;
|
|
5012
4442
|
/**
|
|
5013
4443
|
* Region code for tenant context
|
|
@@ -5016,7 +4446,7 @@ export type AccountControllerReopenData = {
|
|
|
5016
4446
|
requestBody: ReopenAccountDto;
|
|
5017
4447
|
};
|
|
5018
4448
|
|
|
5019
|
-
export type AccountControllerReopenResponse =
|
|
4449
|
+
export type AccountControllerReopenResponse = unknown;
|
|
5020
4450
|
|
|
5021
4451
|
export type AccountStandardsControllerGetTemplatesData = {
|
|
5022
4452
|
/**
|
|
@@ -6098,25 +5528,13 @@ export type FileImportControllerIdentifyFileData = {
|
|
|
6098
5528
|
export type FileImportControllerIdentifyFileResponse = IdentifyResultDto;
|
|
6099
5529
|
|
|
6100
5530
|
export type FileImportControllerImportBeancountData = {
|
|
6101
|
-
/**
|
|
6102
|
-
* Beancount file to import
|
|
6103
|
-
*/
|
|
6104
|
-
formData: FileImportDto;
|
|
6105
5531
|
/**
|
|
6106
5532
|
* Region code for tenant context
|
|
6107
5533
|
*/
|
|
6108
5534
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
6109
5535
|
};
|
|
6110
5536
|
|
|
6111
|
-
export type FileImportControllerImportBeancountResponse =
|
|
6112
|
-
imported?: number;
|
|
6113
|
-
skipped?: number;
|
|
6114
|
-
failed?: number;
|
|
6115
|
-
accountsCreated?: number;
|
|
6116
|
-
errors?: Array<{
|
|
6117
|
-
[key: string]: unknown;
|
|
6118
|
-
}>;
|
|
6119
|
-
};
|
|
5537
|
+
export type FileImportControllerImportBeancountResponse = unknown;
|
|
6120
5538
|
|
|
6121
5539
|
export type ImporterConfigControllerGetConfigData = {
|
|
6122
5540
|
/**
|
|
@@ -6204,18 +5622,7 @@ export type PlatformControllerDeleteData = {
|
|
|
6204
5622
|
export type PlatformControllerDeleteResponse = void;
|
|
6205
5623
|
|
|
6206
5624
|
export type ProviderSyncControllerSyncData = {
|
|
6207
|
-
|
|
6208
|
-
* Provider name
|
|
6209
|
-
*/
|
|
6210
|
-
providerName:
|
|
6211
|
-
| 'plaid'
|
|
6212
|
-
| 'teller'
|
|
6213
|
-
| 'truelayer'
|
|
6214
|
-
| 'gocardless'
|
|
6215
|
-
| 'simplefin'
|
|
6216
|
-
| 'yodlee'
|
|
6217
|
-
| 'beancount-direct'
|
|
6218
|
-
| 'parsed-bill';
|
|
5625
|
+
providerName: string;
|
|
6219
5626
|
/**
|
|
6220
5627
|
* Region code for tenant context
|
|
6221
5628
|
*/
|
|
@@ -6223,7 +5630,7 @@ export type ProviderSyncControllerSyncData = {
|
|
|
6223
5630
|
requestBody: ProviderSyncDto;
|
|
6224
5631
|
};
|
|
6225
5632
|
|
|
6226
|
-
export type ProviderSyncControllerSyncResponse =
|
|
5633
|
+
export type ProviderSyncControllerSyncResponse = unknown;
|
|
6227
5634
|
|
|
6228
5635
|
export type ProviderSyncControllerGetSupportedProvidersData = {
|
|
6229
5636
|
/**
|
|
@@ -6286,13 +5693,10 @@ export type NlpControllerProcessNaturalLanguageData = {
|
|
|
6286
5693
|
* Region code for tenant context
|
|
6287
5694
|
*/
|
|
6288
5695
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
6289
|
-
/**
|
|
6290
|
-
* Natural language transaction input with optional session ID
|
|
6291
|
-
*/
|
|
6292
5696
|
requestBody: ProcessNlpDto;
|
|
6293
5697
|
};
|
|
6294
5698
|
|
|
6295
|
-
export type NlpControllerProcessNaturalLanguageResponse =
|
|
5699
|
+
export type NlpControllerProcessNaturalLanguageResponse = unknown;
|
|
6296
5700
|
|
|
6297
5701
|
export type NlpControllerClearSessionData = {
|
|
6298
5702
|
/**
|
|
@@ -6586,14 +5990,7 @@ export type $OpenApiTs = {
|
|
|
6586
5990
|
post: {
|
|
6587
5991
|
req: AccountControllerCreateData;
|
|
6588
5992
|
res: {
|
|
6589
|
-
|
|
6590
|
-
* Account created successfully
|
|
6591
|
-
*/
|
|
6592
|
-
201: AccountResponseDto;
|
|
6593
|
-
/**
|
|
6594
|
-
* Account already exists
|
|
6595
|
-
*/
|
|
6596
|
-
409: unknown;
|
|
5993
|
+
201: unknown;
|
|
6597
5994
|
};
|
|
6598
5995
|
};
|
|
6599
5996
|
get: {
|
|
@@ -6623,31 +6020,13 @@ export type $OpenApiTs = {
|
|
|
6623
6020
|
put: {
|
|
6624
6021
|
req: AccountControllerUpdateData;
|
|
6625
6022
|
res: {
|
|
6626
|
-
|
|
6627
|
-
* Account updated successfully
|
|
6628
|
-
*/
|
|
6629
|
-
200: AccountResponseDto;
|
|
6630
|
-
/**
|
|
6631
|
-
* Account not found
|
|
6632
|
-
*/
|
|
6633
|
-
404: unknown;
|
|
6023
|
+
200: unknown;
|
|
6634
6024
|
};
|
|
6635
6025
|
};
|
|
6636
6026
|
delete: {
|
|
6637
6027
|
req: AccountControllerDeleteData;
|
|
6638
6028
|
res: {
|
|
6639
|
-
|
|
6640
|
-
* Account deleted successfully
|
|
6641
|
-
*/
|
|
6642
|
-
204: void;
|
|
6643
|
-
/**
|
|
6644
|
-
* Account not found
|
|
6645
|
-
*/
|
|
6646
|
-
404: unknown;
|
|
6647
|
-
/**
|
|
6648
|
-
* Account has transactions and cannot be deleted
|
|
6649
|
-
*/
|
|
6650
|
-
409: unknown;
|
|
6029
|
+
200: unknown;
|
|
6651
6030
|
};
|
|
6652
6031
|
};
|
|
6653
6032
|
};
|
|
@@ -6655,18 +6034,7 @@ export type $OpenApiTs = {
|
|
|
6655
6034
|
post: {
|
|
6656
6035
|
req: AccountControllerCloseData;
|
|
6657
6036
|
res: {
|
|
6658
|
-
|
|
6659
|
-
* Account closed successfully
|
|
6660
|
-
*/
|
|
6661
|
-
200: AccountResponseDto;
|
|
6662
|
-
/**
|
|
6663
|
-
* Account is already closed
|
|
6664
|
-
*/
|
|
6665
|
-
400: unknown;
|
|
6666
|
-
/**
|
|
6667
|
-
* Account not found
|
|
6668
|
-
*/
|
|
6669
|
-
404: unknown;
|
|
6037
|
+
201: unknown;
|
|
6670
6038
|
};
|
|
6671
6039
|
};
|
|
6672
6040
|
};
|
|
@@ -6674,18 +6042,7 @@ export type $OpenApiTs = {
|
|
|
6674
6042
|
post: {
|
|
6675
6043
|
req: AccountControllerReopenData;
|
|
6676
6044
|
res: {
|
|
6677
|
-
|
|
6678
|
-
* Account reopened successfully
|
|
6679
|
-
*/
|
|
6680
|
-
200: AccountResponseDto;
|
|
6681
|
-
/**
|
|
6682
|
-
* Account is not closed
|
|
6683
|
-
*/
|
|
6684
|
-
400: unknown;
|
|
6685
|
-
/**
|
|
6686
|
-
* Account not found
|
|
6687
|
-
*/
|
|
6688
|
-
404: unknown;
|
|
6045
|
+
201: unknown;
|
|
6689
6046
|
};
|
|
6690
6047
|
};
|
|
6691
6048
|
};
|
|
@@ -8021,22 +7378,7 @@ export type $OpenApiTs = {
|
|
|
8021
7378
|
post: {
|
|
8022
7379
|
req: FileImportControllerImportBeancountData;
|
|
8023
7380
|
res: {
|
|
8024
|
-
|
|
8025
|
-
* Beancount file imported successfully
|
|
8026
|
-
*/
|
|
8027
|
-
200: {
|
|
8028
|
-
imported?: number;
|
|
8029
|
-
skipped?: number;
|
|
8030
|
-
failed?: number;
|
|
8031
|
-
accountsCreated?: number;
|
|
8032
|
-
errors?: Array<{
|
|
8033
|
-
[key: string]: unknown;
|
|
8034
|
-
}>;
|
|
8035
|
-
};
|
|
8036
|
-
/**
|
|
8037
|
-
* Bad request - invalid file or no file uploaded
|
|
8038
|
-
*/
|
|
8039
|
-
400: ApiProblemResponseDto;
|
|
7381
|
+
201: unknown;
|
|
8040
7382
|
};
|
|
8041
7383
|
};
|
|
8042
7384
|
};
|
|
@@ -8167,22 +7509,7 @@ export type $OpenApiTs = {
|
|
|
8167
7509
|
post: {
|
|
8168
7510
|
req: ProviderSyncControllerSyncData;
|
|
8169
7511
|
res: {
|
|
8170
|
-
|
|
8171
|
-
* Sync completed successfully
|
|
8172
|
-
*/
|
|
8173
|
-
200: ProviderSyncResponseDto;
|
|
8174
|
-
/**
|
|
8175
|
-
* Invalid request data
|
|
8176
|
-
*/
|
|
8177
|
-
400: unknown;
|
|
8178
|
-
/**
|
|
8179
|
-
* Missing or invalid authentication
|
|
8180
|
-
*/
|
|
8181
|
-
401: unknown;
|
|
8182
|
-
/**
|
|
8183
|
-
* Provider not supported
|
|
8184
|
-
*/
|
|
8185
|
-
404: unknown;
|
|
7512
|
+
201: unknown;
|
|
8186
7513
|
};
|
|
8187
7514
|
};
|
|
8188
7515
|
};
|
|
@@ -8261,18 +7588,7 @@ export type $OpenApiTs = {
|
|
|
8261
7588
|
post: {
|
|
8262
7589
|
req: NlpControllerProcessNaturalLanguageData;
|
|
8263
7590
|
res: {
|
|
8264
|
-
|
|
8265
|
-
* NLP processing result - either created transaction or asking for more info
|
|
8266
|
-
*/
|
|
8267
|
-
200: NlpResponseDto;
|
|
8268
|
-
/**
|
|
8269
|
-
* Invalid input
|
|
8270
|
-
*/
|
|
8271
|
-
400: unknown;
|
|
8272
|
-
/**
|
|
8273
|
-
* Unauthorized
|
|
8274
|
-
*/
|
|
8275
|
-
401: unknown;
|
|
7591
|
+
201: unknown;
|
|
8276
7592
|
};
|
|
8277
7593
|
};
|
|
8278
7594
|
};
|