@firela/api-types 0.0.0-canary.e1146c01 → 0.0.0-canary.ebb51de2
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 +739 -766
- package/dist/index.d.ts +739 -766
- package/dist/index.js +17 -72
- package/dist/index.mjs +17 -72
- package/package.json +1 -1
- package/src/generated/schemas.gen.ts +866 -993
- package/src/generated/services.gen.ts +291 -91
- package/src/generated/types.gen.ts +860 -839
|
@@ -316,6 +316,53 @@ export type RegionsMetadataResponseDto = {
|
|
|
316
316
|
regions: Array<RegionInfoDto>;
|
|
317
317
|
};
|
|
318
318
|
|
|
319
|
+
export type CostSpecDto = {
|
|
320
|
+
/**
|
|
321
|
+
* Cost specification mode (mirrors engine CostSpec)
|
|
322
|
+
*/
|
|
323
|
+
mode: 'per-unit' | 'total' | 'date' | 'label' | 'auto';
|
|
324
|
+
/**
|
|
325
|
+
* Per-unit cost (required when mode is "per-unit")
|
|
326
|
+
*/
|
|
327
|
+
numberPerUnit?: string;
|
|
328
|
+
/**
|
|
329
|
+
* Total cost for all units (required when mode is "total")
|
|
330
|
+
*/
|
|
331
|
+
totalNumber?: string;
|
|
332
|
+
/**
|
|
333
|
+
* Cost currency (required in all modes)
|
|
334
|
+
*/
|
|
335
|
+
currency: string;
|
|
336
|
+
/**
|
|
337
|
+
* Lot acquisition date, ISO 8601 (required when mode is "date")
|
|
338
|
+
*/
|
|
339
|
+
date?: string;
|
|
340
|
+
/**
|
|
341
|
+
* Lot label (required when mode is "label"; optional tag in buy modes)
|
|
342
|
+
*/
|
|
343
|
+
label?: string;
|
|
344
|
+
/**
|
|
345
|
+
* Merge lots for AVERAGE booking (mode: auto)
|
|
346
|
+
*/
|
|
347
|
+
merge?: boolean;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Cost specification mode (mirrors engine CostSpec)
|
|
352
|
+
*/
|
|
353
|
+
export type mode = 'per-unit' | 'total' | 'date' | 'label' | 'auto';
|
|
354
|
+
|
|
355
|
+
export type AmountDto = {
|
|
356
|
+
/**
|
|
357
|
+
* Amount as decimal string (max 15 integer + 15 decimal digits)
|
|
358
|
+
*/
|
|
359
|
+
number: string;
|
|
360
|
+
/**
|
|
361
|
+
* Currency/commodity code
|
|
362
|
+
*/
|
|
363
|
+
currency: string;
|
|
364
|
+
};
|
|
365
|
+
|
|
319
366
|
export type CreatePostingDto = {
|
|
320
367
|
/**
|
|
321
368
|
* Account name in Beancount format (must start with uppercase, colon-separated)
|
|
@@ -335,6 +382,14 @@ export type CreatePostingDto = {
|
|
|
335
382
|
meta?: {
|
|
336
383
|
[key: string]: unknown;
|
|
337
384
|
};
|
|
385
|
+
/**
|
|
386
|
+
* Cost basis (Beancount `{...}`). Maps to engine costSpec. Required for commodity holdings so they carry a monetary weight that can balance.
|
|
387
|
+
*/
|
|
388
|
+
cost?: CostSpecDto;
|
|
389
|
+
/**
|
|
390
|
+
* Price annotation (Beancount `@...`). Maps to engine price. Used for valuation; cost takes priority for balance weight.
|
|
391
|
+
*/
|
|
392
|
+
price?: AmountDto;
|
|
338
393
|
};
|
|
339
394
|
|
|
340
395
|
export type CreateTransactionDto = {
|
|
@@ -387,6 +442,25 @@ export type CreateTransactionDto = {
|
|
|
387
442
|
*/
|
|
388
443
|
export type flag = '*' | '!';
|
|
389
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
|
+
|
|
390
464
|
export type PostingResponseDto = {
|
|
391
465
|
/**
|
|
392
466
|
* Account name
|
|
@@ -400,6 +474,10 @@ export type PostingResponseDto = {
|
|
|
400
474
|
* Currency
|
|
401
475
|
*/
|
|
402
476
|
currency?: string;
|
|
477
|
+
/**
|
|
478
|
+
* Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.
|
|
479
|
+
*/
|
|
480
|
+
cost?: CostDetailDto;
|
|
403
481
|
};
|
|
404
482
|
|
|
405
483
|
export type RecurringSuggestionDto = {
|
|
@@ -620,9 +698,9 @@ export type PostingDetailDto = {
|
|
|
620
698
|
*/
|
|
621
699
|
accountId: string;
|
|
622
700
|
/**
|
|
623
|
-
*
|
|
701
|
+
* Fully-qualified Beancount account path
|
|
624
702
|
*/
|
|
625
|
-
|
|
703
|
+
account: string;
|
|
626
704
|
/**
|
|
627
705
|
* Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.
|
|
628
706
|
*/
|
|
@@ -643,6 +721,10 @@ export type PostingDetailDto = {
|
|
|
643
721
|
* Cost date
|
|
644
722
|
*/
|
|
645
723
|
costDate?: string;
|
|
724
|
+
/**
|
|
725
|
+
* Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.
|
|
726
|
+
*/
|
|
727
|
+
cost?: CostDetailDto;
|
|
646
728
|
/**
|
|
647
729
|
* Price amount
|
|
648
730
|
*/
|
|
@@ -3375,33 +3457,6 @@ export type ProviderSyncDto = {
|
|
|
3375
3457
|
transactions: unknown[];
|
|
3376
3458
|
};
|
|
3377
3459
|
|
|
3378
|
-
export type ProviderSyncResponseDto = {
|
|
3379
|
-
/**
|
|
3380
|
-
* Number of transactions successfully imported
|
|
3381
|
-
*/
|
|
3382
|
-
imported: number;
|
|
3383
|
-
/**
|
|
3384
|
-
* Number of transactions skipped (duplicates)
|
|
3385
|
-
*/
|
|
3386
|
-
skipped: number;
|
|
3387
|
-
/**
|
|
3388
|
-
* Number of transactions pending review
|
|
3389
|
-
*/
|
|
3390
|
-
pendingReview: number;
|
|
3391
|
-
/**
|
|
3392
|
-
* Number of transactions that failed to import
|
|
3393
|
-
*/
|
|
3394
|
-
failed: number;
|
|
3395
|
-
/**
|
|
3396
|
-
* IDs of successfully imported transactions
|
|
3397
|
-
*/
|
|
3398
|
-
importedTransactionIds?: Array<string>;
|
|
3399
|
-
/**
|
|
3400
|
-
* IDs of review items created for branched transactions
|
|
3401
|
-
*/
|
|
3402
|
-
reviewItemIds?: Array<string>;
|
|
3403
|
-
};
|
|
3404
|
-
|
|
3405
3460
|
export type SupportedProvidersResponseDto = {
|
|
3406
3461
|
/**
|
|
3407
3462
|
* List of supported provider names
|
|
@@ -3411,6 +3466,8 @@ export type SupportedProvidersResponseDto = {
|
|
|
3411
3466
|
|
|
3412
3467
|
export type ParserTelemetryReportDto = unknown;
|
|
3413
3468
|
|
|
3469
|
+
export type UncoveredFormatMissDto = unknown;
|
|
3470
|
+
|
|
3414
3471
|
export type ProcessNlpDto = {
|
|
3415
3472
|
/**
|
|
3416
3473
|
* Natural language text describing a transaction (Chinese)
|
|
@@ -3428,775 +3485,230 @@ export type ProcessNlpDto = {
|
|
|
3428
3485
|
};
|
|
3429
3486
|
};
|
|
3430
3487
|
|
|
3431
|
-
export type
|
|
3432
|
-
/**
|
|
3433
|
-
* Transaction ID
|
|
3434
|
-
*/
|
|
3435
|
-
id: string;
|
|
3436
|
-
/**
|
|
3437
|
-
* Transaction date (ISO format)
|
|
3438
|
-
*/
|
|
3439
|
-
date: string;
|
|
3488
|
+
export type BalanceByCurrencyDto = {
|
|
3440
3489
|
/**
|
|
3441
|
-
*
|
|
3490
|
+
* ISO 4217 currency code
|
|
3442
3491
|
*/
|
|
3443
|
-
|
|
3492
|
+
currency: string;
|
|
3444
3493
|
/**
|
|
3445
|
-
*
|
|
3494
|
+
* Balance amount
|
|
3446
3495
|
*/
|
|
3447
|
-
|
|
3496
|
+
balance: string;
|
|
3497
|
+
};
|
|
3498
|
+
|
|
3499
|
+
export type NetWorthByCurrencyDto = {
|
|
3448
3500
|
/**
|
|
3449
|
-
*
|
|
3501
|
+
* Net worth by currency
|
|
3450
3502
|
*/
|
|
3451
|
-
|
|
3503
|
+
netWorth: Array<BalanceByCurrencyDto>;
|
|
3452
3504
|
/**
|
|
3453
|
-
*
|
|
3505
|
+
* Assets by currency
|
|
3454
3506
|
*/
|
|
3455
|
-
|
|
3507
|
+
assets: Array<BalanceByCurrencyDto>;
|
|
3456
3508
|
/**
|
|
3457
|
-
*
|
|
3509
|
+
* Liabilities by currency
|
|
3458
3510
|
*/
|
|
3459
|
-
|
|
3511
|
+
liabilities: Array<BalanceByCurrencyDto>;
|
|
3460
3512
|
};
|
|
3461
3513
|
|
|
3462
|
-
export type
|
|
3463
|
-
/**
|
|
3464
|
-
* Extracted amount
|
|
3465
|
-
*/
|
|
3466
|
-
amount?: number;
|
|
3467
|
-
/**
|
|
3468
|
-
* Currency code
|
|
3469
|
-
*/
|
|
3470
|
-
currency?: string;
|
|
3514
|
+
export type ConvertedNetWorthDto = {
|
|
3471
3515
|
/**
|
|
3472
|
-
*
|
|
3516
|
+
* Base currency for conversion
|
|
3473
3517
|
*/
|
|
3474
|
-
|
|
3518
|
+
baseCurrency: string;
|
|
3475
3519
|
/**
|
|
3476
|
-
*
|
|
3520
|
+
* Converted net worth
|
|
3477
3521
|
*/
|
|
3478
|
-
|
|
3522
|
+
netWorth: string;
|
|
3479
3523
|
/**
|
|
3480
|
-
*
|
|
3524
|
+
* Converted assets
|
|
3481
3525
|
*/
|
|
3482
|
-
|
|
3526
|
+
assets: string;
|
|
3483
3527
|
/**
|
|
3484
|
-
*
|
|
3528
|
+
* Converted liabilities
|
|
3485
3529
|
*/
|
|
3486
|
-
|
|
3530
|
+
liabilities: string;
|
|
3487
3531
|
/**
|
|
3488
|
-
*
|
|
3532
|
+
* Exchange rates used for conversion
|
|
3489
3533
|
*/
|
|
3490
|
-
|
|
3534
|
+
exchangeRates: {
|
|
3535
|
+
[key: string]: unknown;
|
|
3536
|
+
};
|
|
3537
|
+
};
|
|
3538
|
+
|
|
3539
|
+
export type ExchangeRateWarningDto = {
|
|
3491
3540
|
/**
|
|
3492
|
-
*
|
|
3541
|
+
* Warning type
|
|
3493
3542
|
*/
|
|
3494
|
-
|
|
3543
|
+
type: string;
|
|
3495
3544
|
/**
|
|
3496
|
-
*
|
|
3545
|
+
* Currency without exchange rate
|
|
3497
3546
|
*/
|
|
3498
|
-
|
|
3547
|
+
currency: string;
|
|
3499
3548
|
/**
|
|
3500
|
-
*
|
|
3549
|
+
* Total amount affected
|
|
3501
3550
|
*/
|
|
3502
|
-
|
|
3551
|
+
totalAmount: string;
|
|
3552
|
+
};
|
|
3553
|
+
|
|
3554
|
+
export type NetWorthResponseDto = {
|
|
3503
3555
|
/**
|
|
3504
|
-
*
|
|
3556
|
+
* Total net worth (assets - liabilities, converted to base currency)
|
|
3505
3557
|
*/
|
|
3506
|
-
|
|
3558
|
+
netWorth: string;
|
|
3507
3559
|
/**
|
|
3508
|
-
*
|
|
3560
|
+
* Total assets value (converted)
|
|
3509
3561
|
*/
|
|
3510
|
-
|
|
3562
|
+
assets: string;
|
|
3511
3563
|
/**
|
|
3512
|
-
*
|
|
3564
|
+
* Total liabilities value (positive number, converted)
|
|
3513
3565
|
*/
|
|
3514
|
-
|
|
3566
|
+
liabilities: string;
|
|
3515
3567
|
/**
|
|
3516
|
-
*
|
|
3568
|
+
* Monthly return (change from last month)
|
|
3517
3569
|
*/
|
|
3518
|
-
|
|
3570
|
+
monthlyReturn: string;
|
|
3519
3571
|
/**
|
|
3520
|
-
*
|
|
3572
|
+
* Monthly return percentage
|
|
3521
3573
|
*/
|
|
3522
|
-
|
|
3523
|
-
};
|
|
3524
|
-
|
|
3525
|
-
/**
|
|
3526
|
-
* Investment action
|
|
3527
|
-
*/
|
|
3528
|
-
export type investmentAction = 'buy' | 'sell';
|
|
3529
|
-
|
|
3530
|
-
/**
|
|
3531
|
-
* Payment source: asset (default) or liability (credit card)
|
|
3532
|
-
*/
|
|
3533
|
-
export type paymentSource = 'asset' | 'liability';
|
|
3534
|
-
|
|
3535
|
-
export type NlpSourceTransactionDto = {
|
|
3574
|
+
monthlyReturnPercentage: string;
|
|
3536
3575
|
/**
|
|
3537
|
-
*
|
|
3576
|
+
* Base currency code
|
|
3538
3577
|
*/
|
|
3539
|
-
|
|
3578
|
+
currency: string;
|
|
3540
3579
|
/**
|
|
3541
|
-
*
|
|
3580
|
+
* Data as of date (ISO 8601)
|
|
3542
3581
|
*/
|
|
3543
|
-
|
|
3582
|
+
asOf: string;
|
|
3544
3583
|
/**
|
|
3545
|
-
*
|
|
3584
|
+
* Balances grouped by original currency
|
|
3546
3585
|
*/
|
|
3547
|
-
|
|
3586
|
+
byCurrency?: NetWorthByCurrencyDto;
|
|
3548
3587
|
/**
|
|
3549
|
-
*
|
|
3588
|
+
* Converted values in base currency (undefined if no exchange rates available)
|
|
3550
3589
|
*/
|
|
3551
|
-
|
|
3590
|
+
converted?: ConvertedNetWorthDto;
|
|
3552
3591
|
/**
|
|
3553
|
-
*
|
|
3592
|
+
* Exchange rate warnings
|
|
3554
3593
|
*/
|
|
3555
|
-
|
|
3594
|
+
warnings?: Array<ExchangeRateWarningDto>;
|
|
3556
3595
|
};
|
|
3557
3596
|
|
|
3558
|
-
export type
|
|
3597
|
+
export type AccountItemDto = {
|
|
3559
3598
|
/**
|
|
3560
|
-
*
|
|
3599
|
+
* Account ID
|
|
3561
3600
|
*/
|
|
3562
3601
|
id: string;
|
|
3563
3602
|
/**
|
|
3564
|
-
*
|
|
3565
|
-
*/
|
|
3566
|
-
date: string;
|
|
3567
|
-
/**
|
|
3568
|
-
* Amount as string
|
|
3603
|
+
* Full account name
|
|
3569
3604
|
*/
|
|
3570
|
-
|
|
3605
|
+
name: string;
|
|
3571
3606
|
/**
|
|
3572
|
-
*
|
|
3607
|
+
* Display name (last part of account path)
|
|
3573
3608
|
*/
|
|
3574
|
-
|
|
3609
|
+
displayName: string;
|
|
3575
3610
|
/**
|
|
3576
|
-
*
|
|
3611
|
+
* Account balance
|
|
3577
3612
|
*/
|
|
3578
|
-
|
|
3613
|
+
balance: string;
|
|
3579
3614
|
/**
|
|
3580
|
-
*
|
|
3615
|
+
* Currency code
|
|
3581
3616
|
*/
|
|
3582
|
-
|
|
3617
|
+
currency: string;
|
|
3583
3618
|
};
|
|
3584
3619
|
|
|
3585
|
-
export type
|
|
3586
|
-
/**
|
|
3587
|
-
* Whether dates match
|
|
3588
|
-
*/
|
|
3589
|
-
dateMatch: boolean;
|
|
3590
|
-
/**
|
|
3591
|
-
* Date difference in days
|
|
3592
|
-
*/
|
|
3593
|
-
dateDiff: number;
|
|
3594
|
-
/**
|
|
3595
|
-
* Whether amounts match
|
|
3596
|
-
*/
|
|
3597
|
-
amountMatch: boolean;
|
|
3620
|
+
export type PlatformGroupDto = {
|
|
3598
3621
|
/**
|
|
3599
|
-
*
|
|
3622
|
+
* Platform ID
|
|
3600
3623
|
*/
|
|
3601
|
-
|
|
3624
|
+
platformId: string;
|
|
3602
3625
|
/**
|
|
3603
|
-
*
|
|
3626
|
+
* Platform display name
|
|
3604
3627
|
*/
|
|
3605
|
-
|
|
3628
|
+
platformName: string;
|
|
3606
3629
|
/**
|
|
3607
|
-
*
|
|
3630
|
+
* Accounts within this platform
|
|
3608
3631
|
*/
|
|
3609
|
-
|
|
3632
|
+
accounts: Array<AccountItemDto>;
|
|
3610
3633
|
/**
|
|
3611
|
-
*
|
|
3634
|
+
* Total balance across all accounts in platform
|
|
3612
3635
|
*/
|
|
3613
|
-
|
|
3636
|
+
totalBalance: string;
|
|
3614
3637
|
};
|
|
3615
3638
|
|
|
3616
|
-
export type
|
|
3617
|
-
/**
|
|
3618
|
-
* Duplicate detection confidence score (0.5-0.89)
|
|
3619
|
-
*/
|
|
3620
|
-
confidence: number;
|
|
3639
|
+
export type AccountsSummaryDto = {
|
|
3621
3640
|
/**
|
|
3622
|
-
*
|
|
3641
|
+
* Total number of accounts
|
|
3623
3642
|
*/
|
|
3624
|
-
|
|
3643
|
+
totalAccounts: number;
|
|
3625
3644
|
/**
|
|
3626
|
-
*
|
|
3645
|
+
* Total number of platforms
|
|
3627
3646
|
*/
|
|
3628
|
-
|
|
3647
|
+
totalPlatforms: number;
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
export type AccountsResponseDto = {
|
|
3629
3651
|
/**
|
|
3630
|
-
*
|
|
3652
|
+
* Account groups by platform
|
|
3631
3653
|
*/
|
|
3632
|
-
|
|
3654
|
+
groups: Array<PlatformGroupDto>;
|
|
3633
3655
|
/**
|
|
3634
|
-
*
|
|
3656
|
+
* Summary statistics
|
|
3635
3657
|
*/
|
|
3636
|
-
|
|
3658
|
+
summary: AccountsSummaryDto;
|
|
3637
3659
|
};
|
|
3638
3660
|
|
|
3639
|
-
export type
|
|
3661
|
+
export type AccountItemWithAssetClassDto = {
|
|
3640
3662
|
/**
|
|
3641
|
-
*
|
|
3663
|
+
* Account ID
|
|
3642
3664
|
*/
|
|
3643
|
-
|
|
3665
|
+
id: string;
|
|
3644
3666
|
/**
|
|
3645
|
-
*
|
|
3667
|
+
* Full account name
|
|
3646
3668
|
*/
|
|
3647
|
-
|
|
3648
|
-
[key: string]: unknown;
|
|
3649
|
-
};
|
|
3669
|
+
name: string;
|
|
3650
3670
|
/**
|
|
3651
|
-
*
|
|
3671
|
+
* Display name (last part of account path)
|
|
3652
3672
|
*/
|
|
3653
|
-
|
|
3654
|
-
[key: string]: unknown;
|
|
3655
|
-
};
|
|
3673
|
+
displayName: string;
|
|
3656
3674
|
/**
|
|
3657
|
-
*
|
|
3675
|
+
* Account balance
|
|
3658
3676
|
*/
|
|
3659
|
-
|
|
3677
|
+
balance: string;
|
|
3660
3678
|
/**
|
|
3661
|
-
*
|
|
3679
|
+
* Currency code
|
|
3662
3680
|
*/
|
|
3663
|
-
|
|
3664
|
-
};
|
|
3665
|
-
|
|
3666
|
-
export type NlpAccountConfirmationDataDto = {
|
|
3681
|
+
currency: string;
|
|
3667
3682
|
/**
|
|
3668
|
-
*
|
|
3683
|
+
* Asset class
|
|
3669
3684
|
*/
|
|
3670
|
-
|
|
3685
|
+
assetClass: string;
|
|
3671
3686
|
/**
|
|
3672
|
-
*
|
|
3687
|
+
* Asset sub-class (Prisma-compatible)
|
|
3673
3688
|
*/
|
|
3674
|
-
|
|
3689
|
+
assetSubClass?: string;
|
|
3675
3690
|
/**
|
|
3676
|
-
*
|
|
3691
|
+
* Regional sub-class (region-specific, for display)
|
|
3677
3692
|
*/
|
|
3678
|
-
|
|
3693
|
+
regionalSubClass?: string;
|
|
3679
3694
|
/**
|
|
3680
|
-
*
|
|
3695
|
+
* Risk level
|
|
3681
3696
|
*/
|
|
3682
|
-
|
|
3697
|
+
riskLevel?: string;
|
|
3683
3698
|
/**
|
|
3684
|
-
*
|
|
3699
|
+
* ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
|
|
3685
3700
|
*/
|
|
3686
|
-
|
|
3687
|
-
[key: string]: unknown;
|
|
3688
|
-
};
|
|
3701
|
+
source?: 'USER_META' | 'FIAT_CURRENCY' | 'OPENBB_MAPPING' | 'FALLBACK';
|
|
3689
3702
|
};
|
|
3690
3703
|
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
3694
|
-
|
|
3695
|
-
|
|
3696
|
-
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
name: string;
|
|
3700
|
-
/**
|
|
3701
|
-
* Payee category
|
|
3702
|
-
*/
|
|
3703
|
-
category?: string;
|
|
3704
|
-
/**
|
|
3705
|
-
* Source of the payee
|
|
3706
|
-
*/
|
|
3707
|
-
source?: 'user' | 'global';
|
|
3708
|
-
/**
|
|
3709
|
-
* PayeeProfile ID (if matched from global)
|
|
3710
|
-
*/
|
|
3711
|
-
payeeProfileId?: string;
|
|
3712
|
-
};
|
|
3713
|
-
|
|
3714
|
-
/**
|
|
3715
|
-
* Source of the payee
|
|
3716
|
-
*/
|
|
3717
|
-
export type source = 'user' | 'global';
|
|
3718
|
-
|
|
3719
|
-
export type NlpAlternativePayeeDto = {
|
|
3720
|
-
/**
|
|
3721
|
-
* Payee ID
|
|
3722
|
-
*/
|
|
3723
|
-
id: string;
|
|
3724
|
-
/**
|
|
3725
|
-
* Payee name
|
|
3726
|
-
*/
|
|
3727
|
-
name: string;
|
|
3728
|
-
/**
|
|
3729
|
-
* Similarity score (0-1)
|
|
3730
|
-
*/
|
|
3731
|
-
similarity: number;
|
|
3732
|
-
};
|
|
3733
|
-
|
|
3734
|
-
export type NlpPayeeConfirmationDataDto = {
|
|
3735
|
-
/**
|
|
3736
|
-
* Confidence score for the payee match (0-1)
|
|
3737
|
-
*/
|
|
3738
|
-
confidence: number;
|
|
3739
|
-
/**
|
|
3740
|
-
* Original payee string from user input
|
|
3741
|
-
*/
|
|
3742
|
-
originalPayee: string;
|
|
3743
|
-
/**
|
|
3744
|
-
* Suggested payee to use (null when no similar payees found)
|
|
3745
|
-
*/
|
|
3746
|
-
suggestedPayee?: NlpSuggestedPayeeDto | null;
|
|
3747
|
-
/**
|
|
3748
|
-
* Similarity score between original and suggested (0-1)
|
|
3749
|
-
*/
|
|
3750
|
-
similarity: number;
|
|
3751
|
-
/**
|
|
3752
|
-
* Alternative payee options
|
|
3753
|
-
*/
|
|
3754
|
-
alternatives: Array<NlpAlternativePayeeDto>;
|
|
3755
|
-
/**
|
|
3756
|
-
* Human-readable reasons for the match
|
|
3757
|
-
*/
|
|
3758
|
-
reasons: Array<string>;
|
|
3759
|
-
};
|
|
3760
|
-
|
|
3761
|
-
export type RecurringMatchInfoDto = {
|
|
3762
|
-
/**
|
|
3763
|
-
* Expected transaction ID
|
|
3764
|
-
*/
|
|
3765
|
-
expectedId: string;
|
|
3766
|
-
/**
|
|
3767
|
-
* Recurring rule ID
|
|
3768
|
-
*/
|
|
3769
|
-
ruleId: string;
|
|
3770
|
-
/**
|
|
3771
|
-
* Rule name for display
|
|
3772
|
-
*/
|
|
3773
|
-
ruleName: string;
|
|
3774
|
-
/**
|
|
3775
|
-
* Rule icon
|
|
3776
|
-
*/
|
|
3777
|
-
ruleIcon?: string;
|
|
3778
|
-
/**
|
|
3779
|
-
* Expected date (YYYY-MM-DD)
|
|
3780
|
-
*/
|
|
3781
|
-
expectedDate: string;
|
|
3782
|
-
/**
|
|
3783
|
-
* Expected amount
|
|
3784
|
-
*/
|
|
3785
|
-
expectedAmount: number;
|
|
3786
|
-
/**
|
|
3787
|
-
* Match confidence score (0-1)
|
|
3788
|
-
*/
|
|
3789
|
-
confidence: number;
|
|
3790
|
-
/**
|
|
3791
|
-
* Whether auto-matched (confidence >= 0.82)
|
|
3792
|
-
*/
|
|
3793
|
-
isAutoMatched: boolean;
|
|
3794
|
-
};
|
|
3795
|
-
|
|
3796
|
-
export type NlpSuggestedAccountDto = {
|
|
3797
|
-
/**
|
|
3798
|
-
* Suggested account path
|
|
3799
|
-
*/
|
|
3800
|
-
account: string;
|
|
3801
|
-
/**
|
|
3802
|
-
* Confidence score for this suggestion (0-1)
|
|
3803
|
-
*/
|
|
3804
|
-
confidence?: number;
|
|
3805
|
-
};
|
|
3806
|
-
|
|
3807
|
-
export type NlpSuggestedAccountsDto = {
|
|
3808
|
-
/**
|
|
3809
|
-
* Source account suggestion (where money comes from). For expense: asset/liability account. For income: income account.
|
|
3810
|
-
*/
|
|
3811
|
-
source?: NlpSuggestedAccountDto;
|
|
3812
|
-
/**
|
|
3813
|
-
* Destination account suggestion (where money goes to). For expense: expense account. For income: asset/liability account.
|
|
3814
|
-
*/
|
|
3815
|
-
destination?: NlpSuggestedAccountDto;
|
|
3816
|
-
};
|
|
3817
|
-
|
|
3818
|
-
export type NlpDefaultAccountsDto = {
|
|
3819
|
-
/**
|
|
3820
|
-
* Default asset account
|
|
3821
|
-
*/
|
|
3822
|
-
asset: string;
|
|
3823
|
-
/**
|
|
3824
|
-
* Default expense account
|
|
3825
|
-
*/
|
|
3826
|
-
expense: string;
|
|
3827
|
-
/**
|
|
3828
|
-
* Default income account
|
|
3829
|
-
*/
|
|
3830
|
-
income: string;
|
|
3831
|
-
/**
|
|
3832
|
-
* Default liability account
|
|
3833
|
-
*/
|
|
3834
|
-
liability: string;
|
|
3835
|
-
};
|
|
3836
|
-
|
|
3837
|
-
export type NlpResponseDto = {
|
|
3838
|
-
/**
|
|
3839
|
-
* Response status
|
|
3840
|
-
*/
|
|
3841
|
-
status: 'success' | 'pending' | 'error';
|
|
3842
|
-
/**
|
|
3843
|
-
* Action taken or requested
|
|
3844
|
-
*/
|
|
3845
|
-
action:
|
|
3846
|
-
| 'created'
|
|
3847
|
-
| 'ask'
|
|
3848
|
-
| 'confirm'
|
|
3849
|
-
| 'confirm_duplicate'
|
|
3850
|
-
| 'confirm_rule'
|
|
3851
|
-
| 'confirm_account'
|
|
3852
|
-
| 'confirm_payee'
|
|
3853
|
-
| 'cancel';
|
|
3854
|
-
/**
|
|
3855
|
-
* Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
|
|
3856
|
-
*/
|
|
3857
|
-
intent?: 'expense' | 'asset' | 'income' | 'liability' | 'equity';
|
|
3858
|
-
/**
|
|
3859
|
-
* Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
|
|
3860
|
-
*/
|
|
3861
|
-
assetSubType?: 'transfer' | 'banking' | 'investment';
|
|
3862
|
-
/**
|
|
3863
|
-
* Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
|
|
3864
|
-
*/
|
|
3865
|
-
liabilitySubType?: 'borrow' | 'repay';
|
|
3866
|
-
/**
|
|
3867
|
-
* Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
|
|
3868
|
-
*/
|
|
3869
|
-
equitySubType?: 'opening' | 'adjustment';
|
|
3870
|
-
/**
|
|
3871
|
-
* Payment source for expense transactions (v6.1). Indicates whether payment comes from asset or liability account. Only present when intent is "expense".
|
|
3872
|
-
*/
|
|
3873
|
-
paymentSource?: 'asset' | 'liability';
|
|
3874
|
-
/**
|
|
3875
|
-
* Liability account type hint for credit card/BNPL spending (v6.1). Only present when paymentSource is "liability". Values: CreditCard, Huabei, Baitiao
|
|
3876
|
-
*/
|
|
3877
|
-
liabilityHint?: string;
|
|
3878
|
-
/**
|
|
3879
|
-
* Human-readable message (for ask or error actions). Deprecated: Use messageKey for i18n support.
|
|
3880
|
-
* @deprecated
|
|
3881
|
-
*/
|
|
3882
|
-
message?: string;
|
|
3883
|
-
/**
|
|
3884
|
-
* i18n message key for frontend translation. Use this instead of message for internationalization support.
|
|
3885
|
-
*/
|
|
3886
|
-
messageKey?: string;
|
|
3887
|
-
/**
|
|
3888
|
-
* Parameters for message interpolation. Used with messageKey for dynamic values in translated messages.
|
|
3889
|
-
*/
|
|
3890
|
-
messageParams?: {
|
|
3891
|
-
[key: string]: unknown;
|
|
3892
|
-
};
|
|
3893
|
-
/**
|
|
3894
|
-
* Session ID for multi-turn dialogue. Must be included in subsequent requests to continue the conversation.
|
|
3895
|
-
*/
|
|
3896
|
-
sessionId?: string;
|
|
3897
|
-
/**
|
|
3898
|
-
* Which slot is waiting for user input
|
|
3899
|
-
*/
|
|
3900
|
-
waitingFor?: string;
|
|
3901
|
-
/**
|
|
3902
|
-
* Created transaction info (for created action)
|
|
3903
|
-
*/
|
|
3904
|
-
transaction?: NlpTransactionInfoDto;
|
|
3905
|
-
/**
|
|
3906
|
-
* Parsed data for confirmation (when action is "confirm"). Contains extracted fields that user should verify before transaction creation.
|
|
3907
|
-
*/
|
|
3908
|
-
parsedData?: NlpParsedDataDto;
|
|
3909
|
-
/**
|
|
3910
|
-
* Duplicate detection data (when action is "confirm_duplicate"). Contains information about potential duplicate transaction for user confirmation.
|
|
3911
|
-
*/
|
|
3912
|
-
duplicateData?: NlpDuplicateConfirmationDataDto;
|
|
3913
|
-
/**
|
|
3914
|
-
* Rule match data (when action is "confirm_rule"). Contains information about medium-confidence rule match for user confirmation.
|
|
3915
|
-
*/
|
|
3916
|
-
ruleData?: NlpRuleConfirmationDataDto;
|
|
3917
|
-
/**
|
|
3918
|
-
* Account validation data (when action is "confirm_account"). Contains information about invalid account for user correction.
|
|
3919
|
-
*/
|
|
3920
|
-
accountData?: NlpAccountConfirmationDataDto;
|
|
3921
|
-
/**
|
|
3922
|
-
* Payee confirmation data (when action is "confirm_payee"). Contains information about medium/low confidence payee match for user confirmation.
|
|
3923
|
-
*/
|
|
3924
|
-
payeeData?: NlpPayeeConfirmationDataDto;
|
|
3925
|
-
/**
|
|
3926
|
-
* Overall confidence score (0-1)
|
|
3927
|
-
*/
|
|
3928
|
-
confidence?: number;
|
|
3929
|
-
/**
|
|
3930
|
-
* Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.
|
|
3931
|
-
*/
|
|
3932
|
-
confidenceThreshold?: number;
|
|
3933
|
-
/**
|
|
3934
|
-
* Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.
|
|
3935
|
-
*/
|
|
3936
|
-
recurringMatch?: RecurringMatchInfoDto;
|
|
3937
|
-
/**
|
|
3938
|
-
* 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.
|
|
3939
|
-
*/
|
|
3940
|
-
recurringSuggestion?: RecurringSuggestionDto;
|
|
3941
|
-
/**
|
|
3942
|
-
* Suggested accounts for this transaction. Contains recommended source and destination accounts based on the detected intent and rules.
|
|
3943
|
-
*/
|
|
3944
|
-
suggestedAccounts?: NlpSuggestedAccountsDto;
|
|
3945
|
-
/**
|
|
3946
|
-
* Default accounts for the user/region. These are fallback accounts used when no specific suggestion is available.
|
|
3947
|
-
*/
|
|
3948
|
-
defaultAccounts?: NlpDefaultAccountsDto;
|
|
3949
|
-
};
|
|
3950
|
-
|
|
3951
|
-
/**
|
|
3952
|
-
* Response status
|
|
3953
|
-
*/
|
|
3954
|
-
export type status4 = 'success' | 'pending' | 'error';
|
|
3955
|
-
|
|
3956
|
-
/**
|
|
3957
|
-
* Action taken or requested
|
|
3958
|
-
*/
|
|
3959
|
-
export type action2 =
|
|
3960
|
-
| 'created'
|
|
3961
|
-
| 'ask'
|
|
3962
|
-
| 'confirm'
|
|
3963
|
-
| 'confirm_duplicate'
|
|
3964
|
-
| 'confirm_rule'
|
|
3965
|
-
| 'confirm_account'
|
|
3966
|
-
| 'confirm_payee'
|
|
3967
|
-
| 'cancel';
|
|
3968
|
-
|
|
3969
|
-
/**
|
|
3970
|
-
* Transaction intent detected by EntityRouter (v6.0: 5 core intents). Frontend uses this to render scenario-specific form fields.
|
|
3971
|
-
*/
|
|
3972
|
-
export type intent = 'expense' | 'asset' | 'income' | 'liability' | 'equity';
|
|
3973
|
-
|
|
3974
|
-
/**
|
|
3975
|
-
* Asset sub-type (only present when intent is "asset"). Determines which asset-related form to render.
|
|
3976
|
-
*/
|
|
3977
|
-
export type assetSubType = 'transfer' | 'banking' | 'investment';
|
|
3978
|
-
|
|
3979
|
-
/**
|
|
3980
|
-
* Liability sub-type (only present when intent is "liability"). borrow: borrowing money (Liabilities → Assets), repay: repaying debt (Assets → Liabilities).
|
|
3981
|
-
*/
|
|
3982
|
-
export type liabilitySubType = 'borrow' | 'repay';
|
|
3983
|
-
|
|
3984
|
-
/**
|
|
3985
|
-
* Equity sub-type (only present when intent is "equity"). opening: account opening balance (Equity → Assets), adjustment: balance correction.
|
|
3986
|
-
*/
|
|
3987
|
-
export type equitySubType = 'opening' | 'adjustment';
|
|
3988
|
-
|
|
3989
|
-
export type BalanceByCurrencyDto = {
|
|
3990
|
-
/**
|
|
3991
|
-
* ISO 4217 currency code
|
|
3992
|
-
*/
|
|
3993
|
-
currency: string;
|
|
3994
|
-
/**
|
|
3995
|
-
* Balance amount
|
|
3996
|
-
*/
|
|
3997
|
-
balance: string;
|
|
3998
|
-
};
|
|
3999
|
-
|
|
4000
|
-
export type NetWorthByCurrencyDto = {
|
|
4001
|
-
/**
|
|
4002
|
-
* Net worth by currency
|
|
4003
|
-
*/
|
|
4004
|
-
netWorth: Array<BalanceByCurrencyDto>;
|
|
4005
|
-
/**
|
|
4006
|
-
* Assets by currency
|
|
4007
|
-
*/
|
|
4008
|
-
assets: Array<BalanceByCurrencyDto>;
|
|
4009
|
-
/**
|
|
4010
|
-
* Liabilities by currency
|
|
4011
|
-
*/
|
|
4012
|
-
liabilities: Array<BalanceByCurrencyDto>;
|
|
4013
|
-
};
|
|
4014
|
-
|
|
4015
|
-
export type ConvertedNetWorthDto = {
|
|
4016
|
-
/**
|
|
4017
|
-
* Base currency for conversion
|
|
4018
|
-
*/
|
|
4019
|
-
baseCurrency: string;
|
|
4020
|
-
/**
|
|
4021
|
-
* Converted net worth
|
|
4022
|
-
*/
|
|
4023
|
-
netWorth: string;
|
|
4024
|
-
/**
|
|
4025
|
-
* Converted assets
|
|
4026
|
-
*/
|
|
4027
|
-
assets: string;
|
|
4028
|
-
/**
|
|
4029
|
-
* Converted liabilities
|
|
4030
|
-
*/
|
|
4031
|
-
liabilities: string;
|
|
4032
|
-
/**
|
|
4033
|
-
* Exchange rates used for conversion
|
|
4034
|
-
*/
|
|
4035
|
-
exchangeRates: {
|
|
4036
|
-
[key: string]: unknown;
|
|
4037
|
-
};
|
|
4038
|
-
};
|
|
4039
|
-
|
|
4040
|
-
export type ExchangeRateWarningDto = {
|
|
4041
|
-
/**
|
|
4042
|
-
* Warning type
|
|
4043
|
-
*/
|
|
4044
|
-
type: string;
|
|
4045
|
-
/**
|
|
4046
|
-
* Currency without exchange rate
|
|
4047
|
-
*/
|
|
4048
|
-
currency: string;
|
|
4049
|
-
/**
|
|
4050
|
-
* Total amount affected
|
|
4051
|
-
*/
|
|
4052
|
-
totalAmount: string;
|
|
4053
|
-
};
|
|
4054
|
-
|
|
4055
|
-
export type NetWorthResponseDto = {
|
|
4056
|
-
/**
|
|
4057
|
-
* Total net worth (assets - liabilities, converted to base currency)
|
|
4058
|
-
*/
|
|
4059
|
-
netWorth: string;
|
|
4060
|
-
/**
|
|
4061
|
-
* Total assets value (converted)
|
|
4062
|
-
*/
|
|
4063
|
-
assets: string;
|
|
4064
|
-
/**
|
|
4065
|
-
* Total liabilities value (positive number, converted)
|
|
4066
|
-
*/
|
|
4067
|
-
liabilities: string;
|
|
4068
|
-
/**
|
|
4069
|
-
* Monthly return (change from last month)
|
|
4070
|
-
*/
|
|
4071
|
-
monthlyReturn: string;
|
|
4072
|
-
/**
|
|
4073
|
-
* Monthly return percentage
|
|
4074
|
-
*/
|
|
4075
|
-
monthlyReturnPercentage: string;
|
|
4076
|
-
/**
|
|
4077
|
-
* Base currency code
|
|
4078
|
-
*/
|
|
4079
|
-
currency: string;
|
|
4080
|
-
/**
|
|
4081
|
-
* Data as of date (ISO 8601)
|
|
4082
|
-
*/
|
|
4083
|
-
asOf: string;
|
|
4084
|
-
/**
|
|
4085
|
-
* Balances grouped by original currency
|
|
4086
|
-
*/
|
|
4087
|
-
byCurrency?: NetWorthByCurrencyDto;
|
|
4088
|
-
/**
|
|
4089
|
-
* Converted values in base currency (undefined if no exchange rates available)
|
|
4090
|
-
*/
|
|
4091
|
-
converted?: ConvertedNetWorthDto;
|
|
4092
|
-
/**
|
|
4093
|
-
* Exchange rate warnings
|
|
4094
|
-
*/
|
|
4095
|
-
warnings?: Array<ExchangeRateWarningDto>;
|
|
4096
|
-
};
|
|
4097
|
-
|
|
4098
|
-
export type AccountItemDto = {
|
|
4099
|
-
/**
|
|
4100
|
-
* Account ID
|
|
4101
|
-
*/
|
|
4102
|
-
id: string;
|
|
4103
|
-
/**
|
|
4104
|
-
* Full account name
|
|
4105
|
-
*/
|
|
4106
|
-
name: string;
|
|
4107
|
-
/**
|
|
4108
|
-
* Display name (last part of account path)
|
|
4109
|
-
*/
|
|
4110
|
-
displayName: string;
|
|
4111
|
-
/**
|
|
4112
|
-
* Account balance
|
|
4113
|
-
*/
|
|
4114
|
-
balance: string;
|
|
4115
|
-
/**
|
|
4116
|
-
* Currency code
|
|
4117
|
-
*/
|
|
4118
|
-
currency: string;
|
|
4119
|
-
};
|
|
4120
|
-
|
|
4121
|
-
export type PlatformGroupDto = {
|
|
4122
|
-
/**
|
|
4123
|
-
* Platform ID
|
|
4124
|
-
*/
|
|
4125
|
-
platformId: string;
|
|
4126
|
-
/**
|
|
4127
|
-
* Platform display name
|
|
4128
|
-
*/
|
|
4129
|
-
platformName: string;
|
|
4130
|
-
/**
|
|
4131
|
-
* Accounts within this platform
|
|
4132
|
-
*/
|
|
4133
|
-
accounts: Array<AccountItemDto>;
|
|
4134
|
-
/**
|
|
4135
|
-
* Total balance across all accounts in platform
|
|
4136
|
-
*/
|
|
4137
|
-
totalBalance: string;
|
|
4138
|
-
};
|
|
4139
|
-
|
|
4140
|
-
export type AccountsSummaryDto = {
|
|
4141
|
-
/**
|
|
4142
|
-
* Total number of accounts
|
|
4143
|
-
*/
|
|
4144
|
-
totalAccounts: number;
|
|
4145
|
-
/**
|
|
4146
|
-
* Total number of platforms
|
|
4147
|
-
*/
|
|
4148
|
-
totalPlatforms: number;
|
|
4149
|
-
};
|
|
4150
|
-
|
|
4151
|
-
export type AccountsResponseDto = {
|
|
4152
|
-
/**
|
|
4153
|
-
* Account groups by platform
|
|
4154
|
-
*/
|
|
4155
|
-
groups: Array<PlatformGroupDto>;
|
|
4156
|
-
/**
|
|
4157
|
-
* Summary statistics
|
|
4158
|
-
*/
|
|
4159
|
-
summary: AccountsSummaryDto;
|
|
4160
|
-
};
|
|
4161
|
-
|
|
4162
|
-
export type AccountItemWithAssetClassDto = {
|
|
4163
|
-
/**
|
|
4164
|
-
* Account ID
|
|
4165
|
-
*/
|
|
4166
|
-
id: string;
|
|
4167
|
-
/**
|
|
4168
|
-
* Full account name
|
|
4169
|
-
*/
|
|
4170
|
-
name: string;
|
|
4171
|
-
/**
|
|
4172
|
-
* Display name (last part of account path)
|
|
4173
|
-
*/
|
|
4174
|
-
displayName: string;
|
|
4175
|
-
/**
|
|
4176
|
-
* Account balance
|
|
4177
|
-
*/
|
|
4178
|
-
balance: string;
|
|
4179
|
-
/**
|
|
4180
|
-
* Currency code
|
|
4181
|
-
*/
|
|
4182
|
-
currency: string;
|
|
4183
|
-
/**
|
|
4184
|
-
* Asset class
|
|
4185
|
-
*/
|
|
4186
|
-
assetClass: string;
|
|
4187
|
-
/**
|
|
4188
|
-
* Asset sub-class (Prisma-compatible)
|
|
4189
|
-
*/
|
|
4190
|
-
assetSubClass?: string;
|
|
4191
|
-
/**
|
|
4192
|
-
* Regional sub-class (region-specific, for display)
|
|
4193
|
-
*/
|
|
4194
|
-
regionalSubClass?: string;
|
|
4195
|
-
/**
|
|
4196
|
-
* Risk level
|
|
4197
|
-
*/
|
|
4198
|
-
riskLevel?: string;
|
|
4199
|
-
};
|
|
3704
|
+
/**
|
|
3705
|
+
* ADR-0105 classification provenance (holding level always; account level only on FALLBACK)
|
|
3706
|
+
*/
|
|
3707
|
+
export type source =
|
|
3708
|
+
| 'USER_META'
|
|
3709
|
+
| 'FIAT_CURRENCY'
|
|
3710
|
+
| 'OPENBB_MAPPING'
|
|
3711
|
+
| 'FALLBACK';
|
|
4200
3712
|
|
|
4201
3713
|
export type AssetClassGroupDto = {
|
|
4202
3714
|
/**
|
|
@@ -4284,6 +3796,12 @@ export type AssetClassSummaryDto = {
|
|
|
4284
3796
|
* Exchange rate warnings
|
|
4285
3797
|
*/
|
|
4286
3798
|
warnings?: Array<AccountExchangeRateWarningDto>;
|
|
3799
|
+
/**
|
|
3800
|
+
* ADR-0105 §4 fallback provenance stats (holding level only). valueRatio is the grey-area share of total converted value; count is the number of source=FALLBACK holdings.
|
|
3801
|
+
*/
|
|
3802
|
+
fallback?: {
|
|
3803
|
+
[key: string]: unknown;
|
|
3804
|
+
};
|
|
4287
3805
|
};
|
|
4288
3806
|
|
|
4289
3807
|
export type AssetClassAccountsResponseDto = {
|
|
@@ -4295,6 +3813,56 @@ export type AssetClassAccountsResponseDto = {
|
|
|
4295
3813
|
* Summary statistics
|
|
4296
3814
|
*/
|
|
4297
3815
|
summary: AssetClassSummaryDto;
|
|
3816
|
+
/**
|
|
3817
|
+
* ADR-0105 §6 holding-level grey-area bucket (source=FALLBACK holdings peeled out of groups). Present only for groupBy=holdingAssetClass when FALLBACK holdings exist.
|
|
3818
|
+
*/
|
|
3819
|
+
uncategorized?: AssetClassGroupDto;
|
|
3820
|
+
};
|
|
3821
|
+
|
|
3822
|
+
export type HoldingAssetClassAccountSliceDto = {
|
|
3823
|
+
/**
|
|
3824
|
+
* Account ID
|
|
3825
|
+
*/
|
|
3826
|
+
accountId: string;
|
|
3827
|
+
/**
|
|
3828
|
+
* Full account path
|
|
3829
|
+
*/
|
|
3830
|
+
accountPath: string;
|
|
3831
|
+
/**
|
|
3832
|
+
* Currency of the holding with the largest converted base value; undefined when no holding is convertible
|
|
3833
|
+
*/
|
|
3834
|
+
accountCurrency?: string;
|
|
3835
|
+
/**
|
|
3836
|
+
* Account's market value in base currency (Σ converted holdings; grey bucket included)
|
|
3837
|
+
*/
|
|
3838
|
+
marketValueBase: string;
|
|
3839
|
+
/**
|
|
3840
|
+
* Share of the global total (0-100). 0 when globalTotal is zero (no NaN/Infinity).
|
|
3841
|
+
*/
|
|
3842
|
+
shareOfTotalPct: number;
|
|
3843
|
+
/**
|
|
3844
|
+
* Per-account asset-class breakdown
|
|
3845
|
+
*/
|
|
3846
|
+
groups: Array<AssetClassGroupDto>;
|
|
3847
|
+
/**
|
|
3848
|
+
* Per-account grey bucket (source=FALLBACK holdings, incl. broker cash)
|
|
3849
|
+
*/
|
|
3850
|
+
uncategorized?: AssetClassGroupDto;
|
|
3851
|
+
/**
|
|
3852
|
+
* Every holding row for this account (account ID in each row’s `id` field)
|
|
3853
|
+
*/
|
|
3854
|
+
holdings: Array<AccountItemWithAssetClassDto>;
|
|
3855
|
+
};
|
|
3856
|
+
|
|
3857
|
+
export type HoldingAssetClassCrossAccountResponseDto = {
|
|
3858
|
+
/**
|
|
3859
|
+
* Merged cross-account holding aggregation
|
|
3860
|
+
*/
|
|
3861
|
+
global: AssetClassAccountsResponseDto;
|
|
3862
|
+
/**
|
|
3863
|
+
* Per-account slices
|
|
3864
|
+
*/
|
|
3865
|
+
byAccount: Array<HoldingAssetClassAccountSliceDto>;
|
|
4298
3866
|
};
|
|
4299
3867
|
|
|
4300
3868
|
export type CashFlowByCurrencyDto = {
|
|
@@ -4376,6 +3944,303 @@ export type CashFlowResponseDto = {
|
|
|
4376
3944
|
warnings?: Array<ExchangeRateWarningDto>;
|
|
4377
3945
|
};
|
|
4378
3946
|
|
|
3947
|
+
export type MonetaryDto = {
|
|
3948
|
+
/**
|
|
3949
|
+
* Amount (Decimal string)
|
|
3950
|
+
*/
|
|
3951
|
+
amount: string;
|
|
3952
|
+
/**
|
|
3953
|
+
* ISO 4217 currency
|
|
3954
|
+
*/
|
|
3955
|
+
currency: string;
|
|
3956
|
+
/**
|
|
3957
|
+
* Converted to user base currency (Decimal string)
|
|
3958
|
+
*/
|
|
3959
|
+
baseCcyEquivalent?: {
|
|
3960
|
+
[key: string]: unknown;
|
|
3961
|
+
} | null;
|
|
3962
|
+
};
|
|
3963
|
+
|
|
3964
|
+
export type CurrentPriceDto = {
|
|
3965
|
+
/**
|
|
3966
|
+
* Price amount (Decimal string)
|
|
3967
|
+
*/
|
|
3968
|
+
amount: string;
|
|
3969
|
+
/**
|
|
3970
|
+
* Price currency (ISO 4217)
|
|
3971
|
+
*/
|
|
3972
|
+
currency: string;
|
|
3973
|
+
/**
|
|
3974
|
+
* Price date (ISO 8601)
|
|
3975
|
+
*/
|
|
3976
|
+
date: string;
|
|
3977
|
+
/**
|
|
3978
|
+
* Price source
|
|
3979
|
+
*/
|
|
3980
|
+
source: 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
|
|
3981
|
+
};
|
|
3982
|
+
|
|
3983
|
+
/**
|
|
3984
|
+
* Price source
|
|
3985
|
+
*/
|
|
3986
|
+
export type source2 = 'USER_OVERRIDE' | 'OPENBB_EQUITY' | 'OPENBB_CURRENCY';
|
|
3987
|
+
|
|
3988
|
+
export type FxRateDto = {
|
|
3989
|
+
from: string;
|
|
3990
|
+
to: string;
|
|
3991
|
+
/**
|
|
3992
|
+
* FX rate (Decimal string)
|
|
3993
|
+
*/
|
|
3994
|
+
rate: string;
|
|
3995
|
+
/**
|
|
3996
|
+
* Rate date (ISO 8601)
|
|
3997
|
+
*/
|
|
3998
|
+
date: string;
|
|
3999
|
+
};
|
|
4000
|
+
|
|
4001
|
+
export type HoldingPnlRowDto = {
|
|
4002
|
+
/**
|
|
4003
|
+
* Account UUID
|
|
4004
|
+
*/
|
|
4005
|
+
accountId: string;
|
|
4006
|
+
/**
|
|
4007
|
+
* Full account path
|
|
4008
|
+
*/
|
|
4009
|
+
accountPath: string;
|
|
4010
|
+
/**
|
|
4011
|
+
* Account settlement currency (ISO 4217), from cost currency
|
|
4012
|
+
*/
|
|
4013
|
+
accountCcy?: {
|
|
4014
|
+
[key: string]: unknown;
|
|
4015
|
+
} | null;
|
|
4016
|
+
/**
|
|
4017
|
+
* Broker type derived from Platform.type
|
|
4018
|
+
*/
|
|
4019
|
+
brokerType?: {
|
|
4020
|
+
[key: string]: unknown;
|
|
4021
|
+
} | null;
|
|
4022
|
+
/**
|
|
4023
|
+
* Commodity symbol
|
|
4024
|
+
*/
|
|
4025
|
+
symbol: string;
|
|
4026
|
+
/**
|
|
4027
|
+
* Chart segment token (libs/common resolver)
|
|
4028
|
+
*/
|
|
4029
|
+
chartToken: 'equity' | 'fund' | 'bond' | 'cash' | 'other';
|
|
4030
|
+
assetClass: string;
|
|
4031
|
+
assetSubClass?: {
|
|
4032
|
+
[key: string]: unknown;
|
|
4033
|
+
} | null;
|
|
4034
|
+
/**
|
|
4035
|
+
* Net held units (Decimal string)
|
|
4036
|
+
*/
|
|
4037
|
+
units: string;
|
|
4038
|
+
/**
|
|
4039
|
+
* Average cost per unit; null when cost currency conflicts or no cost
|
|
4040
|
+
*/
|
|
4041
|
+
averageCostPerUnit?: MonetaryDto | null;
|
|
4042
|
+
/**
|
|
4043
|
+
* Cost basis of held units
|
|
4044
|
+
*/
|
|
4045
|
+
costBasis?: MonetaryDto | null;
|
|
4046
|
+
/**
|
|
4047
|
+
* Market value at asOf price
|
|
4048
|
+
*/
|
|
4049
|
+
marketValue?: MonetaryDto | null;
|
|
4050
|
+
/**
|
|
4051
|
+
* Price used for market value
|
|
4052
|
+
*/
|
|
4053
|
+
currentPrice?: CurrentPriceDto | null;
|
|
4054
|
+
/**
|
|
4055
|
+
* Unrealized P&L in base currency (Decimal string); null when any FX/price missing
|
|
4056
|
+
*/
|
|
4057
|
+
unrealizedPnlBase?: {
|
|
4058
|
+
[key: string]: unknown;
|
|
4059
|
+
} | null;
|
|
4060
|
+
/**
|
|
4061
|
+
* Unrealized P&L % (Decimal string)
|
|
4062
|
+
*/
|
|
4063
|
+
unrealizedPnlPct?: {
|
|
4064
|
+
[key: string]: unknown;
|
|
4065
|
+
} | null;
|
|
4066
|
+
/**
|
|
4067
|
+
* Historical FX rate applied to cost basis
|
|
4068
|
+
*/
|
|
4069
|
+
costFxRate?: FxRateDto | null;
|
|
4070
|
+
/**
|
|
4071
|
+
* FX rate applied to market value
|
|
4072
|
+
*/
|
|
4073
|
+
marketFxRate?: FxRateDto | null;
|
|
4074
|
+
/**
|
|
4075
|
+
* Share of invested assets % (Decimal string); only for invested chartTokens
|
|
4076
|
+
*/
|
|
4077
|
+
pctOfInvestedAssets?: {
|
|
4078
|
+
[key: string]: unknown;
|
|
4079
|
+
} | null;
|
|
4080
|
+
/**
|
|
4081
|
+
* Cumulative realized P&L on sold lots (asOf-date cutoff); null when the method has no applicable sells, a sell lacks a price, or any required FX rate is missing (never-mix). When a sell spans multiple currencies (cross-currency sale), amount and currency reflect the base currency; baseCcyEquivalent is always the authoritative dual-FX figure
|
|
4082
|
+
*/
|
|
4083
|
+
realizedPnl?: MonetaryDto | null;
|
|
4084
|
+
};
|
|
4085
|
+
|
|
4086
|
+
/**
|
|
4087
|
+
* Chart segment token (libs/common resolver)
|
|
4088
|
+
*/
|
|
4089
|
+
export type chartToken = 'equity' | 'fund' | 'bond' | 'cash' | 'other';
|
|
4090
|
+
|
|
4091
|
+
export type HoldingPnlWarningDto = {
|
|
4092
|
+
/**
|
|
4093
|
+
* Warning type
|
|
4094
|
+
*/
|
|
4095
|
+
type:
|
|
4096
|
+
| 'MISSING_COST_FX_RATE'
|
|
4097
|
+
| 'MISSING_MARKET_FX_RATE'
|
|
4098
|
+
| 'MISSING_SALE_PRICE'
|
|
4099
|
+
| 'MISSING_REALIZED_FX_RATE'
|
|
4100
|
+
| 'OVERSOLD_LOTS'
|
|
4101
|
+
| 'NO_PRICE'
|
|
4102
|
+
| 'MIXED_COST_CURRENCY';
|
|
4103
|
+
symbol?: {
|
|
4104
|
+
[key: string]: unknown;
|
|
4105
|
+
} | null;
|
|
4106
|
+
accountId?: {
|
|
4107
|
+
[key: string]: unknown;
|
|
4108
|
+
} | null;
|
|
4109
|
+
currency?: {
|
|
4110
|
+
[key: string]: unknown;
|
|
4111
|
+
} | null;
|
|
4112
|
+
};
|
|
4113
|
+
|
|
4114
|
+
/**
|
|
4115
|
+
* Warning type
|
|
4116
|
+
*/
|
|
4117
|
+
export type type4 =
|
|
4118
|
+
| 'MISSING_COST_FX_RATE'
|
|
4119
|
+
| 'MISSING_MARKET_FX_RATE'
|
|
4120
|
+
| 'MISSING_SALE_PRICE'
|
|
4121
|
+
| 'MISSING_REALIZED_FX_RATE'
|
|
4122
|
+
| 'OVERSOLD_LOTS'
|
|
4123
|
+
| 'NO_PRICE'
|
|
4124
|
+
| 'MIXED_COST_CURRENCY';
|
|
4125
|
+
|
|
4126
|
+
export type HoldingPnlResponseDto = {
|
|
4127
|
+
asOfDate: string;
|
|
4128
|
+
baseCurrency: string;
|
|
4129
|
+
/**
|
|
4130
|
+
* Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
|
|
4131
|
+
*/
|
|
4132
|
+
method: 'average' | 'FIFO';
|
|
4133
|
+
rows: Array<HoldingPnlRowDto>;
|
|
4134
|
+
warnings: Array<HoldingPnlWarningDto>;
|
|
4135
|
+
};
|
|
4136
|
+
|
|
4137
|
+
/**
|
|
4138
|
+
* Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).
|
|
4139
|
+
*/
|
|
4140
|
+
export type method = 'average' | 'FIFO';
|
|
4141
|
+
|
|
4142
|
+
export type CreateBeanPriceDto = {
|
|
4143
|
+
/**
|
|
4144
|
+
* Currency being priced (e.g., USD, AAPL, BTC)
|
|
4145
|
+
*/
|
|
4146
|
+
currency: string;
|
|
4147
|
+
/**
|
|
4148
|
+
* Quote currency (pricing currency, e.g., CNY, EUR)
|
|
4149
|
+
*/
|
|
4150
|
+
quoteCurrency: string;
|
|
4151
|
+
/**
|
|
4152
|
+
* Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.
|
|
4153
|
+
*/
|
|
4154
|
+
amount: number;
|
|
4155
|
+
/**
|
|
4156
|
+
* Price date (ISO 8601 format)
|
|
4157
|
+
*/
|
|
4158
|
+
date: string;
|
|
4159
|
+
/**
|
|
4160
|
+
* Metadata (validated by Zod schema, max field lengths enforced)
|
|
4161
|
+
*/
|
|
4162
|
+
metadata?: {
|
|
4163
|
+
[key: string]: unknown;
|
|
4164
|
+
};
|
|
4165
|
+
};
|
|
4166
|
+
|
|
4167
|
+
export type PriceResponseDto = {
|
|
4168
|
+
/**
|
|
4169
|
+
* Unique identifier
|
|
4170
|
+
*/
|
|
4171
|
+
id: string;
|
|
4172
|
+
/**
|
|
4173
|
+
* User ID (owner of the price)
|
|
4174
|
+
*/
|
|
4175
|
+
userId: string;
|
|
4176
|
+
/**
|
|
4177
|
+
* Currency being priced (e.g., USD, AAPL, BTC)
|
|
4178
|
+
*/
|
|
4179
|
+
currency: string;
|
|
4180
|
+
/**
|
|
4181
|
+
* Quote currency (pricing currency, e.g., USD, CNY)
|
|
4182
|
+
*/
|
|
4183
|
+
quoteCurrency: string;
|
|
4184
|
+
/**
|
|
4185
|
+
* Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.
|
|
4186
|
+
*/
|
|
4187
|
+
amount: number;
|
|
4188
|
+
/**
|
|
4189
|
+
* Price date (ISO 8601 format). Represents the date this price was valid.
|
|
4190
|
+
*/
|
|
4191
|
+
date: string;
|
|
4192
|
+
/**
|
|
4193
|
+
* Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.
|
|
4194
|
+
*/
|
|
4195
|
+
meta: {
|
|
4196
|
+
[key: string]: unknown;
|
|
4197
|
+
};
|
|
4198
|
+
/**
|
|
4199
|
+
* Creation timestamp
|
|
4200
|
+
*/
|
|
4201
|
+
createdAt: string;
|
|
4202
|
+
/**
|
|
4203
|
+
* Last update timestamp
|
|
4204
|
+
*/
|
|
4205
|
+
updatedAt: string;
|
|
4206
|
+
};
|
|
4207
|
+
|
|
4208
|
+
export type PriceListResponseDto = {
|
|
4209
|
+
/**
|
|
4210
|
+
* List of prices
|
|
4211
|
+
*/
|
|
4212
|
+
items: Array<PriceResponseDto>;
|
|
4213
|
+
/**
|
|
4214
|
+
* Total number of prices
|
|
4215
|
+
*/
|
|
4216
|
+
total: number;
|
|
4217
|
+
};
|
|
4218
|
+
|
|
4219
|
+
export type UpdateBeanPriceDto = {
|
|
4220
|
+
/**
|
|
4221
|
+
* Currency being priced
|
|
4222
|
+
*/
|
|
4223
|
+
currency?: string;
|
|
4224
|
+
/**
|
|
4225
|
+
* Quote currency (pricing currency)
|
|
4226
|
+
*/
|
|
4227
|
+
quoteCurrency?: string;
|
|
4228
|
+
/**
|
|
4229
|
+
* Price amount (MUST be >= 0 per Beancount spec)
|
|
4230
|
+
*/
|
|
4231
|
+
amount?: number;
|
|
4232
|
+
/**
|
|
4233
|
+
* Price date (ISO 8601 format)
|
|
4234
|
+
*/
|
|
4235
|
+
date?: string;
|
|
4236
|
+
/**
|
|
4237
|
+
* Metadata
|
|
4238
|
+
*/
|
|
4239
|
+
metadata?: {
|
|
4240
|
+
[key: string]: unknown;
|
|
4241
|
+
};
|
|
4242
|
+
};
|
|
4243
|
+
|
|
4379
4244
|
export type CurrencyBalanceDto = {
|
|
4380
4245
|
/**
|
|
4381
4246
|
* ISO 4217 currency code
|
|
@@ -4492,7 +4357,7 @@ export type AccountControllerCreateData = {
|
|
|
4492
4357
|
requestBody: CreateAccountDto;
|
|
4493
4358
|
};
|
|
4494
4359
|
|
|
4495
|
-
export type AccountControllerCreateResponse =
|
|
4360
|
+
export type AccountControllerCreateResponse = unknown;
|
|
4496
4361
|
|
|
4497
4362
|
export type AccountControllerFindAllData = {
|
|
4498
4363
|
/**
|
|
@@ -4541,9 +4406,6 @@ export type AccountControllerFindOneData = {
|
|
|
4541
4406
|
export type AccountControllerFindOneResponse = AccountResponseDto;
|
|
4542
4407
|
|
|
4543
4408
|
export type AccountControllerUpdateData = {
|
|
4544
|
-
/**
|
|
4545
|
-
* Account UUID
|
|
4546
|
-
*/
|
|
4547
4409
|
id: string;
|
|
4548
4410
|
/**
|
|
4549
4411
|
* Region code for tenant context
|
|
@@ -4552,12 +4414,9 @@ export type AccountControllerUpdateData = {
|
|
|
4552
4414
|
requestBody: UpdateAccountDto;
|
|
4553
4415
|
};
|
|
4554
4416
|
|
|
4555
|
-
export type AccountControllerUpdateResponse =
|
|
4417
|
+
export type AccountControllerUpdateResponse = unknown;
|
|
4556
4418
|
|
|
4557
4419
|
export type AccountControllerDeleteData = {
|
|
4558
|
-
/**
|
|
4559
|
-
* Account UUID
|
|
4560
|
-
*/
|
|
4561
4420
|
id: string;
|
|
4562
4421
|
/**
|
|
4563
4422
|
* Region code for tenant context
|
|
@@ -4565,12 +4424,9 @@ export type AccountControllerDeleteData = {
|
|
|
4565
4424
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
4566
4425
|
};
|
|
4567
4426
|
|
|
4568
|
-
export type AccountControllerDeleteResponse =
|
|
4427
|
+
export type AccountControllerDeleteResponse = unknown;
|
|
4569
4428
|
|
|
4570
4429
|
export type AccountControllerCloseData = {
|
|
4571
|
-
/**
|
|
4572
|
-
* Account UUID
|
|
4573
|
-
*/
|
|
4574
4430
|
id: string;
|
|
4575
4431
|
/**
|
|
4576
4432
|
* Region code for tenant context
|
|
@@ -4579,12 +4435,9 @@ export type AccountControllerCloseData = {
|
|
|
4579
4435
|
requestBody: CloseAccountDto;
|
|
4580
4436
|
};
|
|
4581
4437
|
|
|
4582
|
-
export type AccountControllerCloseResponse =
|
|
4438
|
+
export type AccountControllerCloseResponse = unknown;
|
|
4583
4439
|
|
|
4584
4440
|
export type AccountControllerReopenData = {
|
|
4585
|
-
/**
|
|
4586
|
-
* Account UUID
|
|
4587
|
-
*/
|
|
4588
4441
|
id: string;
|
|
4589
4442
|
/**
|
|
4590
4443
|
* Region code for tenant context
|
|
@@ -4593,7 +4446,7 @@ export type AccountControllerReopenData = {
|
|
|
4593
4446
|
requestBody: ReopenAccountDto;
|
|
4594
4447
|
};
|
|
4595
4448
|
|
|
4596
|
-
export type AccountControllerReopenResponse =
|
|
4449
|
+
export type AccountControllerReopenResponse = unknown;
|
|
4597
4450
|
|
|
4598
4451
|
export type AccountStandardsControllerGetTemplatesData = {
|
|
4599
4452
|
/**
|
|
@@ -5675,25 +5528,13 @@ export type FileImportControllerIdentifyFileData = {
|
|
|
5675
5528
|
export type FileImportControllerIdentifyFileResponse = IdentifyResultDto;
|
|
5676
5529
|
|
|
5677
5530
|
export type FileImportControllerImportBeancountData = {
|
|
5678
|
-
/**
|
|
5679
|
-
* Beancount file to import
|
|
5680
|
-
*/
|
|
5681
|
-
formData: FileImportDto;
|
|
5682
5531
|
/**
|
|
5683
5532
|
* Region code for tenant context
|
|
5684
5533
|
*/
|
|
5685
5534
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5686
5535
|
};
|
|
5687
5536
|
|
|
5688
|
-
export type FileImportControllerImportBeancountResponse =
|
|
5689
|
-
imported?: number;
|
|
5690
|
-
skipped?: number;
|
|
5691
|
-
failed?: number;
|
|
5692
|
-
accountsCreated?: number;
|
|
5693
|
-
errors?: Array<{
|
|
5694
|
-
[key: string]: unknown;
|
|
5695
|
-
}>;
|
|
5696
|
-
};
|
|
5537
|
+
export type FileImportControllerImportBeancountResponse = unknown;
|
|
5697
5538
|
|
|
5698
5539
|
export type ImporterConfigControllerGetConfigData = {
|
|
5699
5540
|
/**
|
|
@@ -5781,26 +5622,15 @@ export type PlatformControllerDeleteData = {
|
|
|
5781
5622
|
export type PlatformControllerDeleteResponse = void;
|
|
5782
5623
|
|
|
5783
5624
|
export type ProviderSyncControllerSyncData = {
|
|
5625
|
+
providerName: string;
|
|
5784
5626
|
/**
|
|
5785
|
-
*
|
|
5786
|
-
*/
|
|
5787
|
-
providerName:
|
|
5788
|
-
| 'plaid'
|
|
5789
|
-
| 'teller'
|
|
5790
|
-
| 'truelayer'
|
|
5791
|
-
| 'gocardless'
|
|
5792
|
-
| 'simplefin'
|
|
5793
|
-
| 'yodlee'
|
|
5794
|
-
| 'beancount-direct'
|
|
5795
|
-
| 'parsed-bill';
|
|
5796
|
-
/**
|
|
5797
|
-
* Region code
|
|
5627
|
+
* Region code for tenant context
|
|
5798
5628
|
*/
|
|
5799
|
-
region:
|
|
5629
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5800
5630
|
requestBody: ProviderSyncDto;
|
|
5801
5631
|
};
|
|
5802
5632
|
|
|
5803
|
-
export type ProviderSyncControllerSyncResponse =
|
|
5633
|
+
export type ProviderSyncControllerSyncResponse = unknown;
|
|
5804
5634
|
|
|
5805
5635
|
export type ProviderSyncControllerGetSupportedProvidersData = {
|
|
5806
5636
|
/**
|
|
@@ -5830,23 +5660,43 @@ export type TelemetryControllerReportTelemetryData = {
|
|
|
5830
5660
|
* Region code for tenant context
|
|
5831
5661
|
*/
|
|
5832
5662
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5833
|
-
requestBody: ParserTelemetryReportDto;
|
|
5663
|
+
requestBody: ParserTelemetryReportDto;
|
|
5664
|
+
};
|
|
5665
|
+
|
|
5666
|
+
export type TelemetryControllerReportTelemetryResponse = unknown;
|
|
5667
|
+
|
|
5668
|
+
export type TelemetryControllerReportCoverageMissData = {
|
|
5669
|
+
/**
|
|
5670
|
+
* Region code for tenant context
|
|
5671
|
+
*/
|
|
5672
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5673
|
+
requestBody: UncoveredFormatMissDto;
|
|
5674
|
+
};
|
|
5675
|
+
|
|
5676
|
+
export type TelemetryControllerReportCoverageMissResponse = unknown;
|
|
5677
|
+
|
|
5678
|
+
export type TelemetryControllerGetCoverageMetricsData = {
|
|
5679
|
+
/**
|
|
5680
|
+
* Region code for tenant context
|
|
5681
|
+
*/
|
|
5682
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5683
|
+
/**
|
|
5684
|
+
* Top-N uncovered formats (default 10)
|
|
5685
|
+
*/
|
|
5686
|
+
topN?: unknown;
|
|
5834
5687
|
};
|
|
5835
5688
|
|
|
5836
|
-
export type
|
|
5689
|
+
export type TelemetryControllerGetCoverageMetricsResponse = unknown;
|
|
5837
5690
|
|
|
5838
5691
|
export type NlpControllerProcessNaturalLanguageData = {
|
|
5839
5692
|
/**
|
|
5840
5693
|
* Region code for tenant context
|
|
5841
5694
|
*/
|
|
5842
5695
|
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5843
|
-
/**
|
|
5844
|
-
* Natural language transaction input with optional session ID
|
|
5845
|
-
*/
|
|
5846
5696
|
requestBody: ProcessNlpDto;
|
|
5847
5697
|
};
|
|
5848
5698
|
|
|
5849
|
-
export type NlpControllerProcessNaturalLanguageResponse =
|
|
5699
|
+
export type NlpControllerProcessNaturalLanguageResponse = unknown;
|
|
5850
5700
|
|
|
5851
5701
|
export type NlpControllerClearSessionData = {
|
|
5852
5702
|
/**
|
|
@@ -5888,6 +5738,10 @@ export type DashboardControllerGetNetWorthData = {
|
|
|
5888
5738
|
export type DashboardControllerGetNetWorthResponse = NetWorthResponseDto;
|
|
5889
5739
|
|
|
5890
5740
|
export type DashboardControllerGetAccountsData = {
|
|
5741
|
+
/**
|
|
5742
|
+
* Scope to a single account (only valid with groupBy=holdingAssetClass, ADR-0105 §6)
|
|
5743
|
+
*/
|
|
5744
|
+
accountId?: string;
|
|
5891
5745
|
/**
|
|
5892
5746
|
* Date for balance calculation (ISO 8601 format)
|
|
5893
5747
|
*/
|
|
@@ -5895,7 +5749,11 @@ export type DashboardControllerGetAccountsData = {
|
|
|
5895
5749
|
/**
|
|
5896
5750
|
* Grouping strategy
|
|
5897
5751
|
*/
|
|
5898
|
-
groupBy?:
|
|
5752
|
+
groupBy?:
|
|
5753
|
+
| 'platform'
|
|
5754
|
+
| 'assetClass'
|
|
5755
|
+
| 'holdingAssetClass'
|
|
5756
|
+
| 'holdingAssetClassByAccount';
|
|
5899
5757
|
/**
|
|
5900
5758
|
* Region code for tenant context
|
|
5901
5759
|
*/
|
|
@@ -5904,7 +5762,8 @@ export type DashboardControllerGetAccountsData = {
|
|
|
5904
5762
|
|
|
5905
5763
|
export type DashboardControllerGetAccountsResponse =
|
|
5906
5764
|
| AccountsResponseDto
|
|
5907
|
-
| AssetClassAccountsResponseDto
|
|
5765
|
+
| AssetClassAccountsResponseDto
|
|
5766
|
+
| HoldingAssetClassCrossAccountResponseDto;
|
|
5908
5767
|
|
|
5909
5768
|
export type DashboardControllerGetCashFlowData = {
|
|
5910
5769
|
/**
|
|
@@ -5919,6 +5778,124 @@ export type DashboardControllerGetCashFlowData = {
|
|
|
5919
5778
|
|
|
5920
5779
|
export type DashboardControllerGetCashFlowResponse = CashFlowResponseDto;
|
|
5921
5780
|
|
|
5781
|
+
export type HoldingPnlControllerGetHoldingPnlData = {
|
|
5782
|
+
/**
|
|
5783
|
+
* Scope to a single account
|
|
5784
|
+
*/
|
|
5785
|
+
accountId?: string;
|
|
5786
|
+
/**
|
|
5787
|
+
* As-of date (ISO 8601), defaults to today
|
|
5788
|
+
*/
|
|
5789
|
+
asOf?: string;
|
|
5790
|
+
/**
|
|
5791
|
+
* Realized-P&L lot-matching method (default average). Does not affect the average-cost unrealized basis.
|
|
5792
|
+
*/
|
|
5793
|
+
method?: 'FIFO' | 'average';
|
|
5794
|
+
/**
|
|
5795
|
+
* Region code for tenant context
|
|
5796
|
+
*/
|
|
5797
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5798
|
+
};
|
|
5799
|
+
|
|
5800
|
+
export type HoldingPnlControllerGetHoldingPnlResponse = HoldingPnlResponseDto;
|
|
5801
|
+
|
|
5802
|
+
export type PriceControllerCreateData = {
|
|
5803
|
+
/**
|
|
5804
|
+
* Region code for tenant context
|
|
5805
|
+
*/
|
|
5806
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5807
|
+
requestBody: CreateBeanPriceDto;
|
|
5808
|
+
};
|
|
5809
|
+
|
|
5810
|
+
export type PriceControllerCreateResponse = PriceResponseDto;
|
|
5811
|
+
|
|
5812
|
+
export type PriceControllerFindAllData = {
|
|
5813
|
+
/**
|
|
5814
|
+
* Filter by currency (e.g., BTC, AAPL, USD)
|
|
5815
|
+
*/
|
|
5816
|
+
currency?: string;
|
|
5817
|
+
/**
|
|
5818
|
+
* Filter prices from this date (ISO 8601 format)
|
|
5819
|
+
*/
|
|
5820
|
+
dateFrom?: string;
|
|
5821
|
+
/**
|
|
5822
|
+
* Filter prices to this date (ISO 8601 format)
|
|
5823
|
+
*/
|
|
5824
|
+
dateTo?: string;
|
|
5825
|
+
/**
|
|
5826
|
+
* Number of items per page (default: 20, max: 100)
|
|
5827
|
+
*/
|
|
5828
|
+
limit?: number;
|
|
5829
|
+
/**
|
|
5830
|
+
* Page number for pagination (default: 1)
|
|
5831
|
+
*/
|
|
5832
|
+
page?: number;
|
|
5833
|
+
/**
|
|
5834
|
+
* Filter by quote currency (pricing currency, e.g., USD, CNY)
|
|
5835
|
+
*/
|
|
5836
|
+
quoteCurrency?: string;
|
|
5837
|
+
/**
|
|
5838
|
+
* Region code for tenant context
|
|
5839
|
+
*/
|
|
5840
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5841
|
+
/**
|
|
5842
|
+
* Search term for currency or quoteCurrency (case-insensitive partial match)
|
|
5843
|
+
*/
|
|
5844
|
+
search?: string;
|
|
5845
|
+
};
|
|
5846
|
+
|
|
5847
|
+
export type PriceControllerFindAllResponse = PriceListResponseDto;
|
|
5848
|
+
|
|
5849
|
+
export type PriceControllerFindOneData = {
|
|
5850
|
+
/**
|
|
5851
|
+
* Price ID
|
|
5852
|
+
*/
|
|
5853
|
+
id: string;
|
|
5854
|
+
/**
|
|
5855
|
+
* Region code for tenant context
|
|
5856
|
+
*/
|
|
5857
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5858
|
+
};
|
|
5859
|
+
|
|
5860
|
+
export type PriceControllerFindOneResponse = PriceResponseDto;
|
|
5861
|
+
|
|
5862
|
+
export type PriceControllerUpdateData = {
|
|
5863
|
+
/**
|
|
5864
|
+
* Price ID
|
|
5865
|
+
*/
|
|
5866
|
+
id: string;
|
|
5867
|
+
/**
|
|
5868
|
+
* Region code for tenant context
|
|
5869
|
+
*/
|
|
5870
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5871
|
+
requestBody: UpdateBeanPriceDto;
|
|
5872
|
+
};
|
|
5873
|
+
|
|
5874
|
+
export type PriceControllerUpdateResponse = PriceResponseDto;
|
|
5875
|
+
|
|
5876
|
+
export type PriceControllerDeleteData = {
|
|
5877
|
+
/**
|
|
5878
|
+
* Price ID
|
|
5879
|
+
*/
|
|
5880
|
+
id: string;
|
|
5881
|
+
/**
|
|
5882
|
+
* Region code for tenant context
|
|
5883
|
+
*/
|
|
5884
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5885
|
+
};
|
|
5886
|
+
|
|
5887
|
+
export type PriceControllerDeleteResponse = void;
|
|
5888
|
+
|
|
5889
|
+
export type PriceControllerBulkCreateData = {
|
|
5890
|
+
/**
|
|
5891
|
+
* Region code for tenant context
|
|
5892
|
+
*/
|
|
5893
|
+
region: 'cn' | 'us' | 'de' | 'gb';
|
|
5894
|
+
requestBody: Array<string>;
|
|
5895
|
+
};
|
|
5896
|
+
|
|
5897
|
+
export type PriceControllerBulkCreateResponse = Array<PriceResponseDto>;
|
|
5898
|
+
|
|
5922
5899
|
export type ReportingControllerGetPortfolioTrendsData = {
|
|
5923
5900
|
/**
|
|
5924
5901
|
* Data granularity
|
|
@@ -6013,14 +5990,7 @@ export type $OpenApiTs = {
|
|
|
6013
5990
|
post: {
|
|
6014
5991
|
req: AccountControllerCreateData;
|
|
6015
5992
|
res: {
|
|
6016
|
-
|
|
6017
|
-
* Account created successfully
|
|
6018
|
-
*/
|
|
6019
|
-
201: AccountResponseDto;
|
|
6020
|
-
/**
|
|
6021
|
-
* Account already exists
|
|
6022
|
-
*/
|
|
6023
|
-
409: unknown;
|
|
5993
|
+
201: unknown;
|
|
6024
5994
|
};
|
|
6025
5995
|
};
|
|
6026
5996
|
get: {
|
|
@@ -6050,31 +6020,13 @@ export type $OpenApiTs = {
|
|
|
6050
6020
|
put: {
|
|
6051
6021
|
req: AccountControllerUpdateData;
|
|
6052
6022
|
res: {
|
|
6053
|
-
|
|
6054
|
-
* Account updated successfully
|
|
6055
|
-
*/
|
|
6056
|
-
200: AccountResponseDto;
|
|
6057
|
-
/**
|
|
6058
|
-
* Account not found
|
|
6059
|
-
*/
|
|
6060
|
-
404: unknown;
|
|
6023
|
+
200: unknown;
|
|
6061
6024
|
};
|
|
6062
6025
|
};
|
|
6063
6026
|
delete: {
|
|
6064
6027
|
req: AccountControllerDeleteData;
|
|
6065
6028
|
res: {
|
|
6066
|
-
|
|
6067
|
-
* Account deleted successfully
|
|
6068
|
-
*/
|
|
6069
|
-
204: void;
|
|
6070
|
-
/**
|
|
6071
|
-
* Account not found
|
|
6072
|
-
*/
|
|
6073
|
-
404: unknown;
|
|
6074
|
-
/**
|
|
6075
|
-
* Account has transactions and cannot be deleted
|
|
6076
|
-
*/
|
|
6077
|
-
409: unknown;
|
|
6029
|
+
200: unknown;
|
|
6078
6030
|
};
|
|
6079
6031
|
};
|
|
6080
6032
|
};
|
|
@@ -6082,18 +6034,7 @@ export type $OpenApiTs = {
|
|
|
6082
6034
|
post: {
|
|
6083
6035
|
req: AccountControllerCloseData;
|
|
6084
6036
|
res: {
|
|
6085
|
-
|
|
6086
|
-
* Account closed successfully
|
|
6087
|
-
*/
|
|
6088
|
-
200: AccountResponseDto;
|
|
6089
|
-
/**
|
|
6090
|
-
* Account is already closed
|
|
6091
|
-
*/
|
|
6092
|
-
400: unknown;
|
|
6093
|
-
/**
|
|
6094
|
-
* Account not found
|
|
6095
|
-
*/
|
|
6096
|
-
404: unknown;
|
|
6037
|
+
201: unknown;
|
|
6097
6038
|
};
|
|
6098
6039
|
};
|
|
6099
6040
|
};
|
|
@@ -6101,18 +6042,7 @@ export type $OpenApiTs = {
|
|
|
6101
6042
|
post: {
|
|
6102
6043
|
req: AccountControllerReopenData;
|
|
6103
6044
|
res: {
|
|
6104
|
-
|
|
6105
|
-
* Account reopened successfully
|
|
6106
|
-
*/
|
|
6107
|
-
200: AccountResponseDto;
|
|
6108
|
-
/**
|
|
6109
|
-
* Account is not closed
|
|
6110
|
-
*/
|
|
6111
|
-
400: unknown;
|
|
6112
|
-
/**
|
|
6113
|
-
* Account not found
|
|
6114
|
-
*/
|
|
6115
|
-
404: unknown;
|
|
6045
|
+
201: unknown;
|
|
6116
6046
|
};
|
|
6117
6047
|
};
|
|
6118
6048
|
};
|
|
@@ -7448,22 +7378,7 @@ export type $OpenApiTs = {
|
|
|
7448
7378
|
post: {
|
|
7449
7379
|
req: FileImportControllerImportBeancountData;
|
|
7450
7380
|
res: {
|
|
7451
|
-
|
|
7452
|
-
* Beancount file imported successfully
|
|
7453
|
-
*/
|
|
7454
|
-
200: {
|
|
7455
|
-
imported?: number;
|
|
7456
|
-
skipped?: number;
|
|
7457
|
-
failed?: number;
|
|
7458
|
-
accountsCreated?: number;
|
|
7459
|
-
errors?: Array<{
|
|
7460
|
-
[key: string]: unknown;
|
|
7461
|
-
}>;
|
|
7462
|
-
};
|
|
7463
|
-
/**
|
|
7464
|
-
* Bad request - invalid file or no file uploaded
|
|
7465
|
-
*/
|
|
7466
|
-
400: ApiProblemResponseDto;
|
|
7381
|
+
201: unknown;
|
|
7467
7382
|
};
|
|
7468
7383
|
};
|
|
7469
7384
|
};
|
|
@@ -7594,22 +7509,7 @@ export type $OpenApiTs = {
|
|
|
7594
7509
|
post: {
|
|
7595
7510
|
req: ProviderSyncControllerSyncData;
|
|
7596
7511
|
res: {
|
|
7597
|
-
|
|
7598
|
-
* Sync completed successfully
|
|
7599
|
-
*/
|
|
7600
|
-
200: ProviderSyncResponseDto;
|
|
7601
|
-
/**
|
|
7602
|
-
* Invalid request data
|
|
7603
|
-
*/
|
|
7604
|
-
400: unknown;
|
|
7605
|
-
/**
|
|
7606
|
-
* Missing or invalid authentication
|
|
7607
|
-
*/
|
|
7608
|
-
401: unknown;
|
|
7609
|
-
/**
|
|
7610
|
-
* Provider not supported
|
|
7611
|
-
*/
|
|
7612
|
-
404: unknown;
|
|
7512
|
+
201: unknown;
|
|
7613
7513
|
};
|
|
7614
7514
|
};
|
|
7615
7515
|
};
|
|
@@ -7658,18 +7558,14 @@ export type $OpenApiTs = {
|
|
|
7658
7558
|
};
|
|
7659
7559
|
};
|
|
7660
7560
|
};
|
|
7661
|
-
'/api/v1/{region}/bean/
|
|
7561
|
+
'/api/v1/{region}/bean/import/parser-coverage-miss': {
|
|
7662
7562
|
post: {
|
|
7663
|
-
req:
|
|
7563
|
+
req: TelemetryControllerReportCoverageMissData;
|
|
7664
7564
|
res: {
|
|
7665
7565
|
/**
|
|
7666
|
-
*
|
|
7667
|
-
*/
|
|
7668
|
-
200: NlpResponseDto;
|
|
7669
|
-
/**
|
|
7670
|
-
* Invalid input
|
|
7566
|
+
* Coverage miss report received
|
|
7671
7567
|
*/
|
|
7672
|
-
|
|
7568
|
+
200: unknown;
|
|
7673
7569
|
/**
|
|
7674
7570
|
* Unauthorized
|
|
7675
7571
|
*/
|
|
@@ -7677,6 +7573,25 @@ export type $OpenApiTs = {
|
|
|
7677
7573
|
};
|
|
7678
7574
|
};
|
|
7679
7575
|
};
|
|
7576
|
+
'/api/v1/{region}/bean/import/parser-coverage-metrics': {
|
|
7577
|
+
get: {
|
|
7578
|
+
req: TelemetryControllerGetCoverageMetricsData;
|
|
7579
|
+
res: {
|
|
7580
|
+
/**
|
|
7581
|
+
* Coverage metrics
|
|
7582
|
+
*/
|
|
7583
|
+
200: unknown;
|
|
7584
|
+
};
|
|
7585
|
+
};
|
|
7586
|
+
};
|
|
7587
|
+
'/api/v1/{region}/bean/nlp/process': {
|
|
7588
|
+
post: {
|
|
7589
|
+
req: NlpControllerProcessNaturalLanguageData;
|
|
7590
|
+
res: {
|
|
7591
|
+
201: unknown;
|
|
7592
|
+
};
|
|
7593
|
+
};
|
|
7594
|
+
};
|
|
7680
7595
|
'/api/v1/{region}/bean/nlp/session': {
|
|
7681
7596
|
delete: {
|
|
7682
7597
|
req: NlpControllerClearSessionData;
|
|
@@ -7727,7 +7642,10 @@ export type $OpenApiTs = {
|
|
|
7727
7642
|
/**
|
|
7728
7643
|
* Accounts retrieved successfully. Response type depends on groupBy parameter.
|
|
7729
7644
|
*/
|
|
7730
|
-
200:
|
|
7645
|
+
200:
|
|
7646
|
+
| AccountsResponseDto
|
|
7647
|
+
| AssetClassAccountsResponseDto
|
|
7648
|
+
| HoldingAssetClassCrossAccountResponseDto;
|
|
7731
7649
|
/**
|
|
7732
7650
|
* User not authenticated
|
|
7733
7651
|
*/
|
|
@@ -7754,6 +7672,109 @@ export type $OpenApiTs = {
|
|
|
7754
7672
|
};
|
|
7755
7673
|
};
|
|
7756
7674
|
};
|
|
7675
|
+
'/api/v1/{region}/investment/holdings/pnl': {
|
|
7676
|
+
get: {
|
|
7677
|
+
req: HoldingPnlControllerGetHoldingPnlData;
|
|
7678
|
+
res: {
|
|
7679
|
+
/**
|
|
7680
|
+
* Holding P&L retrieved successfully
|
|
7681
|
+
*/
|
|
7682
|
+
200: HoldingPnlResponseDto;
|
|
7683
|
+
/**
|
|
7684
|
+
* Invalid asOf format/value/future date, invalid accountId format, or unsupported method
|
|
7685
|
+
*/
|
|
7686
|
+
400: unknown;
|
|
7687
|
+
/**
|
|
7688
|
+
* User not authenticated
|
|
7689
|
+
*/
|
|
7690
|
+
401: unknown;
|
|
7691
|
+
};
|
|
7692
|
+
};
|
|
7693
|
+
};
|
|
7694
|
+
'/api/v1/{region}/bean/prices': {
|
|
7695
|
+
post: {
|
|
7696
|
+
req: PriceControllerCreateData;
|
|
7697
|
+
res: {
|
|
7698
|
+
/**
|
|
7699
|
+
* Price created successfully
|
|
7700
|
+
*/
|
|
7701
|
+
201: PriceResponseDto;
|
|
7702
|
+
/**
|
|
7703
|
+
* Currency or quoteCurrency commodity not found
|
|
7704
|
+
*/
|
|
7705
|
+
404: unknown;
|
|
7706
|
+
/**
|
|
7707
|
+
* Price already exists for this currency pair and date
|
|
7708
|
+
*/
|
|
7709
|
+
409: unknown;
|
|
7710
|
+
};
|
|
7711
|
+
};
|
|
7712
|
+
get: {
|
|
7713
|
+
req: PriceControllerFindAllData;
|
|
7714
|
+
res: {
|
|
7715
|
+
/**
|
|
7716
|
+
* Prices retrieved successfully
|
|
7717
|
+
*/
|
|
7718
|
+
200: PriceListResponseDto;
|
|
7719
|
+
};
|
|
7720
|
+
};
|
|
7721
|
+
};
|
|
7722
|
+
'/api/v1/{region}/bean/prices/{id}': {
|
|
7723
|
+
get: {
|
|
7724
|
+
req: PriceControllerFindOneData;
|
|
7725
|
+
res: {
|
|
7726
|
+
/**
|
|
7727
|
+
* Price retrieved successfully
|
|
7728
|
+
*/
|
|
7729
|
+
200: PriceResponseDto;
|
|
7730
|
+
/**
|
|
7731
|
+
* Price not found
|
|
7732
|
+
*/
|
|
7733
|
+
404: unknown;
|
|
7734
|
+
};
|
|
7735
|
+
};
|
|
7736
|
+
put: {
|
|
7737
|
+
req: PriceControllerUpdateData;
|
|
7738
|
+
res: {
|
|
7739
|
+
/**
|
|
7740
|
+
* Price updated successfully
|
|
7741
|
+
*/
|
|
7742
|
+
200: PriceResponseDto;
|
|
7743
|
+
/**
|
|
7744
|
+
* Price not found
|
|
7745
|
+
*/
|
|
7746
|
+
404: unknown;
|
|
7747
|
+
/**
|
|
7748
|
+
* Updated price conflicts with existing price
|
|
7749
|
+
*/
|
|
7750
|
+
409: unknown;
|
|
7751
|
+
};
|
|
7752
|
+
};
|
|
7753
|
+
delete: {
|
|
7754
|
+
req: PriceControllerDeleteData;
|
|
7755
|
+
res: {
|
|
7756
|
+
/**
|
|
7757
|
+
* Price deleted successfully
|
|
7758
|
+
*/
|
|
7759
|
+
204: void;
|
|
7760
|
+
/**
|
|
7761
|
+
* Price not found
|
|
7762
|
+
*/
|
|
7763
|
+
404: unknown;
|
|
7764
|
+
};
|
|
7765
|
+
};
|
|
7766
|
+
};
|
|
7767
|
+
'/api/v1/{region}/bean/prices/bulk': {
|
|
7768
|
+
post: {
|
|
7769
|
+
req: PriceControllerBulkCreateData;
|
|
7770
|
+
res: {
|
|
7771
|
+
/**
|
|
7772
|
+
* Prices created successfully
|
|
7773
|
+
*/
|
|
7774
|
+
201: Array<PriceResponseDto>;
|
|
7775
|
+
};
|
|
7776
|
+
};
|
|
7777
|
+
};
|
|
7757
7778
|
'/api/v1/{region}/reporting/portfolio/trends': {
|
|
7758
7779
|
get: {
|
|
7759
7780
|
req: ReportingControllerGetPortfolioTrendsData;
|