@firela/api-types 0.0.0-canary.2fbeefe9 → 0.0.0-canary.38660fd3

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.
@@ -11,7 +11,7 @@ export const $CreateAccountDto = {
11
11
  openDate: {
12
12
  format: 'date-time',
13
13
  type: 'string',
14
- description: 'Account open date',
14
+ description: 'Account open date (server defaults to today)',
15
15
  example: '2024-01-01'
16
16
  },
17
17
  currencies: {
@@ -51,9 +51,10 @@ export const $CreateAccountDto = {
51
51
  description: 'Icon identifier (overrides template)',
52
52
  example: 'bank-custom'
53
53
  },
54
- openMeta: {
54
+ openDirectiveMeta: {
55
55
  type: 'object',
56
- description: 'Additional metadata',
56
+ description:
57
+ 'Open directive metadata (NOT an opening-balance amount — use the opening-balance endpoint)',
57
58
  example: {
58
59
  branch: 'Downtown',
59
60
  accountNumber: '1234'
@@ -65,7 +66,7 @@ export const $CreateAccountDto = {
65
66
  example: 'c98e5d4a-2f71-4a5a-bb3c-92c9f231d5e2'
66
67
  }
67
68
  },
68
- required: ['path', 'openDate']
69
+ required: ['path']
69
70
  } as const;
70
71
 
71
72
  export const $AccountResponseDto = {
@@ -87,6 +88,47 @@ export const $AccountResponseDto = {
87
88
  enum: ['Assets', 'Liabilities', 'Income', 'Expenses', 'Equity'],
88
89
  example: 'Assets'
89
90
  },
91
+ assetSubClass: {
92
+ type: 'string',
93
+ description:
94
+ 'Account-level asset sub-class (product type, e.g. STOCK/DEPOSIT/CREDIT_CARD/PERSONAL_LOAN). Computed from the account path via the asset-classifier (ADR-0077). Null for non-asset accounts (Income/Expenses/Equity) or unmatched paths.',
95
+ enum: [
96
+ 'DEPOSIT',
97
+ 'CASH',
98
+ 'MONEY_MARKET_FUND',
99
+ 'STOCK',
100
+ 'ETF',
101
+ 'MUTUAL_FUND',
102
+ 'EQUITY_COMPENSATION',
103
+ 'GOVERNMENT_BOND',
104
+ 'CORPORATE_BOND',
105
+ 'BOND_FUND',
106
+ 'PRIMARY_RESIDENCE',
107
+ 'INVESTMENT_PROPERTY',
108
+ 'REIT',
109
+ 'GOLD',
110
+ 'SILVER',
111
+ 'PRECIOUS_METAL',
112
+ 'PRECIOUS_METAL_FUND',
113
+ 'COMMODITY',
114
+ 'COMMODITY_FUND',
115
+ 'CRYPTOCURRENCY',
116
+ 'RETIREMENT_ACCOUNT',
117
+ 'HEALTH_ACCOUNT',
118
+ 'EDUCATION_ACCOUNT',
119
+ 'INSURANCE',
120
+ 'PRIVATE_EQUITY',
121
+ 'HEDGE_FUND',
122
+ 'COLLECTIBLES',
123
+ 'MORTGAGE',
124
+ 'STUDENT_LOAN',
125
+ 'CREDIT_CARD',
126
+ 'PERSONAL_LOAN',
127
+ 'OTHER'
128
+ ],
129
+ nullable: true,
130
+ example: 'STOCK'
131
+ },
90
132
  status: {
91
133
  type: 'string',
92
134
  description: 'Account status',
@@ -145,9 +187,9 @@ export const $AccountResponseDto = {
145
187
  description: 'Icon identifier',
146
188
  example: 'bank-icbc'
147
189
  },
148
- openMeta: {
190
+ openDirectiveMeta: {
149
191
  type: 'object',
150
- description: 'Account metadata',
192
+ description: 'Open directive metadata (ADR-0115 Decision 9)',
151
193
  example: {
152
194
  branch: 'Downtown'
153
195
  }
@@ -233,9 +275,10 @@ export const $UpdateAccountDto = {
233
275
  description: 'Icon identifier',
234
276
  example: 'bank-custom'
235
277
  },
236
- openMeta: {
278
+ openDirectiveMeta: {
237
279
  type: 'object',
238
- description: 'Additional metadata (merged with existing)',
280
+ description:
281
+ 'Open directive metadata (merged with existing; NOT an opening-balance amount)',
239
282
  example: {
240
283
  branch: 'Uptown'
241
284
  }
@@ -282,6 +325,40 @@ export const $ReopenAccountDto = {
282
325
  }
283
326
  } as const;
284
327
 
328
+ export const $CreateOpeningBalanceDto = {
329
+ type: 'object',
330
+ properties: {
331
+ amount: {
332
+ type: 'number',
333
+ description: 'Opening balance amount (non-negative)',
334
+ example: 1000
335
+ },
336
+ currency: {
337
+ type: 'string',
338
+ description: 'Currency code',
339
+ example: 'CNY'
340
+ },
341
+ date: {
342
+ format: 'date-time',
343
+ type: 'string',
344
+ description: 'Opening-balance date (defaults to now)',
345
+ example: '2024-01-01'
346
+ }
347
+ },
348
+ required: ['amount', 'currency']
349
+ } as const;
350
+
351
+ export const $OpeningBalanceResultDto = {
352
+ type: 'object',
353
+ properties: {
354
+ transactionId: {
355
+ type: 'string',
356
+ description: 'Created opening-balance transaction id.'
357
+ }
358
+ },
359
+ required: ['transactionId']
360
+ } as const;
361
+
285
362
  export const $AccountStandardResponseDto = {
286
363
  type: 'object',
287
364
  properties: {
@@ -3715,152 +3792,599 @@ export const $ForecastResponseDto = {
3715
3792
  ]
3716
3793
  } as const;
3717
3794
 
3718
- export const $CreateTransactionRuleDto = {
3795
+ export const $CurrencyBalanceDto = {
3719
3796
  type: 'object',
3720
3797
  properties: {
3721
- name: {
3798
+ currency: {
3722
3799
  type: 'string',
3723
- minLength: 1,
3724
- maxLength: 100
3800
+ description: 'ISO 4217 currency code',
3801
+ example: 'CNY'
3725
3802
  },
3726
- description: {
3803
+ balance: {
3727
3804
  type: 'string',
3728
- maxLength: 500
3729
- },
3730
- narrationKeywords: {
3731
- items: {
3732
- type: 'array'
3733
- },
3734
- maxItems: 50,
3735
- type: 'array'
3736
- },
3737
- payeeKeywords: {
3738
- items: {
3739
- type: 'array'
3740
- },
3741
- maxItems: 50,
3742
- type: 'array'
3743
- },
3744
- categoryKeywords: {
3745
- items: {
3746
- type: 'array'
3747
- },
3748
- maxItems: 50,
3749
- type: 'array'
3750
- },
3751
- methodKeywords: {
3752
- items: {
3753
- type: 'array'
3754
- },
3755
- maxItems: 50,
3756
- description: 'Payment method keywords (e.g., HuaBei, YuEBao)',
3757
- type: 'array'
3758
- },
3759
- categoryAccount: {
3805
+ description: 'Balance amount',
3806
+ example: '500000.00'
3807
+ }
3808
+ },
3809
+ required: ['currency', 'balance']
3810
+ } as const;
3811
+
3812
+ export const $TimeSeriesPointDto = {
3813
+ type: 'object',
3814
+ properties: {
3815
+ date: {
3760
3816
  type: 'string',
3761
- maxLength: 200,
3762
- description:
3763
- 'Destination account for expenses/income (e.g., Expenses:Food:Coffee)'
3817
+ description: 'Date in YYYY-MM-DD format',
3818
+ example: '2024-06-15'
3764
3819
  },
3765
- matchLogic: {
3820
+ value: {
3766
3821
  type: 'string',
3767
- enum: ['OR', 'AND'],
3768
- default: 'OR'
3822
+ description: 'Value at this date (in base currency)',
3823
+ example: '500000.00'
3769
3824
  },
3770
- amountMin: {
3771
- type: 'number',
3772
- minimum: 0,
3773
- description: 'Minimum transaction amount (inclusive)'
3825
+ change: {
3826
+ type: 'object',
3827
+ description: 'Change from previous point',
3828
+ example: '5000.00'
3774
3829
  },
3775
- amountMax: {
3776
- type: 'number',
3777
- minimum: 0,
3778
- description: 'Maximum transaction amount (inclusive)'
3830
+ assets: {
3831
+ type: 'string',
3832
+ description: 'Total assets at this date (in base currency)',
3833
+ example: '494338.00'
3779
3834
  },
3780
- priority: {
3781
- type: 'number',
3782
- default: 50,
3783
- minimum: 0,
3784
- maximum: 1000
3835
+ liabilities: {
3836
+ type: 'string',
3837
+ description: 'Total liabilities at this date (in base currency)',
3838
+ example: '310098.00'
3785
3839
  },
3786
- additionalTags: {
3840
+ byCurrency: {
3841
+ description: 'Multi-currency breakdown for this point',
3842
+ type: 'array',
3787
3843
  items: {
3788
- type: 'array'
3789
- },
3790
- maxItems: 20,
3791
- type: 'array'
3792
- },
3793
- additionalMetadata: {
3794
- type: 'object'
3795
- },
3796
- upsertByPayee: {
3797
- type: 'boolean',
3798
- description:
3799
- 'If true, update existing rule with matching payeeKeywords[0] instead of creating new rule'
3844
+ $ref: '#/components/schemas/CurrencyBalanceDto'
3845
+ }
3800
3846
  }
3801
3847
  },
3802
- required: ['name', 'matchLogic', 'priority']
3848
+ required: ['date', 'value']
3803
3849
  } as const;
3804
3850
 
3805
- export const $AmountRangeDto = {
3851
+ export const $TrendSummaryDto = {
3806
3852
  type: 'object',
3807
3853
  properties: {
3808
- min: {
3809
- type: 'number',
3810
- description: 'Minimum amount'
3854
+ startValue: {
3855
+ type: 'string',
3856
+ description: 'Value at start of period',
3857
+ example: '450000.00'
3811
3858
  },
3812
- max: {
3813
- type: 'number',
3814
- description: 'Maximum amount'
3859
+ endValue: {
3860
+ type: 'string',
3861
+ description: 'Value at end of period',
3862
+ example: '500000.00'
3863
+ },
3864
+ totalChange: {
3865
+ type: 'string',
3866
+ description: 'Total change over period',
3867
+ example: '50000.00'
3868
+ },
3869
+ totalChangePercentage: {
3870
+ type: 'string',
3871
+ description: 'Total change percentage',
3872
+ example: '+11.11%'
3815
3873
  }
3816
- }
3874
+ },
3875
+ required: ['startValue', 'endValue', 'totalChange', 'totalChangePercentage']
3817
3876
  } as const;
3818
3877
 
3819
- export const $TransactionRuleResponseDto = {
3878
+ export const $MultiCurrencyPointDto = {
3820
3879
  type: 'object',
3821
3880
  properties: {
3822
- id: {
3823
- type: 'string',
3824
- description: 'Rule ID'
3825
- },
3826
- name: {
3827
- type: 'string',
3828
- description: 'Rule name'
3829
- },
3830
- description: {
3881
+ date: {
3831
3882
  type: 'string',
3832
- description: 'Rule description'
3883
+ description: 'Date in YYYY-MM-DD format',
3884
+ example: '2024-06-15'
3833
3885
  },
3834
- narrationKeywords: {
3835
- description: 'Keywords to match in transaction narration',
3886
+ byCurrency: {
3887
+ description: 'Balances by currency',
3836
3888
  type: 'array',
3837
3889
  items: {
3838
- type: 'string'
3890
+ $ref: '#/components/schemas/CurrencyBalanceDto'
3839
3891
  }
3840
- },
3841
- payeeKeywords: {
3842
- description: 'Keywords to match in payee name',
3892
+ }
3893
+ },
3894
+ required: ['date', 'byCurrency']
3895
+ } as const;
3896
+
3897
+ export const $PortfolioTrendsResponseDto = {
3898
+ type: 'object',
3899
+ properties: {
3900
+ series: {
3901
+ description: 'Time series data points',
3843
3902
  type: 'array',
3844
3903
  items: {
3845
- type: 'string'
3904
+ $ref: '#/components/schemas/TimeSeriesPointDto'
3846
3905
  }
3847
3906
  },
3848
- categoryKeywords: {
3849
- description: 'Keywords to match in category',
3907
+ summary: {
3908
+ description: 'Period summary',
3909
+ allOf: [
3910
+ {
3911
+ $ref: '#/components/schemas/TrendSummaryDto'
3912
+ }
3913
+ ]
3914
+ },
3915
+ period: {
3916
+ type: 'string',
3917
+ description: 'Period requested',
3918
+ example: '6m'
3919
+ },
3920
+ granularity: {
3921
+ type: 'string',
3922
+ description: 'Data granularity',
3923
+ example: 'month'
3924
+ },
3925
+ currency: {
3926
+ type: 'string',
3927
+ description: 'Base currency for converted values',
3928
+ example: 'CNY'
3929
+ },
3930
+ byCurrency: {
3931
+ description:
3932
+ 'Multi-currency time series (each point has currency breakdown)',
3850
3933
  type: 'array',
3851
3934
  items: {
3852
- type: 'string'
3935
+ $ref: '#/components/schemas/MultiCurrencyPointDto'
3853
3936
  }
3854
3937
  },
3855
- methodKeywords: {
3856
- description: 'Keywords to match in payment method',
3938
+ warnings: {
3939
+ description: 'Exchange rate warnings',
3857
3940
  type: 'array',
3858
3941
  items: {
3859
- type: 'string'
3942
+ $ref: '#/components/schemas/ExchangeRateWarningDto'
3860
3943
  }
3861
- },
3862
- categoryAccount: {
3863
- type: 'string',
3944
+ }
3945
+ },
3946
+ required: ['series', 'summary', 'period', 'granularity', 'currency']
3947
+ } as const;
3948
+
3949
+ export const $CashFlowPointDto = {
3950
+ type: 'object',
3951
+ properties: {
3952
+ month: {
3953
+ type: 'string',
3954
+ description: 'Month key (YYYY-MM)',
3955
+ example: '2024-03'
3956
+ },
3957
+ income: {
3958
+ type: 'string',
3959
+ description: 'Income in base currency (absolute, converted)',
3960
+ example: '10000.00'
3961
+ },
3962
+ expense: {
3963
+ type: 'string',
3964
+ description: 'Expense in base currency (absolute, converted)',
3965
+ example: '5000.00'
3966
+ },
3967
+ netSavings: {
3968
+ type: 'string',
3969
+ description: 'netSavings = income − expense (savings positive)',
3970
+ example: '5000.00'
3971
+ }
3972
+ },
3973
+ required: ['month', 'income', 'expense', 'netSavings']
3974
+ } as const;
3975
+
3976
+ export const $CashFlowTrendSummaryDto = {
3977
+ type: 'object',
3978
+ properties: {
3979
+ totalIncome: {
3980
+ type: 'string',
3981
+ description: 'Total income across the period',
3982
+ example: '60000.00'
3983
+ },
3984
+ totalExpense: {
3985
+ type: 'string',
3986
+ description: 'Total expense across the period',
3987
+ example: '30000.00'
3988
+ },
3989
+ totalNetSavings: {
3990
+ type: 'string',
3991
+ description: 'income − expense across the period',
3992
+ example: '30000.00'
3993
+ },
3994
+ averageMonthlyNetSavings: {
3995
+ type: 'string',
3996
+ description:
3997
+ 'totalNetSavings divided by the window length (N months, incl. zero-filled)',
3998
+ example: '5000.00'
3999
+ }
4000
+ },
4001
+ required: [
4002
+ 'totalIncome',
4003
+ 'totalExpense',
4004
+ 'totalNetSavings',
4005
+ 'averageMonthlyNetSavings'
4006
+ ]
4007
+ } as const;
4008
+
4009
+ export const $CashFlowTrendsResponseDto = {
4010
+ type: 'object',
4011
+ properties: {
4012
+ series: {
4013
+ description:
4014
+ 'Monthly cash-flow series (fixed N-month window, zero-filled)',
4015
+ type: 'array',
4016
+ items: {
4017
+ $ref: '#/components/schemas/CashFlowPointDto'
4018
+ }
4019
+ },
4020
+ summary: {
4021
+ description: 'Period totals',
4022
+ allOf: [
4023
+ {
4024
+ $ref: '#/components/schemas/CashFlowTrendSummaryDto'
4025
+ }
4026
+ ]
4027
+ },
4028
+ period: {
4029
+ type: 'string',
4030
+ description: 'Period requested',
4031
+ example: '6m'
4032
+ },
4033
+ granularity: {
4034
+ type: 'string',
4035
+ description: 'Data granularity (v1 returns month buckets)',
4036
+ example: 'month'
4037
+ },
4038
+ currency: {
4039
+ type: 'string',
4040
+ description: 'Base currency for converted values',
4041
+ example: 'CNY'
4042
+ },
4043
+ warnings: {
4044
+ description: 'Exchange rate warnings (e.g. missing rate for a currency)',
4045
+ type: 'array',
4046
+ items: {
4047
+ $ref: '#/components/schemas/ExchangeRateWarningDto'
4048
+ }
4049
+ }
4050
+ },
4051
+ required: ['series', 'summary', 'period', 'granularity', 'currency']
4052
+ } as const;
4053
+
4054
+ export const $GenerateSnapshotBody = {
4055
+ type: 'object',
4056
+ properties: {}
4057
+ } as const;
4058
+
4059
+ export const $GenerateSnapshotResponse = {
4060
+ type: 'object',
4061
+ properties: {}
4062
+ } as const;
4063
+
4064
+ export const $BackfillSnapshotsBody = {
4065
+ type: 'object',
4066
+ properties: {}
4067
+ } as const;
4068
+
4069
+ export const $BackfillSnapshotsResponse = {
4070
+ type: 'object',
4071
+ properties: {}
4072
+ } as const;
4073
+
4074
+ export const $DeleteOwnUserDto = {
4075
+ type: 'object',
4076
+ properties: {
4077
+ accessToken: {
4078
+ type: 'string',
4079
+ description: 'Access token for user verification',
4080
+ example: 'abc123xyz'
4081
+ }
4082
+ },
4083
+ required: ['accessToken']
4084
+ } as const;
4085
+
4086
+ export const $SignupDto = {
4087
+ type: 'object',
4088
+ properties: {
4089
+ turnstileToken: {
4090
+ type: 'string',
4091
+ description:
4092
+ 'Cloudflare Turnstile verification token (optional when Turnstile disabled)',
4093
+ example: '0.abc123def456...'
4094
+ }
4095
+ }
4096
+ } as const;
4097
+
4098
+ export const $SignupResponseDto = {
4099
+ type: 'object',
4100
+ properties: {
4101
+ authToken: {
4102
+ type: 'string',
4103
+ description: 'JWT auth token',
4104
+ example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
4105
+ },
4106
+ accessToken: {
4107
+ type: 'string',
4108
+ description: 'Auto-generated access token'
4109
+ },
4110
+ role: {
4111
+ type: 'string',
4112
+ description: 'Assigned user role',
4113
+ enum: ['USER', 'ADMIN', 'DEMO', 'INACTIVE', 'PAID', 'OPS']
4114
+ }
4115
+ },
4116
+ required: ['authToken', 'accessToken', 'role']
4117
+ } as const;
4118
+
4119
+ export const $UpdateUserSettingDto = {
4120
+ type: 'object',
4121
+ properties: {
4122
+ secId: {
4123
+ type: 'number',
4124
+ description: 'Security ID'
4125
+ },
4126
+ annualInterestRate: {
4127
+ type: 'number',
4128
+ description: 'Annual interest rate',
4129
+ example: 0.05
4130
+ },
4131
+ currency: {
4132
+ type: 'string',
4133
+ description: 'Currency code',
4134
+ example: 'USD'
4135
+ },
4136
+ baseCurrency: {
4137
+ type: 'string',
4138
+ description: 'Base currency code',
4139
+ example: 'USD'
4140
+ },
4141
+ benchmark: {
4142
+ type: 'string',
4143
+ description: 'Benchmark symbol',
4144
+ example: 'SPY'
4145
+ },
4146
+ colorScheme: {
4147
+ type: 'string',
4148
+ description: 'Color scheme',
4149
+ enum: ['DARK', 'LIGHT']
4150
+ },
4151
+ dateRange: {
4152
+ type: 'string',
4153
+ description: 'Date range filter',
4154
+ example: '1y'
4155
+ },
4156
+ emergencyFund: {
4157
+ type: 'number',
4158
+ description: 'Emergency fund amount',
4159
+ example: 10000
4160
+ },
4161
+ 'filters.accounts': {
4162
+ description: 'Account filter IDs',
4163
+ type: 'array',
4164
+ items: {
4165
+ type: 'string'
4166
+ }
4167
+ },
4168
+ 'filters.assetClasses': {
4169
+ description: 'Asset class filters',
4170
+ type: 'array',
4171
+ items: {
4172
+ type: 'string'
4173
+ }
4174
+ },
4175
+ 'filters.dataSource': {
4176
+ type: 'string',
4177
+ description: 'Data source filter'
4178
+ },
4179
+ 'filters.symbol': {
4180
+ type: 'string',
4181
+ description: 'Symbol filter'
4182
+ },
4183
+ 'filters.tags': {
4184
+ description: 'Tag filters',
4185
+ type: 'array',
4186
+ items: {
4187
+ type: 'string'
4188
+ }
4189
+ },
4190
+ isExperimentalFeatures: {
4191
+ type: 'boolean',
4192
+ description: 'Enable experimental features'
4193
+ },
4194
+ isRestrictedView: {
4195
+ type: 'boolean',
4196
+ description: 'Enable restricted view mode'
4197
+ },
4198
+ language: {
4199
+ type: 'string',
4200
+ description: 'Language code',
4201
+ example: 'en'
4202
+ },
4203
+ locale: {
4204
+ type: 'string',
4205
+ description: 'Locale code',
4206
+ example: 'en-US'
4207
+ },
4208
+ projectedTotalAmount: {
4209
+ type: 'number',
4210
+ description: 'Projected total amount',
4211
+ example: 1000000
4212
+ },
4213
+ retirementDate: {
4214
+ type: 'string',
4215
+ description: 'Retirement date in ISO 8601 format',
4216
+ example: '2050-01-01'
4217
+ },
4218
+ savingsRate: {
4219
+ type: 'number',
4220
+ description: 'Savings rate percentage',
4221
+ example: 0.2
4222
+ },
4223
+ viewMode: {
4224
+ type: 'string',
4225
+ description: 'View mode',
4226
+ enum: ['DEFAULT', 'ZEN']
4227
+ }
4228
+ }
4229
+ } as const;
4230
+
4231
+ export const $UpdatePropertyDto = {
4232
+ type: 'object',
4233
+ properties: {
4234
+ value: {
4235
+ type: 'string',
4236
+ description: 'Property value'
4237
+ }
4238
+ },
4239
+ required: ['value']
4240
+ } as const;
4241
+
4242
+ export const $CreateTransactionRuleDto = {
4243
+ type: 'object',
4244
+ properties: {
4245
+ name: {
4246
+ type: 'string',
4247
+ minLength: 1,
4248
+ maxLength: 100
4249
+ },
4250
+ description: {
4251
+ type: 'string',
4252
+ maxLength: 500
4253
+ },
4254
+ narrationKeywords: {
4255
+ items: {
4256
+ type: 'array'
4257
+ },
4258
+ maxItems: 50,
4259
+ type: 'array'
4260
+ },
4261
+ payeeKeywords: {
4262
+ items: {
4263
+ type: 'array'
4264
+ },
4265
+ maxItems: 50,
4266
+ type: 'array'
4267
+ },
4268
+ categoryKeywords: {
4269
+ items: {
4270
+ type: 'array'
4271
+ },
4272
+ maxItems: 50,
4273
+ type: 'array'
4274
+ },
4275
+ methodKeywords: {
4276
+ items: {
4277
+ type: 'array'
4278
+ },
4279
+ maxItems: 50,
4280
+ description: 'Payment method keywords (e.g., HuaBei, YuEBao)',
4281
+ type: 'array'
4282
+ },
4283
+ categoryAccount: {
4284
+ type: 'string',
4285
+ maxLength: 200,
4286
+ description:
4287
+ 'Destination account for expenses/income (e.g., Expenses:Food:Coffee)'
4288
+ },
4289
+ matchLogic: {
4290
+ type: 'string',
4291
+ enum: ['OR', 'AND'],
4292
+ default: 'OR'
4293
+ },
4294
+ amountMin: {
4295
+ type: 'number',
4296
+ minimum: 0,
4297
+ description: 'Minimum transaction amount (inclusive)'
4298
+ },
4299
+ amountMax: {
4300
+ type: 'number',
4301
+ minimum: 0,
4302
+ description: 'Maximum transaction amount (inclusive)'
4303
+ },
4304
+ priority: {
4305
+ type: 'number',
4306
+ default: 50,
4307
+ minimum: 0,
4308
+ maximum: 1000
4309
+ },
4310
+ additionalTags: {
4311
+ items: {
4312
+ type: 'array'
4313
+ },
4314
+ maxItems: 20,
4315
+ type: 'array'
4316
+ },
4317
+ additionalMetadata: {
4318
+ type: 'object'
4319
+ },
4320
+ upsertByPayee: {
4321
+ type: 'boolean',
4322
+ description:
4323
+ 'If true, update existing rule with matching payeeKeywords[0] instead of creating new rule'
4324
+ }
4325
+ },
4326
+ required: ['name', 'matchLogic', 'priority']
4327
+ } as const;
4328
+
4329
+ export const $AmountRangeDto = {
4330
+ type: 'object',
4331
+ properties: {
4332
+ min: {
4333
+ type: 'number',
4334
+ description: 'Minimum amount'
4335
+ },
4336
+ max: {
4337
+ type: 'number',
4338
+ description: 'Maximum amount'
4339
+ }
4340
+ }
4341
+ } as const;
4342
+
4343
+ export const $TransactionRuleResponseDto = {
4344
+ type: 'object',
4345
+ properties: {
4346
+ id: {
4347
+ type: 'string',
4348
+ description: 'Rule ID'
4349
+ },
4350
+ name: {
4351
+ type: 'string',
4352
+ description: 'Rule name'
4353
+ },
4354
+ description: {
4355
+ type: 'string',
4356
+ description: 'Rule description'
4357
+ },
4358
+ narrationKeywords: {
4359
+ description: 'Keywords to match in transaction narration',
4360
+ type: 'array',
4361
+ items: {
4362
+ type: 'string'
4363
+ }
4364
+ },
4365
+ payeeKeywords: {
4366
+ description: 'Keywords to match in payee name',
4367
+ type: 'array',
4368
+ items: {
4369
+ type: 'string'
4370
+ }
4371
+ },
4372
+ categoryKeywords: {
4373
+ description: 'Keywords to match in category',
4374
+ type: 'array',
4375
+ items: {
4376
+ type: 'string'
4377
+ }
4378
+ },
4379
+ methodKeywords: {
4380
+ description: 'Keywords to match in payment method',
4381
+ type: 'array',
4382
+ items: {
4383
+ type: 'string'
4384
+ }
4385
+ },
4386
+ categoryAccount: {
4387
+ type: 'string',
3864
4388
  description: 'Destination account for categorization'
3865
4389
  },
3866
4390
  matchLogic: {
@@ -4364,153 +4888,6 @@ export const $TestRuleResponseDto = {
4364
4888
  required: ['ruleId', 'matches', 'confidence', 'matchDetails']
4365
4889
  } as const;
4366
4890
 
4367
- export const $DeleteOwnUserDto = {
4368
- type: 'object',
4369
- properties: {
4370
- accessToken: {
4371
- type: 'string',
4372
- description: 'Access token for user verification',
4373
- example: 'abc123xyz'
4374
- }
4375
- },
4376
- required: ['accessToken']
4377
- } as const;
4378
-
4379
- export const $SignupDto = {
4380
- type: 'object',
4381
- properties: {
4382
- turnstileToken: {
4383
- type: 'string',
4384
- description:
4385
- 'Cloudflare Turnstile verification token (optional when Turnstile disabled)',
4386
- example: '0.abc123def456...'
4387
- }
4388
- }
4389
- } as const;
4390
-
4391
- export const $UpdateUserSettingDto = {
4392
- type: 'object',
4393
- properties: {
4394
- secId: {
4395
- type: 'number',
4396
- description: 'Security ID'
4397
- },
4398
- annualInterestRate: {
4399
- type: 'number',
4400
- description: 'Annual interest rate',
4401
- example: 0.05
4402
- },
4403
- currency: {
4404
- type: 'string',
4405
- description: 'Currency code',
4406
- example: 'USD'
4407
- },
4408
- baseCurrency: {
4409
- type: 'string',
4410
- description: 'Base currency code',
4411
- example: 'USD'
4412
- },
4413
- benchmark: {
4414
- type: 'string',
4415
- description: 'Benchmark symbol',
4416
- example: 'SPY'
4417
- },
4418
- colorScheme: {
4419
- type: 'string',
4420
- description: 'Color scheme',
4421
- enum: ['DARK', 'LIGHT']
4422
- },
4423
- dateRange: {
4424
- type: 'string',
4425
- description: 'Date range filter',
4426
- example: '1y'
4427
- },
4428
- emergencyFund: {
4429
- type: 'number',
4430
- description: 'Emergency fund amount',
4431
- example: 10000
4432
- },
4433
- 'filters.accounts': {
4434
- description: 'Account filter IDs',
4435
- type: 'array',
4436
- items: {
4437
- type: 'string'
4438
- }
4439
- },
4440
- 'filters.assetClasses': {
4441
- description: 'Asset class filters',
4442
- type: 'array',
4443
- items: {
4444
- type: 'string'
4445
- }
4446
- },
4447
- 'filters.dataSource': {
4448
- type: 'string',
4449
- description: 'Data source filter'
4450
- },
4451
- 'filters.symbol': {
4452
- type: 'string',
4453
- description: 'Symbol filter'
4454
- },
4455
- 'filters.tags': {
4456
- description: 'Tag filters',
4457
- type: 'array',
4458
- items: {
4459
- type: 'string'
4460
- }
4461
- },
4462
- isExperimentalFeatures: {
4463
- type: 'boolean',
4464
- description: 'Enable experimental features'
4465
- },
4466
- isRestrictedView: {
4467
- type: 'boolean',
4468
- description: 'Enable restricted view mode'
4469
- },
4470
- language: {
4471
- type: 'string',
4472
- description: 'Language code',
4473
- example: 'en'
4474
- },
4475
- locale: {
4476
- type: 'string',
4477
- description: 'Locale code',
4478
- example: 'en-US'
4479
- },
4480
- projectedTotalAmount: {
4481
- type: 'number',
4482
- description: 'Projected total amount',
4483
- example: 1000000
4484
- },
4485
- retirementDate: {
4486
- type: 'string',
4487
- description: 'Retirement date in ISO 8601 format',
4488
- example: '2050-01-01'
4489
- },
4490
- savingsRate: {
4491
- type: 'number',
4492
- description: 'Savings rate percentage',
4493
- example: 0.2
4494
- },
4495
- viewMode: {
4496
- type: 'string',
4497
- description: 'View mode',
4498
- enum: ['DEFAULT', 'ZEN']
4499
- }
4500
- }
4501
- } as const;
4502
-
4503
- export const $UpdatePropertyDto = {
4504
- type: 'object',
4505
- properties: {
4506
- value: {
4507
- type: 'string',
4508
- description: 'Property value'
4509
- }
4510
- },
4511
- required: ['value']
4512
- } as const;
4513
-
4514
4891
  export const $CreateBeanEventDto = {
4515
4892
  type: 'object',
4516
4893
  properties: {
@@ -5589,6 +5966,18 @@ export const $ProcessNlpDto = {
5589
5966
  currency: 'CNY',
5590
5967
  payee: 'Starbucks'
5591
5968
  }
5969
+ },
5970
+ selectedRuleId: {
5971
+ type: 'string',
5972
+ description:
5973
+ 'confirm_rule echo-back: rule id selected from the prior confirm_rule response (matchedRule.id or alternatives[i].ruleId). Applied directly when the session is confirming_rule — no NL re-parse.',
5974
+ example: 'rule_abc123'
5975
+ },
5976
+ selectedAccount: {
5977
+ type: 'string',
5978
+ description:
5979
+ 'confirm_account echo-back: account path selected from the prior confirm_account response (suggestedAccount, similarAccounts[i], or a typed path). Applied directly when the session is confirming_account — no NL re-parse.',
5980
+ example: 'Expenses:Food:Coffee'
5592
5981
  }
5593
5982
  },
5594
5983
  required: ['message']
@@ -5913,7 +6302,8 @@ export const $NlpAccountConfirmationDataDto = {
5913
6302
  },
5914
6303
  suggestedAccount: {
5915
6304
  type: 'string',
5916
- description: 'Suggested replacement account',
6305
+ description:
6306
+ 'Suggested replacement account (omitted when no clear candidate)',
5917
6307
  example: 'Expenses:Food:Drinks'
5918
6308
  },
5919
6309
  similarAccounts: {
@@ -5935,7 +6325,6 @@ export const $NlpAccountConfirmationDataDto = {
5935
6325
  },
5936
6326
  required: [
5937
6327
  'invalidAccount',
5938
- 'suggestedAccount',
5939
6328
  'similarAccounts',
5940
6329
  'errorMessage',
5941
6330
  'transactionContext'
@@ -6185,7 +6574,8 @@ export const $NlpResponseDto = {
6185
6574
  'confirm_rule',
6186
6575
  'confirm_account',
6187
6576
  'confirm_payee',
6188
- 'cancel'
6577
+ 'cancel',
6578
+ 'aborted'
6189
6579
  ]
6190
6580
  },
6191
6581
  intent: {
@@ -6367,6 +6757,148 @@ export const $NlpResponseDto = {
6367
6757
  required: ['status', 'action']
6368
6758
  } as const;
6369
6759
 
6760
+ export const $PlatformListItemDto = {
6761
+ type: 'object',
6762
+ properties: {
6763
+ id: {
6764
+ type: 'string',
6765
+ description: 'Global platform ID'
6766
+ },
6767
+ name: {
6768
+ type: 'string',
6769
+ description: 'Platform name'
6770
+ },
6771
+ url: {
6772
+ type: 'string',
6773
+ description: 'Platform URL'
6774
+ },
6775
+ type: {
6776
+ type: 'string',
6777
+ description: 'Platform type',
6778
+ enum: [
6779
+ 'BANK',
6780
+ 'BROKERAGE',
6781
+ 'CRYPTO_EXCHANGE',
6782
+ 'PAYMENT',
6783
+ 'INVESTMENT',
6784
+ 'INSURANCE',
6785
+ 'OTHER'
6786
+ ]
6787
+ },
6788
+ canonical: {
6789
+ type: 'string',
6790
+ description: 'Canonical identifier in ACCOUNT_RE format (e.g., "icbc")'
6791
+ },
6792
+ suggestedSegment: {
6793
+ type: 'string',
6794
+ description:
6795
+ 'Suggested path segment — canonical with first char uppercased (ACC_COMP_NAME_RE)'
6796
+ },
6797
+ logoUrl: {
6798
+ type: 'string',
6799
+ description: 'Logo URL',
6800
+ nullable: true
6801
+ },
6802
+ isBound: {
6803
+ type: 'boolean',
6804
+ description: 'Whether user has accounts using this platform'
6805
+ }
6806
+ },
6807
+ required: [
6808
+ 'id',
6809
+ 'name',
6810
+ 'url',
6811
+ 'type',
6812
+ 'canonical',
6813
+ 'suggestedSegment',
6814
+ 'logoUrl',
6815
+ 'isBound'
6816
+ ]
6817
+ } as const;
6818
+
6819
+ export const $PlatformMatchResultDto = {
6820
+ type: 'object',
6821
+ properties: {
6822
+ id: {
6823
+ type: 'string',
6824
+ description: 'Global platform ID'
6825
+ },
6826
+ name: {
6827
+ type: 'string',
6828
+ description: 'Platform name (e.g., "ICBC")'
6829
+ },
6830
+ canonical: {
6831
+ type: 'string',
6832
+ description: 'Canonical identifier in ACCOUNT_RE format (e.g., "icbc")'
6833
+ },
6834
+ type: {
6835
+ type: 'string',
6836
+ description: 'Platform type',
6837
+ enum: [
6838
+ 'BANK',
6839
+ 'BROKERAGE',
6840
+ 'CRYPTO_EXCHANGE',
6841
+ 'PAYMENT',
6842
+ 'INVESTMENT',
6843
+ 'INSURANCE',
6844
+ 'OTHER'
6845
+ ]
6846
+ },
6847
+ suggestedSegment: {
6848
+ type: 'string',
6849
+ description:
6850
+ 'Suggested path segment — canonical, already in ACCOUNT_RE format'
6851
+ },
6852
+ logoUrl: {
6853
+ type: 'string',
6854
+ description: 'Logo URL',
6855
+ nullable: true
6856
+ },
6857
+ matchType: {
6858
+ type: 'string',
6859
+ description: "How this row matched: 'exact' > 'prefix' > 'substring'",
6860
+ enum: ['exact', 'prefix', 'substring']
6861
+ }
6862
+ },
6863
+ required: [
6864
+ 'id',
6865
+ 'name',
6866
+ 'canonical',
6867
+ 'type',
6868
+ 'suggestedSegment',
6869
+ 'logoUrl',
6870
+ 'matchType'
6871
+ ]
6872
+ } as const;
6873
+
6874
+ export const $PlatformMatchResponseDto = {
6875
+ type: 'object',
6876
+ properties: {
6877
+ platforms: {
6878
+ description: 'Ranked matches, best tier first (at most 10 rows)',
6879
+ type: 'array',
6880
+ items: {
6881
+ $ref: '#/components/schemas/PlatformMatchResultDto'
6882
+ }
6883
+ },
6884
+ matchType: {
6885
+ type: 'string',
6886
+ description:
6887
+ "Overall match quality — top row's tier, or 'none' when no hits",
6888
+ enum: ['none', 'exact', 'prefix', 'substring']
6889
+ },
6890
+ total: {
6891
+ type: 'number',
6892
+ description: 'Total matches before LIMIT (truncation transparency)'
6893
+ },
6894
+ hasMore: {
6895
+ type: 'boolean',
6896
+ description: 'true when total > platforms.length (more matches exist)'
6897
+ }
6898
+ },
6899
+ required: ['platforms', 'matchType', 'total', 'hasMore']
6900
+ } as const;
6901
+
6370
6902
  export const $CreatePlatformDto = {
6371
6903
  type: 'object',
6372
6904
  properties: {
@@ -7509,344 +8041,220 @@ export const $HoldingPnlWarningDto = {
7509
8041
  'OVERSOLD_LOTS',
7510
8042
  'NO_PRICE',
7511
8043
  'MIXED_COST_CURRENCY'
7512
- ]
7513
- },
7514
- symbol: {
7515
- type: 'object',
7516
- nullable: true
7517
- },
7518
- accountId: {
7519
- type: 'object',
7520
- nullable: true
7521
- },
7522
- currency: {
7523
- type: 'object',
7524
- nullable: true
7525
- }
7526
- },
7527
- required: ['type']
7528
- } as const;
7529
-
7530
- export const $HoldingPnlResponseDto = {
7531
- type: 'object',
7532
- properties: {
7533
- asOfDate: {
7534
- type: 'string',
7535
- example: '2026-07-08'
7536
- },
7537
- baseCurrency: {
7538
- type: 'string',
7539
- example: 'CNY'
7540
- },
7541
- method: {
7542
- type: 'string',
7543
- description:
7544
- 'Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).',
7545
- enum: ['average', 'FIFO'],
7546
- example: 'average'
7547
- },
7548
- rows: {
7549
- type: 'array',
7550
- items: {
7551
- $ref: '#/components/schemas/HoldingPnlRowDto'
7552
- }
7553
- },
7554
- warnings: {
7555
- type: 'array',
7556
- items: {
7557
- $ref: '#/components/schemas/HoldingPnlWarningDto'
7558
- }
7559
- }
7560
- },
7561
- required: ['asOfDate', 'baseCurrency', 'method', 'rows', 'warnings']
7562
- } as const;
7563
-
7564
- export const $CurrencyBalanceDto = {
7565
- type: 'object',
7566
- properties: {
7567
- currency: {
7568
- type: 'string',
7569
- description: 'ISO 4217 currency code',
7570
- example: 'CNY'
7571
- },
7572
- balance: {
7573
- type: 'string',
7574
- description: 'Balance amount',
7575
- example: '500000.00'
7576
- }
7577
- },
7578
- required: ['currency', 'balance']
7579
- } as const;
7580
-
7581
- export const $TimeSeriesPointDto = {
7582
- type: 'object',
7583
- properties: {
7584
- date: {
7585
- type: 'string',
7586
- description: 'Date in YYYY-MM-DD format',
7587
- example: '2024-06-15'
7588
- },
7589
- value: {
7590
- type: 'string',
7591
- description: 'Value at this date (in base currency)',
7592
- example: '500000.00'
7593
- },
7594
- change: {
7595
- type: 'object',
7596
- description: 'Change from previous point',
7597
- example: '5000.00'
7598
- },
7599
- assets: {
7600
- type: 'string',
7601
- description: 'Total assets at this date (in base currency)',
7602
- example: '494338.00'
7603
- },
7604
- liabilities: {
7605
- type: 'string',
7606
- description: 'Total liabilities at this date (in base currency)',
7607
- example: '310098.00'
7608
- },
7609
- byCurrency: {
7610
- description: 'Multi-currency breakdown for this point',
7611
- type: 'array',
7612
- items: {
7613
- $ref: '#/components/schemas/CurrencyBalanceDto'
7614
- }
7615
- }
7616
- },
7617
- required: ['date', 'value']
7618
- } as const;
7619
-
7620
- export const $TrendSummaryDto = {
7621
- type: 'object',
7622
- properties: {
7623
- startValue: {
7624
- type: 'string',
7625
- description: 'Value at start of period',
7626
- example: '450000.00'
7627
- },
7628
- endValue: {
7629
- type: 'string',
7630
- description: 'Value at end of period',
7631
- example: '500000.00'
7632
- },
7633
- totalChange: {
7634
- type: 'string',
7635
- description: 'Total change over period',
7636
- example: '50000.00'
7637
- },
7638
- totalChangePercentage: {
7639
- type: 'string',
7640
- description: 'Total change percentage',
7641
- example: '+11.11%'
7642
- }
7643
- },
7644
- required: ['startValue', 'endValue', 'totalChange', 'totalChangePercentage']
7645
- } as const;
7646
-
7647
- export const $MultiCurrencyPointDto = {
7648
- type: 'object',
7649
- properties: {
7650
- date: {
7651
- type: 'string',
7652
- description: 'Date in YYYY-MM-DD format',
7653
- example: '2024-06-15'
8044
+ ]
7654
8045
  },
7655
- byCurrency: {
7656
- description: 'Balances by currency',
7657
- type: 'array',
7658
- items: {
7659
- $ref: '#/components/schemas/CurrencyBalanceDto'
7660
- }
8046
+ symbol: {
8047
+ type: 'object',
8048
+ nullable: true
8049
+ },
8050
+ accountId: {
8051
+ type: 'object',
8052
+ nullable: true
8053
+ },
8054
+ currency: {
8055
+ type: 'object',
8056
+ nullable: true
7661
8057
  }
7662
8058
  },
7663
- required: ['date', 'byCurrency']
8059
+ required: ['type']
7664
8060
  } as const;
7665
8061
 
7666
- export const $PortfolioTrendsResponseDto = {
8062
+ export const $HoldingPnlResponseDto = {
7667
8063
  type: 'object',
7668
8064
  properties: {
7669
- series: {
7670
- description: 'Time series data points',
7671
- type: 'array',
7672
- items: {
7673
- $ref: '#/components/schemas/TimeSeriesPointDto'
7674
- }
7675
- },
7676
- summary: {
7677
- description: 'Period summary',
7678
- allOf: [
7679
- {
7680
- $ref: '#/components/schemas/TrendSummaryDto'
7681
- }
7682
- ]
7683
- },
7684
- period: {
7685
- type: 'string',
7686
- description: 'Period requested',
7687
- example: '6m'
7688
- },
7689
- granularity: {
8065
+ asOfDate: {
7690
8066
  type: 'string',
7691
- description: 'Data granularity',
7692
- example: 'month'
8067
+ example: '2026-07-08'
7693
8068
  },
7694
- currency: {
8069
+ baseCurrency: {
7695
8070
  type: 'string',
7696
- description: 'Base currency for converted values',
7697
8071
  example: 'CNY'
7698
8072
  },
7699
- byCurrency: {
8073
+ method: {
8074
+ type: 'string',
7700
8075
  description:
7701
- 'Multi-currency time series (each point has currency breakdown)',
8076
+ 'Realized-P&L lot-matching method (FIFO or average). Unrealized cost basis remains average regardless of this value (#473).',
8077
+ enum: ['average', 'FIFO'],
8078
+ example: 'average'
8079
+ },
8080
+ rows: {
7702
8081
  type: 'array',
7703
8082
  items: {
7704
- $ref: '#/components/schemas/MultiCurrencyPointDto'
8083
+ $ref: '#/components/schemas/HoldingPnlRowDto'
7705
8084
  }
7706
8085
  },
7707
8086
  warnings: {
7708
- description: 'Exchange rate warnings',
7709
8087
  type: 'array',
7710
8088
  items: {
7711
- $ref: '#/components/schemas/ExchangeRateWarningDto'
8089
+ $ref: '#/components/schemas/HoldingPnlWarningDto'
7712
8090
  }
7713
8091
  }
7714
8092
  },
7715
- required: ['series', 'summary', 'period', 'granularity', 'currency']
8093
+ required: ['asOfDate', 'baseCurrency', 'method', 'rows', 'warnings']
7716
8094
  } as const;
7717
8095
 
7718
- export const $CashFlowPointDto = {
8096
+ export const $AnonymousLoginDto = {
7719
8097
  type: 'object',
7720
8098
  properties: {
7721
- month: {
7722
- type: 'string',
7723
- description: 'Month key (YYYY-MM)',
7724
- example: '2024-03'
7725
- },
7726
- income: {
7727
- type: 'string',
7728
- description: 'Income in base currency (absolute, converted)',
7729
- example: '10000.00'
7730
- },
7731
- expense: {
7732
- type: 'string',
7733
- description: 'Expense in base currency (absolute, converted)',
7734
- example: '5000.00'
7735
- },
7736
- netSavings: {
8099
+ accessToken: {
7737
8100
  type: 'string',
7738
- description: 'netSavings = income − expense (savings positive)',
7739
- example: '5000.00'
8101
+ description: 'Access token for anonymous login'
7740
8102
  }
7741
8103
  },
7742
- required: ['month', 'income', 'expense', 'netSavings']
8104
+ required: ['accessToken']
7743
8105
  } as const;
7744
8106
 
7745
- export const $CashFlowTrendSummaryDto = {
8107
+ export const $AnonymousLoginResponseDto = {
7746
8108
  type: 'object',
7747
8109
  properties: {
7748
- totalIncome: {
7749
- type: 'string',
7750
- description: 'Total income across the period',
7751
- example: '60000.00'
7752
- },
7753
- totalExpense: {
7754
- type: 'string',
7755
- description: 'Total expense across the period',
7756
- example: '30000.00'
7757
- },
7758
- totalNetSavings: {
7759
- type: 'string',
7760
- description: 'income − expense across the period',
7761
- example: '30000.00'
7762
- },
7763
- averageMonthlyNetSavings: {
8110
+ authToken: {
7764
8111
  type: 'string',
7765
- description:
7766
- 'totalNetSavings divided by the window length (N months, incl. zero-filled)',
7767
- example: '5000.00'
8112
+ description: 'JWT auth token',
8113
+ example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'
7768
8114
  }
7769
8115
  },
7770
- required: [
7771
- 'totalIncome',
7772
- 'totalExpense',
7773
- 'totalNetSavings',
7774
- 'averageMonthlyNetSavings'
7775
- ]
8116
+ required: ['authToken']
7776
8117
  } as const;
7777
8118
 
7778
- export const $CashFlowTrendsResponseDto = {
8119
+ export const $SymbolSearchResultDto = {
7779
8120
  type: 'object',
7780
8121
  properties: {
7781
- series: {
7782
- description:
7783
- 'Monthly cash-flow series (fixed N-month window, zero-filled)',
7784
- type: 'array',
7785
- items: {
7786
- $ref: '#/components/schemas/CashFlowPointDto'
7787
- }
8122
+ symbol: {
8123
+ type: 'string',
8124
+ example: 'AAPL'
7788
8125
  },
7789
- summary: {
7790
- description: 'Period totals',
7791
- allOf: [
7792
- {
7793
- $ref: '#/components/schemas/CashFlowTrendSummaryDto'
7794
- }
7795
- ]
8126
+ name: {
8127
+ type: 'object',
8128
+ example: 'Apple Inc.',
8129
+ nullable: true
7796
8130
  },
7797
- period: {
7798
- type: 'string',
7799
- description: 'Period requested',
7800
- example: '6m'
8131
+ exchange: {
8132
+ type: 'object',
8133
+ example: 'US',
8134
+ nullable: true
7801
8135
  },
7802
- granularity: {
7803
- type: 'string',
7804
- description: 'Data granularity (v1 returns month buckets)',
7805
- example: 'month'
8136
+ assetType: {
8137
+ type: 'object',
8138
+ description: 'OpenBB asset_type (e.g. stock, etf)',
8139
+ example: 'stock',
8140
+ nullable: true
7806
8141
  },
7807
- currency: {
7808
- type: 'string',
7809
- description: 'Base currency for converted values',
7810
- example: 'CNY'
8142
+ assetClass: {
8143
+ type: 'object',
8144
+ description: 'IGN asset class (region.types.ts ASSET_CLASSES)',
8145
+ example: 'EQUITY',
8146
+ nullable: true
7811
8147
  },
7812
- warnings: {
7813
- description: 'Exchange rate warnings (e.g. missing rate for a currency)',
7814
- type: 'array',
7815
- items: {
7816
- $ref: '#/components/schemas/ExchangeRateWarningDto'
7817
- }
8148
+ assetSubClass: {
8149
+ type: 'object',
8150
+ description: 'IGN asset sub-class (region.types.ts ASSET_SUB_CLASSES)',
8151
+ example: 'STOCK',
8152
+ nullable: true
8153
+ },
8154
+ currency: {
8155
+ type: 'object',
8156
+ description: 'Trading currency (extra_data or inferred from exchange)',
8157
+ example: 'USD',
8158
+ nullable: true
7818
8159
  }
7819
8160
  },
7820
- required: ['series', 'summary', 'period', 'granularity', 'currency']
7821
- } as const;
7822
-
7823
- export const $GenerateSnapshotBody = {
7824
- type: 'object',
7825
- properties: {}
7826
- } as const;
7827
-
7828
- export const $GenerateSnapshotResponse = {
7829
- type: 'object',
7830
- properties: {}
7831
- } as const;
7832
-
7833
- export const $BackfillSnapshotsBody = {
7834
- type: 'object',
7835
- properties: {}
7836
- } as const;
7837
-
7838
- export const $BackfillSnapshotsResponse = {
7839
- type: 'object',
7840
- properties: {}
8161
+ required: ['symbol']
7841
8162
  } as const;
7842
8163
 
7843
- export const $AnonymousLoginDto = {
8164
+ export const $SymbolQuoteDto = {
7844
8165
  type: 'object',
7845
8166
  properties: {
7846
- accessToken: {
8167
+ symbol: {
7847
8168
  type: 'string',
7848
- description: 'Access token for anonymous login'
8169
+ example: 'AAPL'
8170
+ },
8171
+ name: {
8172
+ type: 'object',
8173
+ example: 'Apple Inc.',
8174
+ nullable: true
8175
+ },
8176
+ exchange: {
8177
+ type: 'object',
8178
+ example: 'US',
8179
+ nullable: true
8180
+ },
8181
+ assetType: {
8182
+ type: 'object',
8183
+ description: 'OpenBB asset_type',
8184
+ example: 'stock',
8185
+ nullable: true
8186
+ },
8187
+ assetClass: {
8188
+ type: 'object',
8189
+ description: 'IGN asset class',
8190
+ example: 'EQUITY',
8191
+ nullable: true
8192
+ },
8193
+ assetSubClass: {
8194
+ type: 'object',
8195
+ description: 'IGN asset sub-class',
8196
+ example: 'STOCK',
8197
+ nullable: true
8198
+ },
8199
+ currency: {
8200
+ type: 'object',
8201
+ description: 'Trading currency (extra_data or inferred from exchange)',
8202
+ example: 'USD',
8203
+ nullable: true
8204
+ },
8205
+ price: {
8206
+ type: 'object',
8207
+ description: 'Latest price (Decimal string)',
8208
+ example: '189.84',
8209
+ nullable: true
8210
+ },
8211
+ priceDate: {
8212
+ type: 'object',
8213
+ description: 'Date the price was observed (ISO yyyy-MM-dd)',
8214
+ example: '2026-08-05',
8215
+ nullable: true
8216
+ },
8217
+ changePercent: {
8218
+ type: 'object',
8219
+ description:
8220
+ 'Change vs previous close, in percentage points (1.7 == 1.7%). openbb stores change_percent as a normalized decimal; this exposes percentage points for frontend convenience.',
8221
+ example: 1.7,
8222
+ nullable: true
8223
+ },
8224
+ prevClose: {
8225
+ type: 'object',
8226
+ description: 'Previous close (Decimal string)',
8227
+ nullable: true
8228
+ },
8229
+ open: {
8230
+ type: 'object',
8231
+ description: 'Day open (Decimal string)',
8232
+ nullable: true
8233
+ },
8234
+ high: {
8235
+ type: 'object',
8236
+ description: 'Day high (Decimal string)',
8237
+ nullable: true
8238
+ },
8239
+ low: {
8240
+ type: 'object',
8241
+ description: 'Day low (Decimal string)',
8242
+ nullable: true
8243
+ },
8244
+ volume: {
8245
+ type: 'object',
8246
+ description: 'Day volume (Decimal string)',
8247
+ nullable: true
8248
+ },
8249
+ yearHigh: {
8250
+ type: 'object',
8251
+ description: '52-week high (Decimal string)',
8252
+ nullable: true
8253
+ },
8254
+ yearLow: {
8255
+ type: 'object',
8256
+ description: '52-week low (Decimal string)',
8257
+ nullable: true
7849
8258
  }
7850
- },
7851
- required: ['accessToken']
8259
+ }
7852
8260
  } as const;