@firela/api-types 0.0.0-canary.792fa5f1 → 0.0.0-canary.7a8f5374

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -670,6 +670,7 @@ var BeanTransactionsService = class {
670
670
  * @param data.status Filter by transaction status
671
671
  * @param data.search Search in narration and payee fields (max 200 chars)
672
672
  * @param data.accountId Filter by account ID (transactions with postings to this account)
673
+ * @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
673
674
  * @returns TransactionListResponseDto Transaction list
674
675
  * @throws ApiError
675
676
  */
@@ -687,7 +688,8 @@ var BeanTransactionsService = class {
687
688
  dateTo: data.dateTo,
688
689
  status: data.status,
689
690
  search: data.search,
690
- accountId: data.accountId
691
+ accountId: data.accountId,
692
+ category: data.category
691
693
  },
692
694
  errors: {
693
695
  400: "Validation failed",
package/dist/index.mjs CHANGED
@@ -638,6 +638,7 @@ var BeanTransactionsService = class {
638
638
  * @param data.status Filter by transaction status
639
639
  * @param data.search Search in narration and payee fields (max 200 chars)
640
640
  * @param data.accountId Filter by account ID (transactions with postings to this account)
641
+ * @param data.category Filter by ADR-0075 functional category (Group segment); matches any posting to an Expenses/Income account whose derived Group segment equals this value
641
642
  * @returns TransactionListResponseDto Transaction list
642
643
  * @throws ApiError
643
644
  */
@@ -655,7 +656,8 @@ var BeanTransactionsService = class {
655
656
  dateTo: data.dateTo,
656
657
  status: data.status,
657
658
  search: data.search,
658
- accountId: data.accountId
659
+ accountId: data.accountId,
660
+ category: data.category
659
661
  },
660
662
  errors: {
661
663
  400: "Validation failed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firela/api-types",
3
- "version": "0.0.0-canary.792fa5f1",
3
+ "version": "0.0.0-canary.7a8f5374",
4
4
  "description": "TypeScript types generated from IGN OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "author": "FireLa Team",
@@ -660,6 +660,32 @@ export const $CreateTransactionDto = {
660
660
  required: ['date', 'narration', 'postings']
661
661
  } as const;
662
662
 
663
+ export const $CostDetailDto = {
664
+ type: 'object',
665
+ properties: {
666
+ number: {
667
+ type: 'string',
668
+ description: 'Per-unit cost basis (mirrors engine Cost.number)',
669
+ example: '240'
670
+ },
671
+ currency: {
672
+ type: 'string',
673
+ description: 'Cost currency',
674
+ example: 'USD'
675
+ },
676
+ date: {
677
+ type: 'string',
678
+ description: 'Lot acquisition date (ISO yyyy-mm-dd)',
679
+ example: '2024-01-15'
680
+ },
681
+ label: {
682
+ type: 'string',
683
+ description: 'Lot label',
684
+ example: 'lot-2024-01'
685
+ }
686
+ }
687
+ } as const;
688
+
663
689
  export const $PostingResponseDto = {
664
690
  type: 'object',
665
691
  properties: {
@@ -678,6 +704,15 @@ export const $PostingResponseDto = {
678
704
  type: 'string',
679
705
  description: 'Currency',
680
706
  example: 'USD'
707
+ },
708
+ cost: {
709
+ description:
710
+ 'Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.',
711
+ allOf: [
712
+ {
713
+ $ref: '#/components/schemas/CostDetailDto'
714
+ }
715
+ ]
681
716
  }
682
717
  },
683
718
  required: ['account']
@@ -1051,6 +1086,15 @@ export const $PostingDetailDto = {
1051
1086
  description: 'Cost date',
1052
1087
  example: '2024-01-15'
1053
1088
  },
1089
+ cost: {
1090
+ description:
1091
+ 'Booking-resolved cost (mirrors engine Cost). Undefined when the posting has no cost basis.',
1092
+ allOf: [
1093
+ {
1094
+ $ref: '#/components/schemas/CostDetailDto'
1095
+ }
1096
+ ]
1097
+ },
1054
1098
  priceAmount: {
1055
1099
  type: 'string',
1056
1100
  description: 'Price amount',
@@ -1811,7 +1855,8 @@ export const $ResolveResultDto = {
1811
1855
  },
1812
1856
  resolutionId: {
1813
1857
  type: 'string',
1814
- description: 'Resolution ID for undo'
1858
+ description:
1859
+ 'Resolution ID for undo. Absent when the resolver rejected the decision (review stayed PENDING).'
1815
1860
  },
1816
1861
  canUndo: {
1817
1862
  type: 'boolean',
@@ -1829,7 +1874,7 @@ export const $ResolveResultDto = {
1829
1874
  example: 'rule_01HXK5V8N2M3P4Q5R6S7T8U9V0'
1830
1875
  }
1831
1876
  },
1832
- required: ['success', 'resolutionId', 'canUndo', 'undoDeadline']
1877
+ required: ['success']
1833
1878
  } as const;
1834
1879
 
1835
1880
  export const $UndoResultDto = {
@@ -4267,6 +4312,144 @@ export const $UpdatePropertyDto = {
4267
4312
  required: ['value']
4268
4313
  } as const;
4269
4314
 
4315
+ export const $CreateBeanEventDto = {
4316
+ type: 'object',
4317
+ properties: {
4318
+ date: {
4319
+ type: 'string',
4320
+ description: 'Life event date (ISO 8601)',
4321
+ example: '2024-03-15'
4322
+ },
4323
+ type: {
4324
+ type: 'string',
4325
+ description:
4326
+ 'Life event type (e.g., "employer", "location", "marital-status") — user-defined, no enum constraint at engine layer',
4327
+ example: 'employer'
4328
+ },
4329
+ description: {
4330
+ type: 'string',
4331
+ description:
4332
+ 'Life event description. Empty string is a VALID value (distinct from absence).',
4333
+ example: 'Acme Corp'
4334
+ },
4335
+ meta: {
4336
+ type: 'object',
4337
+ description:
4338
+ 'Product-side metadata (lives in BeanEvent.meta JSON, never in engine Event fields)',
4339
+ example: {
4340
+ note: 'Promotion'
4341
+ }
4342
+ }
4343
+ },
4344
+ required: ['date', 'type', 'description']
4345
+ } as const;
4346
+
4347
+ export const $EventResponseDto = {
4348
+ type: 'object',
4349
+ properties: {
4350
+ id: {
4351
+ type: 'string',
4352
+ description: 'Unique identifier',
4353
+ example: 'uuid-123-456'
4354
+ },
4355
+ userId: {
4356
+ type: 'string',
4357
+ description: 'User ID (owner of the life event)',
4358
+ example: 'user-123'
4359
+ },
4360
+ date: {
4361
+ type: 'string',
4362
+ description: 'Life event date (ISO 8601 format)',
4363
+ example: '2024-03-15',
4364
+ format: 'date'
4365
+ },
4366
+ type: {
4367
+ type: 'string',
4368
+ description:
4369
+ 'Life event type (user-defined, e.g., "employer", "location")',
4370
+ example: 'employer'
4371
+ },
4372
+ description: {
4373
+ type: 'string',
4374
+ description:
4375
+ 'Life event description. May be an empty string (a valid value distinct from absence).',
4376
+ example: 'Acme Corp'
4377
+ },
4378
+ meta: {
4379
+ type: 'object',
4380
+ description: 'Product-side metadata (free-form JSON)',
4381
+ example: {
4382
+ note: 'Promotion'
4383
+ }
4384
+ },
4385
+ createdAt: {
4386
+ format: 'date-time',
4387
+ type: 'string',
4388
+ description: 'Creation timestamp',
4389
+ example: '2024-03-15T10:00:00Z'
4390
+ },
4391
+ updatedAt: {
4392
+ format: 'date-time',
4393
+ type: 'string',
4394
+ description:
4395
+ 'Last update timestamp. Also emitted as the ETag response header for If-Match optimistic concurrency.',
4396
+ example: '2024-03-15T10:00:00Z'
4397
+ }
4398
+ },
4399
+ required: [
4400
+ 'id',
4401
+ 'userId',
4402
+ 'date',
4403
+ 'type',
4404
+ 'description',
4405
+ 'meta',
4406
+ 'createdAt',
4407
+ 'updatedAt'
4408
+ ]
4409
+ } as const;
4410
+
4411
+ export const $EventListResponseDto = {
4412
+ type: 'object',
4413
+ properties: {
4414
+ items: {
4415
+ description: 'List of life events',
4416
+ type: 'array',
4417
+ items: {
4418
+ $ref: '#/components/schemas/EventResponseDto'
4419
+ }
4420
+ },
4421
+ total: {
4422
+ type: 'number',
4423
+ description: 'Total number of life events matching the query',
4424
+ example: 42
4425
+ }
4426
+ },
4427
+ required: ['items', 'total']
4428
+ } as const;
4429
+
4430
+ export const $UpdateBeanEventDto = {
4431
+ type: 'object',
4432
+ properties: {
4433
+ date: {
4434
+ type: 'string',
4435
+ description: 'Life event date (ISO 8601)'
4436
+ },
4437
+ type: {
4438
+ type: 'string',
4439
+ description: 'Life event type (user-defined)'
4440
+ },
4441
+ description: {
4442
+ type: 'string',
4443
+ description:
4444
+ 'Life event description. Empty string is a VALID value (distinct from absence).'
4445
+ },
4446
+ meta: {
4447
+ type: 'object',
4448
+ description: 'Product-side metadata (free-form JSON)'
4449
+ }
4450
+ }
4451
+ } as const;
4452
+
4270
4453
  export const $FileImportDto = {
4271
4454
  type: 'object',
4272
4455
  properties: {
@@ -6439,6 +6622,101 @@ export const $CashFlowResponseDto = {
6439
6622
  ]
6440
6623
  } as const;
6441
6624
 
6625
+ export const $CategoryGroupDto = {
6626
+ type: 'object',
6627
+ properties: {
6628
+ category: {
6629
+ type: 'string',
6630
+ description:
6631
+ 'Functional category (account-path Group segment); regional and universal account paths merge under it',
6632
+ example: 'Food'
6633
+ },
6634
+ totalExpense: {
6635
+ type: 'string',
6636
+ description:
6637
+ 'Converted total for this category in base currency (expense amount when flow=expense, income amount when flow=income)',
6638
+ example: '1200.00'
6639
+ },
6640
+ sharePct: {
6641
+ type: 'number',
6642
+ description: 'Share of grand total (0-100); 0 when grand total is 0',
6643
+ example: 42.5
6644
+ },
6645
+ balanceByCurrency: {
6646
+ description: 'Raw (unconverted) expense per currency',
6647
+ type: 'array',
6648
+ items: {
6649
+ $ref: '#/components/schemas/BalanceByCurrencyDto'
6650
+ }
6651
+ },
6652
+ convertedBalance: {
6653
+ type: 'string',
6654
+ description:
6655
+ 'Converted total in base currency (omitted when FX missing for all currencies in this category)',
6656
+ example: '1200.00'
6657
+ }
6658
+ },
6659
+ required: ['category', 'totalExpense', 'sharePct', 'balanceByCurrency']
6660
+ } as const;
6661
+
6662
+ export const $ExpensesByCategorySummaryDto = {
6663
+ type: 'object',
6664
+ properties: {
6665
+ totalExpense: {
6666
+ type: 'string',
6667
+ description:
6668
+ 'Total across all categories, converted (convertible categories only); expense totals when flow=expense, income totals when flow=income',
6669
+ example: '5000.00'
6670
+ },
6671
+ categoryCount: {
6672
+ type: 'number',
6673
+ description: 'Number of categories',
6674
+ example: 8
6675
+ }
6676
+ },
6677
+ required: ['totalExpense', 'categoryCount']
6678
+ } as const;
6679
+
6680
+ export const $ExpensesByCategoryResponseDto = {
6681
+ type: 'object',
6682
+ properties: {
6683
+ period: {
6684
+ type: 'string',
6685
+ description: 'Period requested',
6686
+ example: '1m'
6687
+ },
6688
+ baseCurrency: {
6689
+ type: 'string',
6690
+ description: 'Base currency for converted values',
6691
+ example: 'CNY'
6692
+ },
6693
+ groups: {
6694
+ description:
6695
+ 'Expense groups by functional category, sorted by converted total desc',
6696
+ type: 'array',
6697
+ items: {
6698
+ $ref: '#/components/schemas/CategoryGroupDto'
6699
+ }
6700
+ },
6701
+ summary: {
6702
+ description: 'Summary statistics',
6703
+ allOf: [
6704
+ {
6705
+ $ref: '#/components/schemas/ExpensesByCategorySummaryDto'
6706
+ }
6707
+ ]
6708
+ },
6709
+ warnings: {
6710
+ description: 'Exchange rate warnings (e.g. missing rate for a currency)',
6711
+ type: 'array',
6712
+ items: {
6713
+ $ref: '#/components/schemas/ExchangeRateWarningDto'
6714
+ }
6715
+ }
6716
+ },
6717
+ required: ['period', 'baseCurrency', 'groups', 'summary']
6718
+ } as const;
6719
+
6442
6720
  export const $MonetaryDto = {
6443
6721
  type: 'object',
6444
6722
  properties: {
@@ -6920,6 +7198,16 @@ export const $TimeSeriesPointDto = {
6920
7198
  description: 'Change from previous point',
6921
7199
  example: '5000.00'
6922
7200
  },
7201
+ assets: {
7202
+ type: 'string',
7203
+ description: 'Total assets at this date (in base currency)',
7204
+ example: '494338.00'
7205
+ },
7206
+ liabilities: {
7207
+ type: 'string',
7208
+ description: 'Total liabilities at this date (in base currency)',
7209
+ example: '310098.00'
7210
+ },
6923
7211
  byCurrency: {
6924
7212
  description: 'Multi-currency breakdown for this point',
6925
7213
  type: 'array',
@@ -7029,6 +7317,111 @@ export const $PortfolioTrendsResponseDto = {
7029
7317
  required: ['series', 'summary', 'period', 'granularity', 'currency']
7030
7318
  } as const;
7031
7319
 
7320
+ export const $CashFlowPointDto = {
7321
+ type: 'object',
7322
+ properties: {
7323
+ month: {
7324
+ type: 'string',
7325
+ description: 'Month key (YYYY-MM)',
7326
+ example: '2024-03'
7327
+ },
7328
+ income: {
7329
+ type: 'string',
7330
+ description: 'Income in base currency (absolute, converted)',
7331
+ example: '10000.00'
7332
+ },
7333
+ expense: {
7334
+ type: 'string',
7335
+ description: 'Expense in base currency (absolute, converted)',
7336
+ example: '5000.00'
7337
+ },
7338
+ netSavings: {
7339
+ type: 'string',
7340
+ description: 'netSavings = income − expense (savings positive)',
7341
+ example: '5000.00'
7342
+ }
7343
+ },
7344
+ required: ['month', 'income', 'expense', 'netSavings']
7345
+ } as const;
7346
+
7347
+ export const $CashFlowTrendSummaryDto = {
7348
+ type: 'object',
7349
+ properties: {
7350
+ totalIncome: {
7351
+ type: 'string',
7352
+ description: 'Total income across the period',
7353
+ example: '60000.00'
7354
+ },
7355
+ totalExpense: {
7356
+ type: 'string',
7357
+ description: 'Total expense across the period',
7358
+ example: '30000.00'
7359
+ },
7360
+ totalNetSavings: {
7361
+ type: 'string',
7362
+ description: 'income − expense across the period',
7363
+ example: '30000.00'
7364
+ },
7365
+ averageMonthlyNetSavings: {
7366
+ type: 'string',
7367
+ description:
7368
+ 'totalNetSavings divided by the window length (N months, incl. zero-filled)',
7369
+ example: '5000.00'
7370
+ }
7371
+ },
7372
+ required: [
7373
+ 'totalIncome',
7374
+ 'totalExpense',
7375
+ 'totalNetSavings',
7376
+ 'averageMonthlyNetSavings'
7377
+ ]
7378
+ } as const;
7379
+
7380
+ export const $CashFlowTrendsResponseDto = {
7381
+ type: 'object',
7382
+ properties: {
7383
+ series: {
7384
+ description:
7385
+ 'Monthly cash-flow series (fixed N-month window, zero-filled)',
7386
+ type: 'array',
7387
+ items: {
7388
+ $ref: '#/components/schemas/CashFlowPointDto'
7389
+ }
7390
+ },
7391
+ summary: {
7392
+ description: 'Period totals',
7393
+ allOf: [
7394
+ {
7395
+ $ref: '#/components/schemas/CashFlowTrendSummaryDto'
7396
+ }
7397
+ ]
7398
+ },
7399
+ period: {
7400
+ type: 'string',
7401
+ description: 'Period requested',
7402
+ example: '6m'
7403
+ },
7404
+ granularity: {
7405
+ type: 'string',
7406
+ description: 'Data granularity (v1 returns month buckets)',
7407
+ example: 'month'
7408
+ },
7409
+ currency: {
7410
+ type: 'string',
7411
+ description: 'Base currency for converted values',
7412
+ example: 'CNY'
7413
+ },
7414
+ warnings: {
7415
+ description: 'Exchange rate warnings (e.g. missing rate for a currency)',
7416
+ type: 'array',
7417
+ items: {
7418
+ $ref: '#/components/schemas/ExchangeRateWarningDto'
7419
+ }
7420
+ }
7421
+ },
7422
+ required: ['series', 'summary', 'period', 'granularity', 'currency']
7423
+ } as const;
7424
+
7032
7425
  export const $GenerateSnapshotBody = {
7033
7426
  type: 'object',
7034
7427
  properties: {}