@firela/api-types 0.0.0-canary.610daafc → 0.0.0-canary.6a42fd0e

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firela/api-types",
3
- "version": "0.0.0-canary.610daafc",
3
+ "version": "0.0.0-canary.6a42fd0e",
4
4
  "description": "TypeScript types generated from IGN OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "author": "FireLa Team",
@@ -2825,6 +2825,163 @@ export const $UpdateCommodityDto = {
2825
2825
  }
2826
2826
  } as const;
2827
2827
 
2828
+ export const $CreateBeanPriceDto = {
2829
+ type: 'object',
2830
+ properties: {
2831
+ currency: {
2832
+ type: 'string',
2833
+ description: 'Currency being priced (e.g., USD, AAPL, BTC)',
2834
+ example: 'USD'
2835
+ },
2836
+ quoteCurrency: {
2837
+ type: 'string',
2838
+ description: 'Quote currency (pricing currency, e.g., CNY, EUR)',
2839
+ example: 'CNY'
2840
+ },
2841
+ amount: {
2842
+ type: 'number',
2843
+ description:
2844
+ 'Price amount (MUST be >= 0 per Beancount spec, supports up to 15 decimal places). Zero allowed for conversion entries, negative strictly prohibited.',
2845
+ example: 175.5,
2846
+ minimum: 0
2847
+ },
2848
+ date: {
2849
+ type: 'string',
2850
+ description: 'Price date (ISO 8601 format)',
2851
+ example: '2024-11-05'
2852
+ },
2853
+ metadata: {
2854
+ type: 'object',
2855
+ description:
2856
+ 'Metadata (validated by Zod schema, max field lengths enforced)',
2857
+ example: {
2858
+ source: 'MANUAL',
2859
+ note: 'Bank valuation report',
2860
+ confidence: 0.95
2861
+ }
2862
+ }
2863
+ },
2864
+ required: ['currency', 'quoteCurrency', 'amount', 'date']
2865
+ } as const;
2866
+
2867
+ export const $PriceResponseDto = {
2868
+ type: 'object',
2869
+ properties: {
2870
+ id: {
2871
+ type: 'string',
2872
+ description: 'Unique identifier',
2873
+ example: 'uuid-123-456'
2874
+ },
2875
+ userId: {
2876
+ type: 'string',
2877
+ description: 'User ID (owner of the price)',
2878
+ example: 'user-123'
2879
+ },
2880
+ currency: {
2881
+ type: 'string',
2882
+ description: 'Currency being priced (e.g., USD, AAPL, BTC)',
2883
+ example: 'BTC'
2884
+ },
2885
+ quoteCurrency: {
2886
+ type: 'string',
2887
+ description: 'Quote currency (pricing currency, e.g., USD, CNY)',
2888
+ example: 'USD'
2889
+ },
2890
+ amount: {
2891
+ type: 'number',
2892
+ description:
2893
+ 'Price amount (corresponds to Beancount Amount.number). Supports up to 15 decimal places.',
2894
+ example: 50000
2895
+ },
2896
+ date: {
2897
+ type: 'string',
2898
+ description:
2899
+ 'Price date (ISO 8601 format). Represents the date this price was valid.',
2900
+ example: '2024-01-01',
2901
+ format: 'date'
2902
+ },
2903
+ meta: {
2904
+ type: 'object',
2905
+ description:
2906
+ 'Metadata (corresponds to Beancount meta field). Contains source, confidence, note, etc.',
2907
+ example: {
2908
+ source: 'MANUAL',
2909
+ note: 'User-defined price',
2910
+ confidence: 1
2911
+ }
2912
+ },
2913
+ createdAt: {
2914
+ format: 'date-time',
2915
+ type: 'string',
2916
+ description: 'Creation timestamp',
2917
+ example: '2024-11-03T10:00:00Z'
2918
+ },
2919
+ updatedAt: {
2920
+ format: 'date-time',
2921
+ type: 'string',
2922
+ description: 'Last update timestamp',
2923
+ example: '2024-11-03T10:00:00Z'
2924
+ }
2925
+ },
2926
+ required: [
2927
+ 'id',
2928
+ 'userId',
2929
+ 'currency',
2930
+ 'quoteCurrency',
2931
+ 'amount',
2932
+ 'date',
2933
+ 'meta',
2934
+ 'createdAt',
2935
+ 'updatedAt'
2936
+ ]
2937
+ } as const;
2938
+
2939
+ export const $PriceListResponseDto = {
2940
+ type: 'object',
2941
+ properties: {
2942
+ items: {
2943
+ description: 'List of prices',
2944
+ type: 'array',
2945
+ items: {
2946
+ $ref: '#/components/schemas/PriceResponseDto'
2947
+ }
2948
+ },
2949
+ total: {
2950
+ type: 'number',
2951
+ description: 'Total number of prices',
2952
+ example: 42
2953
+ }
2954
+ },
2955
+ required: ['items', 'total']
2956
+ } as const;
2957
+
2958
+ export const $UpdateBeanPriceDto = {
2959
+ type: 'object',
2960
+ properties: {
2961
+ currency: {
2962
+ type: 'string',
2963
+ description: 'Currency being priced'
2964
+ },
2965
+ quoteCurrency: {
2966
+ type: 'string',
2967
+ description: 'Quote currency (pricing currency)'
2968
+ },
2969
+ amount: {
2970
+ type: 'number',
2971
+ description: 'Price amount (MUST be >= 0 per Beancount spec)',
2972
+ minimum: 0
2973
+ },
2974
+ date: {
2975
+ type: 'string',
2976
+ description: 'Price date (ISO 8601 format)'
2977
+ },
2978
+ metadata: {
2979
+ type: 'object',
2980
+ description: 'Metadata'
2981
+ }
2982
+ }
2983
+ } as const;
2984
+
2828
2985
  export const $CreateRecurringRuleDto = {
2829
2986
  type: 'object',
2830
2987
  properties: {
@@ -4530,6 +4687,208 @@ export const $UpdateBeanEventDto = {
4530
4687
  }
4531
4688
  } as const;
4532
4689
 
4690
+ export const $ActualBalanceDto = {
4691
+ type: 'object',
4692
+ properties: {
4693
+ amount: {
4694
+ type: 'string',
4695
+ description:
4696
+ 'Actual balance amount as a decimal string (preserves precision for tolerance inference).',
4697
+ example: '1234.56'
4698
+ },
4699
+ ccy: {
4700
+ type: 'string',
4701
+ description: 'Currency code (ISO 4217 or commodity ticker).',
4702
+ example: 'CNY'
4703
+ }
4704
+ },
4705
+ required: ['amount', 'ccy']
4706
+ } as const;
4707
+
4708
+ export const $ComputeReconciliationDto = {
4709
+ type: 'object',
4710
+ properties: {
4711
+ accountId: {
4712
+ type: 'string',
4713
+ description: 'BeanAccount id to reconcile.'
4714
+ },
4715
+ asOfDate: {
4716
+ type: 'string',
4717
+ description: 'Assertion date (ISO 8601, e.g. "2026-07-24").',
4718
+ example: '2026-07-24'
4719
+ },
4720
+ actualBalance: {
4721
+ description: 'Actual balance from the external statement.',
4722
+ allOf: [
4723
+ {
4724
+ $ref: '#/components/schemas/ActualBalanceDto'
4725
+ }
4726
+ ]
4727
+ }
4728
+ },
4729
+ required: ['accountId', 'asOfDate', 'actualBalance']
4730
+ } as const;
4731
+
4732
+ export const $ReconciliationComputeResultDto = {
4733
+ type: 'object',
4734
+ properties: {
4735
+ accountId: {
4736
+ type: 'string'
4737
+ },
4738
+ asOfDate: {
4739
+ type: 'string'
4740
+ },
4741
+ bookBalance: {
4742
+ type: 'string',
4743
+ description: 'System-computed book balance (decimal string).'
4744
+ },
4745
+ actualBalance: {
4746
+ type: 'string',
4747
+ description: 'User-entered actual balance (decimal string).'
4748
+ },
4749
+ currency: {
4750
+ type: 'string'
4751
+ },
4752
+ diff: {
4753
+ type: 'string',
4754
+ description: 'Diff = book − actual (decimal string).'
4755
+ },
4756
+ tolerance: {
4757
+ type: 'string',
4758
+ description: 'Applied tolerance (decimal string).'
4759
+ },
4760
+ withinTolerance: {
4761
+ type: 'boolean',
4762
+ description: 'true when |diff| ≤ tolerance.'
4763
+ },
4764
+ suggestedAction: {
4765
+ type: 'string',
4766
+ enum: ['assert', 'pad'],
4767
+ description:
4768
+ 'Suggested next action: assert when within tolerance, pad otherwise.'
4769
+ }
4770
+ },
4771
+ required: [
4772
+ 'accountId',
4773
+ 'asOfDate',
4774
+ 'bookBalance',
4775
+ 'actualBalance',
4776
+ 'currency',
4777
+ 'diff',
4778
+ 'tolerance',
4779
+ 'withinTolerance',
4780
+ 'suggestedAction'
4781
+ ]
4782
+ } as const;
4783
+
4784
+ export const $AssertReconciliationDto = {
4785
+ type: 'object',
4786
+ properties: {
4787
+ accountId: {
4788
+ type: 'string',
4789
+ description: 'BeanAccount id to reconcile.'
4790
+ },
4791
+ asOfDate: {
4792
+ type: 'string',
4793
+ description: 'Assertion date (ISO 8601, e.g. "2026-07-24").',
4794
+ example: '2026-07-24'
4795
+ },
4796
+ actualBalance: {
4797
+ description: 'Actual balance from the external statement.',
4798
+ allOf: [
4799
+ {
4800
+ $ref: '#/components/schemas/ActualBalanceDto'
4801
+ }
4802
+ ]
4803
+ },
4804
+ tolerance: {
4805
+ type: 'string',
4806
+ description:
4807
+ 'Optional explicit tolerance override. Omit to infer from amount precision (Beancount default).',
4808
+ example: '0.01'
4809
+ }
4810
+ },
4811
+ required: ['accountId', 'asOfDate', 'actualBalance']
4812
+ } as const;
4813
+
4814
+ export const $ReconciliationRecordDto = {
4815
+ type: 'object',
4816
+ properties: {
4817
+ id: {
4818
+ type: 'string'
4819
+ },
4820
+ accountId: {
4821
+ type: 'string'
4822
+ },
4823
+ date: {
4824
+ type: 'string'
4825
+ },
4826
+ amount: {
4827
+ type: 'string',
4828
+ description: 'Asserted (actual) amount.'
4829
+ },
4830
+ currency: {
4831
+ type: 'string'
4832
+ },
4833
+ tolerance: {
4834
+ type: 'string'
4835
+ },
4836
+ diffAmount: {
4837
+ type: 'string',
4838
+ description: 'book − actual.'
4839
+ },
4840
+ diffCurrency: {
4841
+ type: 'string'
4842
+ },
4843
+ createdAt: {
4844
+ type: 'string'
4845
+ }
4846
+ },
4847
+ required: ['id', 'accountId', 'date', 'amount', 'currency', 'createdAt']
4848
+ } as const;
4849
+
4850
+ export const $PadReconciliationDto = {
4851
+ type: 'object',
4852
+ properties: {
4853
+ accountId: {
4854
+ type: 'string',
4855
+ description: 'BeanAccount id to reconcile.'
4856
+ },
4857
+ asOfDate: {
4858
+ type: 'string',
4859
+ description: 'Assertion date (ISO 8601, e.g. "2026-07-24").',
4860
+ example: '2026-07-24'
4861
+ },
4862
+ actualBalance: {
4863
+ description: 'Actual balance from the external statement.',
4864
+ allOf: [
4865
+ {
4866
+ $ref: '#/components/schemas/ActualBalanceDto'
4867
+ }
4868
+ ]
4869
+ },
4870
+ sourceAccount: {
4871
+ type: 'string',
4872
+ description:
4873
+ 'Pad source account. Defaults to Equity:Opening-Balances (official Beancount convention).',
4874
+ example: 'Equity:Opening-Balances',
4875
+ default: 'Equity:Opening-Balances'
4876
+ }
4877
+ },
4878
+ required: ['accountId', 'asOfDate', 'actualBalance']
4879
+ } as const;
4880
+
4881
+ export const $PadResultDto = {
4882
+ type: 'object',
4883
+ properties: {
4884
+ transactionId: {
4885
+ type: 'string',
4886
+ description: 'Created pad adjusting transaction id.'
4887
+ }
4888
+ },
4889
+ required: ['transactionId']
4890
+ } as const;
4891
+
4533
4892
  export const $FileImportDto = {
4534
4893
  type: 'object',
4535
4894
  properties: {
@@ -7097,163 +7456,6 @@ export const $HoldingPnlResponseDto = {
7097
7456
  required: ['asOfDate', 'baseCurrency', 'method', 'rows', 'warnings']
7098
7457
  } as const;
7099
7458
 
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
7459
  export const $CurrencyBalanceDto = {
7258
7460
  type: 'object',
7259
7461
  properties: {