@firela/api-types 0.0.0-canary.610daafc → 0.0.0-canary.63a53b7d

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.
@@ -6,18 +6,12 @@ export const $CreateAccountDto = {
6
6
  path: {
7
7
  type: 'string',
8
8
  description: 'Account path (hierarchical, colon-separated)',
9
- example: 'Assets:CN:Bank:ICBC:Checking'
10
- },
11
- displayName: {
12
- type: 'string',
13
- description:
14
- 'Display name to distinguish accounts at the same path (default: "")',
15
- example: '工资卡'
9
+ example: 'Assets:CN:ICBC:Checking'
16
10
  },
17
11
  openDate: {
18
12
  format: 'date-time',
19
13
  type: 'string',
20
- description: 'Account open date',
14
+ description: 'Account open date (server defaults to today)',
21
15
  example: '2024-01-01'
22
16
  },
23
17
  currencies: {
@@ -45,26 +39,22 @@ export const $CreateAccountDto = {
45
39
  templatePath: {
46
40
  type: 'string',
47
41
  description: 'Reference to account-standards template path',
48
- example: 'Assets:CN:Bank:ICBC:Checking'
42
+ example: 'Assets:CN:Checking'
49
43
  },
50
44
  isCustom: {
51
45
  type: 'boolean',
52
46
  description: 'Whether this is a custom (user-created) account',
53
47
  default: false
54
48
  },
55
- i18nKey: {
56
- type: 'string',
57
- description: 'i18n key for display name (overrides template)',
58
- example: 'account.custom.mybank'
59
- },
60
49
  icon: {
61
50
  type: 'string',
62
51
  description: 'Icon identifier (overrides template)',
63
52
  example: 'bank-custom'
64
53
  },
65
- openMeta: {
54
+ openDirectiveMeta: {
66
55
  type: 'object',
67
- description: 'Additional metadata',
56
+ description:
57
+ 'Open directive metadata (NOT an opening-balance amount — use the opening-balance endpoint)',
68
58
  example: {
69
59
  branch: 'Downtown',
70
60
  accountNumber: '1234'
@@ -76,7 +66,7 @@ export const $CreateAccountDto = {
76
66
  example: 'c98e5d4a-2f71-4a5a-bb3c-92c9f231d5e2'
77
67
  }
78
68
  },
79
- required: ['path', 'openDate']
69
+ required: ['path']
80
70
  } as const;
81
71
 
82
72
  export const $AccountResponseDto = {
@@ -90,13 +80,7 @@ export const $AccountResponseDto = {
90
80
  path: {
91
81
  type: 'string',
92
82
  description: 'Account path (hierarchical, colon-separated)',
93
- example: 'Assets:CN:Bank:ICBC:Checking'
94
- },
95
- displayName: {
96
- type: 'string',
97
- description:
98
- 'Display name distinguishing multiple accounts at the same path',
99
- example: '工资卡'
83
+ example: 'Assets:CN:ICBC:Checking'
100
84
  },
101
85
  type: {
102
86
  type: 'string',
@@ -145,26 +129,26 @@ export const $AccountResponseDto = {
145
129
  templatePath: {
146
130
  type: 'string',
147
131
  description: 'Template path reference',
148
- example: 'Assets:CN:Bank:ICBC:Checking'
132
+ example: 'Assets:CN:Checking'
149
133
  },
150
134
  isCustom: {
151
135
  type: 'boolean',
152
136
  description: 'Whether this is a custom (user-created) account',
153
137
  example: false
154
138
  },
155
- i18nKey: {
139
+ displayName: {
156
140
  type: 'string',
157
- description: 'i18n key for display name',
158
- example: 'account.assets.cn.bank.icbc.checking'
141
+ description: 'Localized display name (ADR-0114, read-time projection)',
142
+ example: 'Checking'
159
143
  },
160
144
  icon: {
161
145
  type: 'string',
162
146
  description: 'Icon identifier',
163
147
  example: 'bank-icbc'
164
148
  },
165
- openMeta: {
149
+ openDirectiveMeta: {
166
150
  type: 'object',
167
- description: 'Account metadata',
151
+ description: 'Open directive metadata (ADR-0115 Decision 9)',
168
152
  example: {
169
153
  branch: 'Downtown'
170
154
  }
@@ -192,7 +176,6 @@ export const $AccountResponseDto = {
192
176
  required: [
193
177
  'id',
194
178
  'path',
195
- 'displayName',
196
179
  'type',
197
180
  'status',
198
181
  'openDate',
@@ -225,11 +208,6 @@ export const $AccountListResponseDto = {
225
208
  export const $UpdateAccountDto = {
226
209
  type: 'object',
227
210
  properties: {
228
- displayName: {
229
- type: 'string',
230
- description: 'Display name to distinguish accounts at the same path',
231
- example: '招行工资卡'
232
- },
233
211
  currencies: {
234
212
  description: 'Allowed currencies (null = no restriction)',
235
213
  example: ['CNY', 'USD'],
@@ -251,19 +229,15 @@ export const $UpdateAccountDto = {
251
229
  'NONE'
252
230
  ]
253
231
  },
254
- i18nKey: {
255
- type: 'string',
256
- description: 'i18n key for display name',
257
- example: 'account.custom.mybank'
258
- },
259
232
  icon: {
260
233
  type: 'string',
261
234
  description: 'Icon identifier',
262
235
  example: 'bank-custom'
263
236
  },
264
- openMeta: {
237
+ openDirectiveMeta: {
265
238
  type: 'object',
266
- description: 'Additional metadata (merged with existing)',
239
+ description:
240
+ 'Open directive metadata (merged with existing; NOT an opening-balance amount)',
267
241
  example: {
268
242
  branch: 'Uptown'
269
243
  }
@@ -310,13 +284,47 @@ export const $ReopenAccountDto = {
310
284
  }
311
285
  } as const;
312
286
 
287
+ export const $CreateOpeningBalanceDto = {
288
+ type: 'object',
289
+ properties: {
290
+ amount: {
291
+ type: 'number',
292
+ description: 'Opening balance amount (non-negative)',
293
+ example: 1000
294
+ },
295
+ currency: {
296
+ type: 'string',
297
+ description: 'Currency code',
298
+ example: 'CNY'
299
+ },
300
+ date: {
301
+ format: 'date-time',
302
+ type: 'string',
303
+ description: 'Opening-balance date (defaults to now)',
304
+ example: '2024-01-01'
305
+ }
306
+ },
307
+ required: ['amount', 'currency']
308
+ } as const;
309
+
310
+ export const $OpeningBalanceResultDto = {
311
+ type: 'object',
312
+ properties: {
313
+ transactionId: {
314
+ type: 'string',
315
+ description: 'Created opening-balance transaction id.'
316
+ }
317
+ },
318
+ required: ['transactionId']
319
+ } as const;
320
+
313
321
  export const $AccountStandardResponseDto = {
314
322
  type: 'object',
315
323
  properties: {
316
324
  path: {
317
325
  type: 'string',
318
326
  description: 'Account path (hierarchical, colon-separated)',
319
- example: 'Assets:CN:Bank:ICBC:Checking'
327
+ example: 'Assets:CN:Checking'
320
328
  },
321
329
  type: {
322
330
  type: 'string',
@@ -324,11 +332,6 @@ export const $AccountStandardResponseDto = {
324
332
  enum: ['Assets', 'Liabilities', 'Income', 'Expenses', 'Equity'],
325
333
  example: 'Assets'
326
334
  },
327
- i18nKey: {
328
- type: 'string',
329
- description: 'i18n key for localized display name',
330
- example: 'account.assets.cn.bank.icbc.checking'
331
- },
332
335
  name: {
333
336
  type: 'string',
334
337
  description: 'Short localized display name',
@@ -353,7 +356,7 @@ export const $AccountStandardResponseDto = {
353
356
  example: 'bank-icbc'
354
357
  }
355
358
  },
356
- required: ['path', 'type', 'i18nKey', 'description', 'tags', 'icon']
359
+ required: ['path', 'type', 'description', 'tags', 'icon']
357
360
  } as const;
358
361
 
359
362
  export const $AccountStandardListResponseDto = {
@@ -383,18 +386,13 @@ export const $AccountStandardListResponseDto = {
383
386
  export const $TemplateMetadataDto = {
384
387
  type: 'object',
385
388
  properties: {
386
- extendable: {
387
- type: 'boolean',
388
- description: 'Whether this path can be extended',
389
- example: true
390
- },
391
389
  rootType: {
392
390
  type: 'string',
393
391
  description: 'Root account type',
394
392
  example: 'Assets'
395
393
  }
396
394
  },
397
- required: ['extendable', 'rootType']
395
+ required: ['rootType']
398
396
  } as const;
399
397
 
400
398
  export const $TemplateMetadataResponseDto = {
@@ -533,7 +531,7 @@ export const $CreatePostingDto = {
533
531
  type: 'string',
534
532
  description:
535
533
  'Account name in Beancount format (must start with uppercase, colon-separated)',
536
- example: 'Assets:Bank:Checking'
534
+ example: 'Assets:Checking'
537
535
  },
538
536
  units: {
539
537
  type: 'string',
@@ -692,7 +690,7 @@ export const $PostingResponseDto = {
692
690
  account: {
693
691
  type: 'string',
694
692
  description: 'Account name',
695
- example: 'Assets:Bank:Checking'
693
+ example: 'Assets:Checking'
696
694
  },
697
695
  units: {
698
696
  type: 'string',
@@ -1058,7 +1056,7 @@ export const $PostingDetailDto = {
1058
1056
  account: {
1059
1057
  type: 'string',
1060
1058
  description: 'Fully-qualified Beancount account path',
1061
- example: 'Assets:Bank:Checking'
1059
+ example: 'Assets:Checking'
1062
1060
  },
1063
1061
  units: {
1064
1062
  type: 'string',
@@ -1450,7 +1448,7 @@ export const $BalanceResponseDto = {
1450
1448
  account: {
1451
1449
  type: 'string',
1452
1450
  description: 'Account name',
1453
- example: 'Assets:Bank:Checking'
1451
+ example: 'Assets:Checking'
1454
1452
  },
1455
1453
  balance: {
1456
1454
  type: 'string',
@@ -1477,7 +1475,7 @@ export const $MultiCurrencyBalanceResponseDto = {
1477
1475
  account: {
1478
1476
  type: 'string',
1479
1477
  description: 'Account name',
1480
- example: 'Assets:Bank:Checking'
1478
+ example: 'Assets:Checking'
1481
1479
  },
1482
1480
  balances: {
1483
1481
  type: 'object',
@@ -1533,7 +1531,7 @@ export const $TransactionSummaryDto = {
1533
1531
  accountName: {
1534
1532
  type: 'string',
1535
1533
  description: 'Source account name (first posting)',
1536
- example: 'Assets:Bank:Checking'
1534
+ example: 'Assets:Checking'
1537
1535
  },
1538
1536
  sourceType: {
1539
1537
  type: 'string',
@@ -2825,6 +2823,163 @@ export const $UpdateCommodityDto = {
2825
2823
  }
2826
2824
  } as const;
2827
2825
 
2826
+ export const $CreateBeanPriceDto = {
2827
+ type: 'object',
2828
+ properties: {
2829
+ currency: {
2830
+ type: 'string',
2831
+ description: 'Currency being priced (e.g., USD, AAPL, BTC)',
2832
+ example: 'USD'
2833
+ },
2834
+ quoteCurrency: {
2835
+ type: 'string',
2836
+ description: 'Quote currency (pricing currency, e.g., CNY, EUR)',
2837
+ example: 'CNY'
2838
+ },
2839
+ amount: {
2840
+ type: 'number',
2841
+ description:
2842
+ 'Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.',
2843
+ example: 175.5,
2844
+ minimum: 0
2845
+ },
2846
+ date: {
2847
+ type: 'string',
2848
+ description: 'Price date (ISO 8601 format)',
2849
+ example: '2024-11-05'
2850
+ },
2851
+ metadata: {
2852
+ type: 'object',
2853
+ description:
2854
+ 'Metadata (validated by Zod schema, max field lengths enforced)',
2855
+ example: {
2856
+ source: 'MANUAL',
2857
+ note: 'Bank valuation report',
2858
+ confidence: 0.95
2859
+ }
2860
+ }
2861
+ },
2862
+ required: ['currency', 'quoteCurrency', 'amount', 'date']
2863
+ } as const;
2864
+
2865
+ export const $PriceResponseDto = {
2866
+ type: 'object',
2867
+ properties: {
2868
+ id: {
2869
+ type: 'string',
2870
+ description: 'Unique identifier',
2871
+ example: 'uuid-123-456'
2872
+ },
2873
+ userId: {
2874
+ type: 'string',
2875
+ description: 'User ID (owner of the price)',
2876
+ example: 'user-123'
2877
+ },
2878
+ currency: {
2879
+ type: 'string',
2880
+ description: 'Currency being priced (e.g., USD, AAPL, BTC)',
2881
+ example: 'BTC'
2882
+ },
2883
+ quoteCurrency: {
2884
+ type: 'string',
2885
+ description: 'Quote currency (pricing currency, e.g., USD, CNY)',
2886
+ example: 'USD'
2887
+ },
2888
+ amount: {
2889
+ type: 'number',
2890
+ description:
2891
+ 'Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.',
2892
+ example: 50000
2893
+ },
2894
+ date: {
2895
+ type: 'string',
2896
+ description:
2897
+ 'Price date (ISO 8601 format). Represents the date this price was valid.',
2898
+ example: '2024-01-01',
2899
+ format: 'date'
2900
+ },
2901
+ meta: {
2902
+ type: 'object',
2903
+ description:
2904
+ 'Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.',
2905
+ example: {
2906
+ source: 'MANUAL',
2907
+ note: 'User-defined price',
2908
+ confidence: 1
2909
+ }
2910
+ },
2911
+ createdAt: {
2912
+ format: 'date-time',
2913
+ type: 'string',
2914
+ description: 'Creation timestamp',
2915
+ example: '2024-11-03T10:00:00Z'
2916
+ },
2917
+ updatedAt: {
2918
+ format: 'date-time',
2919
+ type: 'string',
2920
+ description: 'Last update timestamp',
2921
+ example: '2024-11-03T10:00:00Z'
2922
+ }
2923
+ },
2924
+ required: [
2925
+ 'id',
2926
+ 'userId',
2927
+ 'currency',
2928
+ 'quoteCurrency',
2929
+ 'amount',
2930
+ 'date',
2931
+ 'meta',
2932
+ 'createdAt',
2933
+ 'updatedAt'
2934
+ ]
2935
+ } as const;
2936
+
2937
+ export const $PriceListResponseDto = {
2938
+ type: 'object',
2939
+ properties: {
2940
+ items: {
2941
+ description: 'List of prices',
2942
+ type: 'array',
2943
+ items: {
2944
+ $ref: '#/components/schemas/PriceResponseDto'
2945
+ }
2946
+ },
2947
+ total: {
2948
+ type: 'number',
2949
+ description: 'Total number of prices',
2950
+ example: 42
2951
+ }
2952
+ },
2953
+ required: ['items', 'total']
2954
+ } as const;
2955
+
2956
+ export const $UpdateBeanPriceDto = {
2957
+ type: 'object',
2958
+ properties: {
2959
+ currency: {
2960
+ type: 'string',
2961
+ description: 'Currency being priced'
2962
+ },
2963
+ quoteCurrency: {
2964
+ type: 'string',
2965
+ description: 'Quote currency (pricing currency)'
2966
+ },
2967
+ amount: {
2968
+ type: 'number',
2969
+ description: 'Price amount (MUST be >= 0 per Beancount spec)',
2970
+ minimum: 0
2971
+ },
2972
+ date: {
2973
+ type: 'string',
2974
+ description: 'Price date (ISO 8601 format)'
2975
+ },
2976
+ metadata: {
2977
+ type: 'object',
2978
+ description: 'Metadata'
2979
+ }
2980
+ }
2981
+ } as const;
2982
+
2828
2983
  export const $CreateRecurringRuleDto = {
2829
2984
  type: 'object',
2830
2985
  properties: {
@@ -4530,40 +4685,291 @@ export const $UpdateBeanEventDto = {
4530
4685
  }
4531
4686
  } as const;
4532
4687
 
4533
- export const $FileImportDto = {
4688
+ export const $OnboardingAccountDto = {
4534
4689
  type: 'object',
4535
4690
  properties: {
4536
- file: {
4691
+ path: {
4537
4692
  type: 'string',
4538
- format: 'binary',
4539
- description: 'Bill file to import (CSV, PDF, OFX, etc.)',
4540
- example: 'alipay.csv'
4693
+ description:
4694
+ 'Account path (Assets/Liabilities only; format validated by the account service)',
4695
+ example: 'Assets:Checking'
4696
+ },
4697
+ currency: {
4698
+ type: 'string',
4699
+ description: 'ISO 4217 currency code (3 letters)',
4700
+ example: 'USD'
4701
+ },
4702
+ openingBalance: {
4703
+ type: 'string',
4704
+ description:
4705
+ 'Opening balance as a non-negative Decimal string (e.g. "1000.00")',
4706
+ example: '1000.00'
4707
+ },
4708
+ platformId: {
4709
+ type: 'string',
4710
+ description:
4711
+ 'Platform ID to bind the account to (references Platform.id); omit for unbound',
4712
+ example: 'c98e5d4a-2f71-4a5a-bb3c-92c9f231d5e2'
4541
4713
  }
4542
4714
  },
4543
- required: ['file']
4715
+ required: ['path', 'currency']
4544
4716
  } as const;
4545
4717
 
4546
- export const $ImportErrorDto = {
4718
+ export const $OnboardingDto = {
4547
4719
  type: 'object',
4548
4720
  properties: {
4549
- index: {
4550
- type: 'number',
4551
- description: 'Index of failed transaction in the file',
4552
- example: 5
4721
+ accounts: {
4722
+ description: 'Asset/Liability accounts to register with opening balances',
4723
+ type: 'array',
4724
+ items: {
4725
+ $ref: '#/components/schemas/OnboardingAccountDto'
4726
+ }
4553
4727
  },
4554
- error: {
4555
- type: 'string',
4556
- description: 'Error message',
4557
- example: 'Transaction does not balance: -100 USD != 0'
4728
+ skipAssetRegistration: {
4729
+ type: 'boolean',
4730
+ description:
4731
+ 'Skip asset registration; only bootstrap the core account set',
4732
+ default: false
4558
4733
  }
4559
- },
4560
- required: ['index', 'error']
4734
+ }
4561
4735
  } as const;
4562
4736
 
4563
- export const $ReviewItemPreviewDto = {
4737
+ export const $ActualBalanceDto = {
4564
4738
  type: 'object',
4565
4739
  properties: {
4566
- index: {
4740
+ amount: {
4741
+ type: 'string',
4742
+ description:
4743
+ 'Actual balance amount as a decimal string (preserves precision for tolerance inference).',
4744
+ example: '1234.56'
4745
+ },
4746
+ ccy: {
4747
+ type: 'string',
4748
+ description: 'Currency code (ISO 4217 or commodity ticker).',
4749
+ example: 'CNY'
4750
+ }
4751
+ },
4752
+ required: ['amount', 'ccy']
4753
+ } as const;
4754
+
4755
+ export const $ComputeReconciliationDto = {
4756
+ type: 'object',
4757
+ properties: {
4758
+ accountId: {
4759
+ type: 'string',
4760
+ description: 'BeanAccount id to reconcile.'
4761
+ },
4762
+ asOfDate: {
4763
+ type: 'string',
4764
+ description: 'Assertion date (ISO 8601, e.g. "2026-07-24").',
4765
+ example: '2026-07-24'
4766
+ },
4767
+ actualBalance: {
4768
+ description: 'Actual balance from the external statement.',
4769
+ allOf: [
4770
+ {
4771
+ $ref: '#/components/schemas/ActualBalanceDto'
4772
+ }
4773
+ ]
4774
+ }
4775
+ },
4776
+ required: ['accountId', 'asOfDate', 'actualBalance']
4777
+ } as const;
4778
+
4779
+ export const $ReconciliationComputeResultDto = {
4780
+ type: 'object',
4781
+ properties: {
4782
+ accountId: {
4783
+ type: 'string'
4784
+ },
4785
+ asOfDate: {
4786
+ type: 'string'
4787
+ },
4788
+ bookBalance: {
4789
+ type: 'string',
4790
+ description: 'System-computed book balance (decimal string).'
4791
+ },
4792
+ actualBalance: {
4793
+ type: 'string',
4794
+ description: 'User-entered actual balance (decimal string).'
4795
+ },
4796
+ currency: {
4797
+ type: 'string'
4798
+ },
4799
+ diff: {
4800
+ type: 'string',
4801
+ description: 'Diff = book − actual (decimal string).'
4802
+ },
4803
+ tolerance: {
4804
+ type: 'string',
4805
+ description: 'Applied tolerance (decimal string).'
4806
+ },
4807
+ withinTolerance: {
4808
+ type: 'boolean',
4809
+ description: 'true when |diff| ≤ tolerance.'
4810
+ },
4811
+ suggestedAction: {
4812
+ type: 'string',
4813
+ enum: ['assert', 'pad'],
4814
+ description:
4815
+ 'Suggested next action: assert when within tolerance, pad otherwise.'
4816
+ }
4817
+ },
4818
+ required: [
4819
+ 'accountId',
4820
+ 'asOfDate',
4821
+ 'bookBalance',
4822
+ 'actualBalance',
4823
+ 'currency',
4824
+ 'diff',
4825
+ 'tolerance',
4826
+ 'withinTolerance',
4827
+ 'suggestedAction'
4828
+ ]
4829
+ } as const;
4830
+
4831
+ export const $AssertReconciliationDto = {
4832
+ type: 'object',
4833
+ properties: {
4834
+ accountId: {
4835
+ type: 'string',
4836
+ description: 'BeanAccount id to reconcile.'
4837
+ },
4838
+ asOfDate: {
4839
+ type: 'string',
4840
+ description: 'Assertion date (ISO 8601, e.g. "2026-07-24").',
4841
+ example: '2026-07-24'
4842
+ },
4843
+ actualBalance: {
4844
+ description: 'Actual balance from the external statement.',
4845
+ allOf: [
4846
+ {
4847
+ $ref: '#/components/schemas/ActualBalanceDto'
4848
+ }
4849
+ ]
4850
+ },
4851
+ tolerance: {
4852
+ type: 'string',
4853
+ description:
4854
+ 'Optional explicit tolerance override. Omit to infer from amount precision (Beancount default).',
4855
+ example: '0.01'
4856
+ }
4857
+ },
4858
+ required: ['accountId', 'asOfDate', 'actualBalance']
4859
+ } as const;
4860
+
4861
+ export const $ReconciliationRecordDto = {
4862
+ type: 'object',
4863
+ properties: {
4864
+ id: {
4865
+ type: 'string'
4866
+ },
4867
+ accountId: {
4868
+ type: 'string'
4869
+ },
4870
+ date: {
4871
+ type: 'string'
4872
+ },
4873
+ amount: {
4874
+ type: 'string',
4875
+ description: 'Asserted (actual) amount.'
4876
+ },
4877
+ currency: {
4878
+ type: 'string'
4879
+ },
4880
+ tolerance: {
4881
+ type: 'string'
4882
+ },
4883
+ diffAmount: {
4884
+ type: 'string',
4885
+ description: 'book − actual.'
4886
+ },
4887
+ diffCurrency: {
4888
+ type: 'string'
4889
+ },
4890
+ createdAt: {
4891
+ type: 'string'
4892
+ }
4893
+ },
4894
+ required: ['id', 'accountId', 'date', 'amount', 'currency', 'createdAt']
4895
+ } as const;
4896
+
4897
+ export const $PadReconciliationDto = {
4898
+ type: 'object',
4899
+ properties: {
4900
+ accountId: {
4901
+ type: 'string',
4902
+ description: 'BeanAccount id to reconcile.'
4903
+ },
4904
+ asOfDate: {
4905
+ type: 'string',
4906
+ description: 'Assertion date (ISO 8601, e.g. "2026-07-24").',
4907
+ example: '2026-07-24'
4908
+ },
4909
+ actualBalance: {
4910
+ description: 'Actual balance from the external statement.',
4911
+ allOf: [
4912
+ {
4913
+ $ref: '#/components/schemas/ActualBalanceDto'
4914
+ }
4915
+ ]
4916
+ },
4917
+ sourceAccount: {
4918
+ type: 'string',
4919
+ description:
4920
+ 'Pad source account. Defaults to Equity:Opening-Balances (official Beancount convention).',
4921
+ example: 'Equity:Opening-Balances',
4922
+ default: 'Equity:Opening-Balances'
4923
+ }
4924
+ },
4925
+ required: ['accountId', 'asOfDate', 'actualBalance']
4926
+ } as const;
4927
+
4928
+ export const $PadResultDto = {
4929
+ type: 'object',
4930
+ properties: {
4931
+ transactionId: {
4932
+ type: 'string',
4933
+ description: 'Created pad adjusting transaction id.'
4934
+ }
4935
+ },
4936
+ required: ['transactionId']
4937
+ } as const;
4938
+
4939
+ export const $FileImportDto = {
4940
+ type: 'object',
4941
+ properties: {
4942
+ file: {
4943
+ type: 'string',
4944
+ format: 'binary',
4945
+ description: 'Bill file to import (CSV, PDF, OFX, etc.)',
4946
+ example: 'alipay.csv'
4947
+ }
4948
+ },
4949
+ required: ['file']
4950
+ } as const;
4951
+
4952
+ export const $ImportErrorDto = {
4953
+ type: 'object',
4954
+ properties: {
4955
+ index: {
4956
+ type: 'number',
4957
+ description: 'Index of failed transaction in the file',
4958
+ example: 5
4959
+ },
4960
+ error: {
4961
+ type: 'string',
4962
+ description: 'Error message',
4963
+ example: 'Transaction does not balance: -100 USD != 0'
4964
+ }
4965
+ },
4966
+ required: ['index', 'error']
4967
+ } as const;
4968
+
4969
+ export const $ReviewItemPreviewDto = {
4970
+ type: 'object',
4971
+ properties: {
4972
+ index: {
4567
4973
  type: 'number',
4568
4974
  description: 'Index in the import batch (for tracking)',
4569
4975
  example: 0
@@ -4696,7 +5102,7 @@ export const $IdentifyResultDto = {
4696
5102
  account: {
4697
5103
  type: 'string',
4698
5104
  description: 'Default account used by this importer',
4699
- example: 'Assets:Alipay:Balance'
5105
+ example: 'Assets:CN:Alipay:Balance'
4700
5106
  },
4701
5107
  message: {
4702
5108
  type: 'string',
@@ -4713,7 +5119,7 @@ export const $MapperDefaultsDto = {
4713
5119
  sourceAccount: {
4714
5120
  type: 'string',
4715
5121
  description: 'Source account for transactions (Beancount format)',
4716
- example: 'Assets:Alipay:Balance'
5122
+ example: 'Assets:CN:Alipay:Balance'
4717
5123
  },
4718
5124
  currency: {
4719
5125
  type: 'string',
@@ -4750,7 +5156,7 @@ export const $MapperDefaultsDto = {
4750
5156
  description:
4751
5157
  'Payment method to source account mapping. Maps payment method keywords to Beancount account paths. Used by Alipay/WeChat importers to determine sourceAccount based on payment method (e.g., HuaBei, CreditCard).',
4752
5158
  example: {
4753
- HuaBei: 'Liabilities:Alipay:Huabei',
5159
+ HuaBei: 'Liabilities:CN:CreditLine',
4754
5160
  CreditCard: 'Liabilities:CreditCard'
4755
5161
  }
4756
5162
  }
@@ -4882,7 +5288,7 @@ export const $UpdateMapperDefaultsDto = {
4882
5288
  sourceAccount: {
4883
5289
  type: 'string',
4884
5290
  description: 'Source account for transactions (Beancount format)',
4885
- example: 'Assets:Alipay:Balance',
5291
+ example: 'Assets:CN:Alipay:Balance',
4886
5292
  pattern: '^[A-Z][a-zA-Z0-9-]*:[a-zA-Z0-9-:]+$'
4887
5293
  },
4888
5294
  currency: {
@@ -4910,7 +5316,7 @@ export const $UpdateMapperDefaultsDto = {
4910
5316
  description:
4911
5317
  'Payment method to source account mapping. Maps payment method keywords to Beancount account paths. Used by Alipay/WeChat importers to determine sourceAccount based on payment method (e.g., HuaBei, CreditCard).',
4912
5318
  example: {
4913
- HuaBei: 'Liabilities:Alipay:Huabei',
5319
+ HuaBei: 'Liabilities:CN:CreditLine',
4914
5320
  CreditCard: 'Liabilities:CreditCard'
4915
5321
  }
4916
5322
  }
@@ -4945,119 +5351,13 @@ export const $UpdateImporterConfigDto = {
4945
5351
  }
4946
5352
  } as const;
4947
5353
 
4948
- export const $CreatePlatformDto = {
4949
- type: 'object',
4950
- properties: {
4951
- name: {
4952
- type: 'string',
4953
- description: 'Platform name',
4954
- example: 'Binance'
4955
- },
4956
- canonical: {
4957
- type: 'string',
4958
- description: 'Platform canonical identifier (lowercase, kebab-case)',
4959
- example: 'binance'
4960
- },
4961
- aliases: {
4962
- description: 'Platform aliases (multi-language names for lookup)',
4963
- example: ['Binance', 'Binance Exchange', 'BNB'],
4964
- type: 'array',
4965
- items: {
4966
- type: 'string'
4967
- }
4968
- },
4969
- url: {
4970
- type: 'string',
4971
- description: 'Platform URL',
4972
- example: 'https://www.binance.com'
4973
- },
4974
- type: {
4975
- type: 'string',
4976
- description: 'Platform type',
4977
- enum: [
4978
- 'BANK',
4979
- 'BROKERAGE',
4980
- 'CRYPTO_EXCHANGE',
4981
- 'PAYMENT',
4982
- 'INVESTMENT',
4983
- 'INSURANCE',
4984
- 'OTHER'
4985
- ],
4986
- example: 'CRYPTO_EXCHANGE'
4987
- },
4988
- logoUrl: {
4989
- type: 'string',
4990
- description: 'Platform logo URL',
4991
- example: 'https://example.com/logos/binance.png'
4992
- },
4993
- isActive: {
4994
- type: 'boolean',
4995
- description: 'Whether the platform is active',
4996
- default: true
4997
- }
4998
- },
4999
- required: ['name', 'canonical', 'aliases', 'url', 'type']
5000
- } as const;
5001
-
5002
- export const $UpdatePlatformDto = {
5003
- type: 'object',
5004
- properties: {
5005
- name: {
5006
- type: 'string',
5007
- description: 'Platform name',
5008
- example: 'Binance'
5009
- },
5010
- canonical: {
5011
- type: 'string',
5012
- description: 'Platform canonical identifier (lowercase, kebab-case)',
5013
- example: 'binance'
5014
- },
5015
- aliases: {
5016
- description: 'Platform aliases (multi-language names for lookup)',
5017
- example: ['Binance', 'Binance Exchange', 'BNB'],
5018
- type: 'array',
5019
- items: {
5020
- type: 'string'
5021
- }
5022
- },
5023
- url: {
5024
- type: 'string',
5025
- description: 'Platform URL',
5026
- example: 'https://www.binance.com'
5027
- },
5028
- type: {
5029
- type: 'string',
5030
- description: 'Platform type',
5031
- enum: [
5032
- 'BANK',
5033
- 'BROKERAGE',
5034
- 'CRYPTO_EXCHANGE',
5035
- 'PAYMENT',
5036
- 'INVESTMENT',
5037
- 'INSURANCE',
5038
- 'OTHER'
5039
- ],
5040
- example: 'CRYPTO_EXCHANGE'
5041
- },
5042
- logoUrl: {
5043
- type: 'string',
5044
- description: 'Platform logo URL',
5045
- example: 'https://example.com/logos/binance.png'
5046
- },
5047
- isActive: {
5048
- type: 'boolean',
5049
- description: 'Whether the platform is active'
5050
- }
5051
- }
5052
- } as const;
5053
-
5054
5354
  export const $ProviderSyncConfigDto = {
5055
5355
  type: 'object',
5056
5356
  properties: {
5057
5357
  sourceAccount: {
5058
5358
  type: 'string',
5059
5359
  description: 'Source account for the first posting',
5060
- example: 'Assets:Bank:Chase'
5360
+ example: 'Assets:US:Chase:Checking'
5061
5361
  },
5062
5362
  defaultCurrency: {
5063
5363
  type: 'string',
@@ -5078,6 +5378,12 @@ export const $ProviderSyncConfigDto = {
5078
5378
  type: 'boolean',
5079
5379
  description: 'Filter pending transactions',
5080
5380
  default: true
5381
+ },
5382
+ externalAccountId: {
5383
+ type: 'string',
5384
+ description:
5385
+ 'External account ID for per-batch providers (e.g. GoCardless). Overrides sourceAccount when an ExternalAccountLink mapping exists.',
5386
+ example: 'acc_gocardless_001'
5081
5387
  }
5082
5388
  },
5083
5389
  required: [
@@ -5197,6 +5503,94 @@ export const $SupportedProvidersResponseDto = {
5197
5503
  required: ['providers']
5198
5504
  } as const;
5199
5505
 
5506
+ export const $CreateExternalAccountLinkDto = {
5507
+ type: 'object',
5508
+ properties: {
5509
+ provider: {
5510
+ type: 'string',
5511
+ enum: [
5512
+ 'plaid',
5513
+ 'teller',
5514
+ 'truelayer',
5515
+ 'gocardless',
5516
+ 'simplefin',
5517
+ 'yodlee',
5518
+ 'beancount-direct',
5519
+ 'parsed-bill'
5520
+ ],
5521
+ example: 'plaid',
5522
+ description: 'Open Banking provider (whitelist)'
5523
+ },
5524
+ externalAccountId: {
5525
+ type: 'string',
5526
+ example: 'acc-plaid-001',
5527
+ description: 'External account ID from the provider'
5528
+ },
5529
+ beanAccountId: {
5530
+ type: 'string',
5531
+ example: '550e8400-e29b-41d4-a716-446655440000',
5532
+ description: 'Target BeanAccount ID (must belong to the JWT user)'
5533
+ }
5534
+ },
5535
+ required: ['provider', 'externalAccountId', 'beanAccountId']
5536
+ } as const;
5537
+
5538
+ export const $ExternalAccountLinkResponseDto = {
5539
+ type: 'object',
5540
+ properties: {
5541
+ id: {
5542
+ type: 'string'
5543
+ },
5544
+ provider: {
5545
+ type: 'string'
5546
+ },
5547
+ externalAccountId: {
5548
+ type: 'string'
5549
+ },
5550
+ beanAccountId: {
5551
+ type: 'string'
5552
+ },
5553
+ isActive: {
5554
+ type: 'boolean'
5555
+ },
5556
+ createdAt: {
5557
+ type: 'string'
5558
+ },
5559
+ updatedAt: {
5560
+ type: 'string'
5561
+ }
5562
+ },
5563
+ required: [
5564
+ 'id',
5565
+ 'provider',
5566
+ 'externalAccountId',
5567
+ 'beanAccountId',
5568
+ 'isActive',
5569
+ 'createdAt',
5570
+ 'updatedAt'
5571
+ ]
5572
+ } as const;
5573
+
5574
+ export const $ExternalAccountLinkListResponseDto = {
5575
+ type: 'object',
5576
+ properties: {
5577
+ items: {
5578
+ type: 'array',
5579
+ items: {
5580
+ $ref: '#/components/schemas/ExternalAccountLinkResponseDto'
5581
+ }
5582
+ },
5583
+ total: {
5584
+ type: 'number'
5585
+ },
5586
+ provider: {
5587
+ type: 'string',
5588
+ description: 'Filter by provider (query param)'
5589
+ }
5590
+ },
5591
+ required: ['items', 'total']
5592
+ } as const;
5593
+
5200
5594
  export const $ParserTelemetryReportDto = {
5201
5595
  type: 'object',
5202
5596
  properties: {}
@@ -5746,7 +6140,7 @@ export const $NlpSuggestedAccountDto = {
5746
6140
  account: {
5747
6141
  type: 'string',
5748
6142
  description: 'Suggested account path',
5749
- example: 'Assets:Bank:Checking'
6143
+ example: 'Assets:Checking'
5750
6144
  },
5751
6145
  confidence: {
5752
6146
  type: 'number',
@@ -5787,7 +6181,7 @@ export const $NlpDefaultAccountsDto = {
5787
6181
  asset: {
5788
6182
  type: 'string',
5789
6183
  description: 'Default asset account',
5790
- example: 'Assets:Bank:Checking'
6184
+ example: 'Assets:Checking'
5791
6185
  },
5792
6186
  expense: {
5793
6187
  type: 'string',
@@ -5958,55 +6352,161 @@ export const $NlpResponseDto = {
5958
6352
  }
5959
6353
  ]
5960
6354
  },
5961
- confidence: {
5962
- type: 'number',
5963
- description: 'Overall confidence score (0-1)',
5964
- example: 0.85
6355
+ confidence: {
6356
+ type: 'number',
6357
+ description: 'Overall confidence score (0-1)',
6358
+ example: 0.85
6359
+ },
6360
+ confidenceThreshold: {
6361
+ type: 'number',
6362
+ description:
6363
+ 'Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.',
6364
+ example: 0.75
6365
+ },
6366
+ recurringMatch: {
6367
+ description:
6368
+ 'Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.',
6369
+ allOf: [
6370
+ {
6371
+ $ref: '#/components/schemas/RecurringMatchInfoDto'
6372
+ }
6373
+ ]
6374
+ },
6375
+ recurringSuggestion: {
6376
+ description:
6377
+ '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.',
6378
+ allOf: [
6379
+ {
6380
+ $ref: '#/components/schemas/RecurringSuggestionDto'
6381
+ }
6382
+ ]
6383
+ },
6384
+ suggestedAccounts: {
6385
+ description:
6386
+ 'Suggested accounts for this transaction. Contains recommended source and destination accounts based on the detected intent and rules.',
6387
+ allOf: [
6388
+ {
6389
+ $ref: '#/components/schemas/NlpSuggestedAccountsDto'
6390
+ }
6391
+ ]
6392
+ },
6393
+ defaultAccounts: {
6394
+ description:
6395
+ 'Default accounts for the user/region. These are fallback accounts used when no specific suggestion is available.',
6396
+ allOf: [
6397
+ {
6398
+ $ref: '#/components/schemas/NlpDefaultAccountsDto'
6399
+ }
6400
+ ]
6401
+ }
6402
+ },
6403
+ required: ['status', 'action']
6404
+ } as const;
6405
+
6406
+ export const $CreatePlatformDto = {
6407
+ type: 'object',
6408
+ properties: {
6409
+ name: {
6410
+ type: 'string',
6411
+ description: 'Platform name',
6412
+ example: 'Binance'
6413
+ },
6414
+ canonical: {
6415
+ type: 'string',
6416
+ description: 'Platform canonical identifier (lowercase, kebab-case)',
6417
+ example: 'binance'
6418
+ },
6419
+ aliases: {
6420
+ description: 'Platform aliases (multi-language names for lookup)',
6421
+ example: ['Binance', 'Binance Exchange', 'BNB'],
6422
+ type: 'array',
6423
+ items: {
6424
+ type: 'string'
6425
+ }
6426
+ },
6427
+ url: {
6428
+ type: 'string',
6429
+ description: 'Platform URL',
6430
+ example: 'https://www.binance.com'
6431
+ },
6432
+ type: {
6433
+ type: 'string',
6434
+ description: 'Platform type',
6435
+ enum: [
6436
+ 'BANK',
6437
+ 'BROKERAGE',
6438
+ 'CRYPTO_EXCHANGE',
6439
+ 'PAYMENT',
6440
+ 'INVESTMENT',
6441
+ 'INSURANCE',
6442
+ 'OTHER'
6443
+ ],
6444
+ example: 'CRYPTO_EXCHANGE'
6445
+ },
6446
+ logoUrl: {
6447
+ type: 'string',
6448
+ description: 'Platform logo URL',
6449
+ example: 'https://example.com/logos/binance.png'
6450
+ },
6451
+ isActive: {
6452
+ type: 'boolean',
6453
+ description: 'Whether the platform is active',
6454
+ default: true
6455
+ }
6456
+ },
6457
+ required: ['name', 'canonical', 'aliases', 'url', 'type']
6458
+ } as const;
6459
+
6460
+ export const $UpdatePlatformDto = {
6461
+ type: 'object',
6462
+ properties: {
6463
+ name: {
6464
+ type: 'string',
6465
+ description: 'Platform name',
6466
+ example: 'Binance'
5965
6467
  },
5966
- confidenceThreshold: {
5967
- type: 'number',
5968
- description:
5969
- 'Confidence threshold for automatic creation (default: 0.75). When confidence < threshold, action will be "confirm" requiring user verification.',
5970
- example: 0.75
6468
+ canonical: {
6469
+ type: 'string',
6470
+ description: 'Platform canonical identifier (lowercase, kebab-case)',
6471
+ example: 'binance'
5971
6472
  },
5972
- recurringMatch: {
5973
- description:
5974
- 'Recurring transaction match info (when action is "created"). Contains match details when transaction matches a pending expected transaction.',
5975
- allOf: [
5976
- {
5977
- $ref: '#/components/schemas/RecurringMatchInfoDto'
5978
- }
5979
- ]
6473
+ aliases: {
6474
+ description: 'Platform aliases (multi-language names for lookup)',
6475
+ example: ['Binance', 'Binance Exchange', 'BNB'],
6476
+ type: 'array',
6477
+ items: {
6478
+ type: 'string'
6479
+ }
5980
6480
  },
5981
- recurringSuggestion: {
5982
- description:
5983
- '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.',
5984
- allOf: [
5985
- {
5986
- $ref: '#/components/schemas/RecurringSuggestionDto'
5987
- }
5988
- ]
6481
+ url: {
6482
+ type: 'string',
6483
+ description: 'Platform URL',
6484
+ example: 'https://www.binance.com'
5989
6485
  },
5990
- suggestedAccounts: {
5991
- description:
5992
- 'Suggested accounts for this transaction. Contains recommended source and destination accounts based on the detected intent and rules.',
5993
- allOf: [
5994
- {
5995
- $ref: '#/components/schemas/NlpSuggestedAccountsDto'
5996
- }
5997
- ]
6486
+ type: {
6487
+ type: 'string',
6488
+ description: 'Platform type',
6489
+ enum: [
6490
+ 'BANK',
6491
+ 'BROKERAGE',
6492
+ 'CRYPTO_EXCHANGE',
6493
+ 'PAYMENT',
6494
+ 'INVESTMENT',
6495
+ 'INSURANCE',
6496
+ 'OTHER'
6497
+ ],
6498
+ example: 'CRYPTO_EXCHANGE'
5998
6499
  },
5999
- defaultAccounts: {
6000
- description:
6001
- 'Default accounts for the user/region. These are fallback accounts used when no specific suggestion is available.',
6002
- allOf: [
6003
- {
6004
- $ref: '#/components/schemas/NlpDefaultAccountsDto'
6005
- }
6006
- ]
6500
+ logoUrl: {
6501
+ type: 'string',
6502
+ description: 'Platform logo URL',
6503
+ example: 'https://example.com/logos/binance.png'
6504
+ },
6505
+ isActive: {
6506
+ type: 'boolean',
6507
+ description: 'Whether the platform is active'
6007
6508
  }
6008
- },
6009
- required: ['status', 'action']
6509
+ }
6010
6510
  } as const;
6011
6511
 
6012
6512
  export const $NetWorthByCurrencyDto = {
@@ -6163,7 +6663,7 @@ export const $AccountItemDto = {
6163
6663
  name: {
6164
6664
  type: 'string',
6165
6665
  description: 'Full account name',
6166
- example: 'Assets:Bank:CMB:Savings'
6666
+ example: 'Assets:CN:CMB:Savings'
6167
6667
  },
6168
6668
  displayName: {
6169
6669
  type: 'string',
@@ -6332,7 +6832,7 @@ export const $AccountItemWithAssetClassDto = {
6332
6832
  name: {
6333
6833
  type: 'string',
6334
6834
  description: 'Full account name',
6335
- example: 'Assets:Bank:CMB:Savings'
6835
+ example: 'Assets:CN:CMB:Savings'
6336
6836
  },
6337
6837
  displayName: {
6338
6838
  type: 'string',
@@ -6507,7 +7007,7 @@ export const $HoldingAssetClassAccountSliceDto = {
6507
7007
  accountPath: {
6508
7008
  type: 'string',
6509
7009
  description: 'Full account path',
6510
- example: 'Assets:US:Investments:Brokerage'
7010
+ example: 'Assets:US:Fidelity:Brokerage'
6511
7011
  },
6512
7012
  accountCurrency: {
6513
7013
  type: 'string',
@@ -7097,163 +7597,6 @@ export const $HoldingPnlResponseDto = {
7097
7597
  required: ['asOfDate', 'baseCurrency', 'method', 'rows', 'warnings']
7098
7598
  } as const;
7099
7599
 
7100
- export const $CreateBeanPriceDto = {
7101
- type: 'object',
7102
- properties: {
7103
- currency: {
7104
- type: 'string',
7105
- description: 'Currency being priced (e.g., USD, AAPL, BTC)',
7106
- example: 'USD'
7107
- },
7108
- quoteCurrency: {
7109
- type: 'string',
7110
- description: 'Quote currency (pricing currency, e.g., CNY, EUR)',
7111
- example: 'CNY'
7112
- },
7113
- amount: {
7114
- type: 'number',
7115
- description:
7116
- 'Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.',
7117
- example: 175.5,
7118
- minimum: 0
7119
- },
7120
- date: {
7121
- type: 'string',
7122
- description: 'Price date (ISO 8601 format)',
7123
- example: '2024-11-05'
7124
- },
7125
- metadata: {
7126
- type: 'object',
7127
- description:
7128
- 'Metadata (validated by Zod schema, max field lengths enforced)',
7129
- example: {
7130
- source: 'MANUAL',
7131
- note: 'Bank valuation report',
7132
- confidence: 0.95
7133
- }
7134
- }
7135
- },
7136
- required: ['currency', 'quoteCurrency', 'amount', 'date']
7137
- } as const;
7138
-
7139
- export const $PriceResponseDto = {
7140
- type: 'object',
7141
- properties: {
7142
- id: {
7143
- type: 'string',
7144
- description: 'Unique identifier',
7145
- example: 'uuid-123-456'
7146
- },
7147
- userId: {
7148
- type: 'string',
7149
- description: 'User ID (owner of the price)',
7150
- example: 'user-123'
7151
- },
7152
- currency: {
7153
- type: 'string',
7154
- description: 'Currency being priced (e.g., USD, AAPL, BTC)',
7155
- example: 'BTC'
7156
- },
7157
- quoteCurrency: {
7158
- type: 'string',
7159
- description: 'Quote currency (pricing currency, e.g., USD, CNY)',
7160
- example: 'USD'
7161
- },
7162
- amount: {
7163
- type: 'number',
7164
- description:
7165
- 'Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.',
7166
- example: 50000
7167
- },
7168
- date: {
7169
- type: 'string',
7170
- description:
7171
- 'Price date (ISO 8601 format). Represents the date this price was valid.',
7172
- example: '2024-01-01',
7173
- format: 'date'
7174
- },
7175
- meta: {
7176
- type: 'object',
7177
- description:
7178
- 'Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.',
7179
- example: {
7180
- source: 'MANUAL',
7181
- note: 'User-defined price',
7182
- confidence: 1
7183
- }
7184
- },
7185
- createdAt: {
7186
- format: 'date-time',
7187
- type: 'string',
7188
- description: 'Creation timestamp',
7189
- example: '2024-11-03T10:00:00Z'
7190
- },
7191
- updatedAt: {
7192
- format: 'date-time',
7193
- type: 'string',
7194
- description: 'Last update timestamp',
7195
- example: '2024-11-03T10:00:00Z'
7196
- }
7197
- },
7198
- required: [
7199
- 'id',
7200
- 'userId',
7201
- 'currency',
7202
- 'quoteCurrency',
7203
- 'amount',
7204
- 'date',
7205
- 'meta',
7206
- 'createdAt',
7207
- 'updatedAt'
7208
- ]
7209
- } as const;
7210
-
7211
- export const $PriceListResponseDto = {
7212
- type: 'object',
7213
- properties: {
7214
- items: {
7215
- description: 'List of prices',
7216
- type: 'array',
7217
- items: {
7218
- $ref: '#/components/schemas/PriceResponseDto'
7219
- }
7220
- },
7221
- total: {
7222
- type: 'number',
7223
- description: 'Total number of prices',
7224
- example: 42
7225
- }
7226
- },
7227
- required: ['items', 'total']
7228
- } as const;
7229
-
7230
- export const $UpdateBeanPriceDto = {
7231
- type: 'object',
7232
- properties: {
7233
- currency: {
7234
- type: 'string',
7235
- description: 'Currency being priced'
7236
- },
7237
- quoteCurrency: {
7238
- type: 'string',
7239
- description: 'Quote currency (pricing currency)'
7240
- },
7241
- amount: {
7242
- type: 'number',
7243
- description: 'Price amount (MUST be >= 0 per Beancount spec)',
7244
- minimum: 0
7245
- },
7246
- date: {
7247
- type: 'string',
7248
- description: 'Price date (ISO 8601 format)'
7249
- },
7250
- metadata: {
7251
- type: 'object',
7252
- description: 'Metadata'
7253
- }
7254
- }
7255
- } as const;
7256
-
7257
7600
  export const $CurrencyBalanceDto = {
7258
7601
  type: 'object',
7259
7602
  properties: {