@firela/api-types 0.0.0-canary.3d558482 → 0.0.0-canary.3e45eeb0

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.
@@ -143,26 +143,14 @@ import type {
143
143
  ExpectedTransactionControllerEnterNowResponse,
144
144
  ForecastControllerGetForecastData,
145
145
  ForecastControllerGetForecastResponse,
146
- TransactionRuleControllerCreateData,
147
- TransactionRuleControllerCreateResponse,
148
- TransactionRuleControllerListData,
149
- TransactionRuleControllerListResponse,
150
- TransactionRuleControllerValidateData,
151
- TransactionRuleControllerValidateResponse,
152
- TransactionRuleControllerBulkCreateData,
153
- TransactionRuleControllerBulkCreateResponse,
154
- TransactionRuleControllerExportData,
155
- TransactionRuleControllerExportResponse,
156
- TransactionRuleControllerGetStatisticsData,
157
- TransactionRuleControllerGetStatisticsResponse,
158
- TransactionRuleControllerGetDetailData,
159
- TransactionRuleControllerGetDetailResponse,
160
- TransactionRuleControllerUpdateData,
161
- TransactionRuleControllerUpdateResponse,
162
- TransactionRuleControllerDeleteData,
163
- TransactionRuleControllerDeleteResponse,
164
- TransactionRuleControllerTestData,
165
- TransactionRuleControllerTestResponse,
146
+ ReportingControllerGetPortfolioTrendsData,
147
+ ReportingControllerGetPortfolioTrendsResponse,
148
+ ReportingControllerGetCashFlowTrendsData,
149
+ ReportingControllerGetCashFlowTrendsResponse,
150
+ ReportingControllerGenerateSnapshotData,
151
+ ReportingControllerGenerateSnapshotResponse,
152
+ ReportingControllerBackfillSnapshotsData,
153
+ ReportingControllerBackfillSnapshotsResponse,
166
154
  UserControllerDeleteOwnUserData,
167
155
  UserControllerDeleteOwnUserResponse,
168
156
  UserControllerGetUserData,
@@ -185,14 +173,28 @@ import type {
185
173
  PropertyControllerUpdateResponse,
186
174
  PropertyControllerDeleteData,
187
175
  PropertyControllerDeleteResponse,
188
- ReportingControllerGetPortfolioTrendsData,
189
- ReportingControllerGetPortfolioTrendsResponse,
190
- ReportingControllerGetCashFlowTrendsData,
191
- ReportingControllerGetCashFlowTrendsResponse,
192
- ReportingControllerGenerateSnapshotData,
193
- ReportingControllerGenerateSnapshotResponse,
194
- ReportingControllerBackfillSnapshotsData,
195
- ReportingControllerBackfillSnapshotsResponse,
176
+ TransactionRuleControllerCreateData,
177
+ TransactionRuleControllerCreateResponse,
178
+ TransactionRuleControllerListData,
179
+ TransactionRuleControllerListResponse,
180
+ TransactionRuleControllerValidateData,
181
+ TransactionRuleControllerValidateResponse,
182
+ TransactionRuleControllerBulkCreateData,
183
+ TransactionRuleControllerBulkCreateResponse,
184
+ TransactionRuleControllerExportData,
185
+ TransactionRuleControllerExportResponse,
186
+ TransactionRuleControllerGetStatisticsData,
187
+ TransactionRuleControllerGetStatisticsResponse,
188
+ TransactionRuleControllerGetDetailData,
189
+ TransactionRuleControllerGetDetailResponse,
190
+ TransactionRuleControllerUpdateData,
191
+ TransactionRuleControllerUpdateResponse,
192
+ TransactionRuleControllerDeleteData,
193
+ TransactionRuleControllerDeleteResponse,
194
+ TransactionRuleControllerTestData,
195
+ TransactionRuleControllerTestResponse,
196
+ CategoryCatalogControllerListData,
197
+ CategoryCatalogControllerListResponse,
196
198
  EventControllerCreateData,
197
199
  EventControllerCreateResponse,
198
200
  EventControllerFindAllData,
@@ -257,6 +259,7 @@ import type {
257
259
  PlatformControllerFindAllResponse,
258
260
  PlatformControllerCreateData,
259
261
  PlatformControllerCreateResponse,
262
+ PlatformControllerGetPlatformListData,
260
263
  PlatformControllerGetPlatformListResponse,
261
264
  PlatformControllerMatchPlatformsData,
262
265
  PlatformControllerMatchPlatformsResponse,
@@ -288,7 +291,11 @@ import type {
288
291
  HealthControllerResetCircuitBreakerData,
289
292
  HealthControllerResetCircuitBreakerResponse,
290
293
  HealthControllerGetMetricsResponse,
291
- InfoControllerGetInfoResponse
294
+ InfoControllerGetInfoResponse,
295
+ SymbolControllerSearchData,
296
+ SymbolControllerSearchResponse,
297
+ SymbolControllerGetQuoteData,
298
+ SymbolControllerGetQuoteResponse
292
299
  } from './types.gen';
293
300
 
294
301
  export class BeanAccountsService {
@@ -407,7 +414,7 @@ export class BeanAccountsService {
407
414
 
408
415
  /**
409
416
  * Delete account
410
- * Deletes an account (only if no transactions)
417
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
411
418
  * @param data The data for the request.
412
419
  * @param data.id Account UUID
413
420
  * @param data.region Region code for tenant context
@@ -426,7 +433,7 @@ export class BeanAccountsService {
426
433
  },
427
434
  errors: {
428
435
  404: 'Account not found',
429
- 409: 'Account has transactions and cannot be deleted'
436
+ 409: 'Account has active transactions and cannot be deleted'
430
437
  }
431
438
  });
432
439
  }
@@ -2161,331 +2168,210 @@ export class RecurringForecastService {
2161
2168
  }
2162
2169
  }
2163
2170
 
2164
- export class BeanTransactionRulesService {
2171
+ export class ReportingService {
2165
2172
  /**
2166
- * Create a new transaction rule (or upsert if upsertByPayee=true)
2167
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2173
+ * Get portfolio value trends
2174
+ *
2175
+ * Returns time series data of portfolio net worth.
2176
+ *
2177
+ * **Multi-currency Support:**
2178
+ * - `series[].byCurrency` - Currency breakdown for each data point
2179
+ * - `byCurrency` - Separate time series grouped by currency
2180
+ * - `warnings` - Exchange rate warnings if conversion failed
2181
+ *
2182
+ * **Parameters:**
2183
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2184
+ * - `granularity`: Data granularity (day, week, month)
2185
+ *
2168
2186
  * @param data The data for the request.
2169
2187
  * @param data.region Region code for tenant context
2170
- * @param data.requestBody
2171
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2188
+ * @param data.period Time period
2189
+ * @param data.granularity Data granularity
2190
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2172
2191
  * @throws ApiError
2173
2192
  */
2174
- public static transactionRuleControllerCreate(
2175
- data: TransactionRuleControllerCreateData
2176
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2193
+ public static reportingControllerGetPortfolioTrends(
2194
+ data: ReportingControllerGetPortfolioTrendsData
2195
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2177
2196
  return __request(OpenAPI, {
2178
- method: 'POST',
2179
- url: '/api/v1/{region}/bean/transaction-rules',
2197
+ method: 'GET',
2198
+ url: '/api/v1/{region}/reporting/portfolio/trends',
2180
2199
  path: {
2181
2200
  region: data.region
2182
2201
  },
2183
- body: data.requestBody,
2184
- mediaType: 'application/json',
2202
+ query: {
2203
+ period: data.period,
2204
+ granularity: data.granularity
2205
+ },
2185
2206
  errors: {
2186
- 400: 'Validation failed',
2187
- 401: 'Unauthorized',
2188
- 409: 'Resource conflict - another process is updating this rule'
2207
+ 401: 'User not authenticated'
2189
2208
  }
2190
2209
  });
2191
2210
  }
2192
2211
 
2193
2212
  /**
2194
- * Get all transaction rules for user
2213
+ * Get cash-flow trends
2214
+ *
2215
+ * Monthly income / expense / netSavings over a fixed N-month window
2216
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2217
+ *
2218
+ * **Parameters:**
2219
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2220
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2221
+ *
2195
2222
  * @param data The data for the request.
2196
2223
  * @param data.region Region code for tenant context
2197
- * @param data.limit Max results per page (default: 20, max: 100)
2198
- * @param data.offset Pagination offset (default: 0)
2199
- * @param data.enabled Filter by enabled status
2200
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2201
- * @param data.autoApplyEnabled Filter by auto-apply status
2202
- * @returns TransactionRuleListResponseDto List of rules
2224
+ * @param data.period Time period
2225
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2226
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2203
2227
  * @throws ApiError
2204
2228
  */
2205
- public static transactionRuleControllerList(
2206
- data: TransactionRuleControllerListData
2207
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2229
+ public static reportingControllerGetCashFlowTrends(
2230
+ data: ReportingControllerGetCashFlowTrendsData
2231
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2208
2232
  return __request(OpenAPI, {
2209
2233
  method: 'GET',
2210
- url: '/api/v1/{region}/bean/transaction-rules',
2234
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2211
2235
  path: {
2212
2236
  region: data.region
2213
2237
  },
2214
2238
  query: {
2215
- limit: data.limit,
2216
- offset: data.offset,
2217
- enabled: data.enabled,
2218
- learningSource: data.learningSource,
2219
- autoApplyEnabled: data.autoApplyEnabled
2239
+ period: data.period,
2240
+ granularity: data.granularity
2220
2241
  },
2221
2242
  errors: {
2222
- 401: 'Unauthorized'
2243
+ 401: 'User not authenticated'
2223
2244
  }
2224
2245
  });
2225
2246
  }
2226
2247
 
2227
2248
  /**
2228
- * Validate transaction rule configuration
2249
+ * Generate portfolio snapshot
2250
+ *
2251
+ * Manually generate a portfolio snapshot for a specific date.
2252
+ *
2253
+ * **Multi-currency Support:**
2254
+ * - Fetches balances grouped by currency
2255
+ * - Uses user's baseCurrency setting for conversion
2256
+ * - Stores exchange rates and warnings
2257
+ *
2258
+ * **Use Cases:**
2259
+ * - Testing snapshot generation
2260
+ * - Force regeneration after data correction
2261
+ * - Initial setup for new users
2262
+ *
2229
2263
  * @param data The data for the request.
2230
2264
  * @param data.region Region code for tenant context
2231
- * @param data.requestBody
2232
- * @returns ValidateRuleResponseDto Validation result
2265
+ * @param data.requestBody Optional date (defaults to today)
2266
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2233
2267
  * @throws ApiError
2234
2268
  */
2235
- public static transactionRuleControllerValidate(
2236
- data: TransactionRuleControllerValidateData
2237
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2269
+ public static reportingControllerGenerateSnapshot(
2270
+ data: ReportingControllerGenerateSnapshotData
2271
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2238
2272
  return __request(OpenAPI, {
2239
2273
  method: 'POST',
2240
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2274
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2241
2275
  path: {
2242
2276
  region: data.region
2243
2277
  },
2244
2278
  body: data.requestBody,
2245
2279
  mediaType: 'application/json',
2246
2280
  errors: {
2247
- 400: 'Validation failed',
2248
- 401: 'Unauthorized'
2281
+ 400: 'Invalid date format',
2282
+ 401: 'User not authenticated'
2249
2283
  }
2250
2284
  });
2251
2285
  }
2252
2286
 
2253
2287
  /**
2254
- * Bulk create transaction rules
2288
+ * Backfill portfolio snapshots
2289
+ *
2290
+ * Generate snapshots for a date range (historical data backfill).
2291
+ *
2292
+ * **Multi-currency Support:**
2293
+ * - Each snapshot includes multi-currency data
2294
+ * - Uses exchange rates available at generation time
2295
+ * - Warnings stored for missing exchange rates
2296
+ *
2297
+ * **Best Practices:**
2298
+ * - Use for initial setup after account configuration
2299
+ * - Run during low-traffic periods for large date ranges
2300
+ * - Existing snapshots are skipped (not regenerated)
2301
+ *
2255
2302
  * @param data The data for the request.
2256
2303
  * @param data.region Region code for tenant context
2257
2304
  * @param data.requestBody
2258
- * @returns BulkCreateRulesResponseDto Bulk create completed
2305
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2259
2306
  * @throws ApiError
2260
2307
  */
2261
- public static transactionRuleControllerBulkCreate(
2262
- data: TransactionRuleControllerBulkCreateData
2263
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2308
+ public static reportingControllerBackfillSnapshots(
2309
+ data: ReportingControllerBackfillSnapshotsData
2310
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2264
2311
  return __request(OpenAPI, {
2265
2312
  method: 'POST',
2266
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2313
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2267
2314
  path: {
2268
2315
  region: data.region
2269
2316
  },
2270
2317
  body: data.requestBody,
2271
2318
  mediaType: 'application/json',
2272
2319
  errors: {
2273
- 400: 'Invalid bulk create data',
2274
- 401: 'Unauthorized'
2320
+ 400: 'Invalid date format or range',
2321
+ 401: 'User not authenticated',
2322
+ 409: 'Backfill already in progress for this user'
2275
2323
  }
2276
2324
  });
2277
2325
  }
2326
+ }
2278
2327
 
2328
+ export class UsersService {
2279
2329
  /**
2280
- * Export transaction rules
2330
+ * Delete own user account
2281
2331
  * @param data The data for the request.
2282
- * @param data.format Export format (currently only JSON supported)
2283
- * @param data.region Region code for tenant context
2284
- * @returns ExportRulesResponseDto Exported rules
2332
+ * @param data.requestBody
2333
+ * @returns void User deleted successfully
2285
2334
  * @throws ApiError
2286
2335
  */
2287
- public static transactionRuleControllerExport(
2288
- data: TransactionRuleControllerExportData
2289
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2336
+ public static userControllerDeleteOwnUser(
2337
+ data: UserControllerDeleteOwnUserData
2338
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2290
2339
  return __request(OpenAPI, {
2291
- method: 'GET',
2292
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2293
- path: {
2294
- format: data.format,
2295
- region: data.region
2296
- },
2340
+ method: 'DELETE',
2341
+ url: '/api/v1/users',
2342
+ body: data.requestBody,
2343
+ mediaType: 'application/json',
2297
2344
  errors: {
2298
- 400: 'Unsupported format',
2299
- 401: 'Unauthorized'
2345
+ 403: 'Invalid access token'
2300
2346
  }
2301
2347
  });
2302
2348
  }
2303
2349
 
2304
2350
  /**
2305
- * Get transaction rule statistics
2351
+ * Get current authenticated user
2306
2352
  * @param data The data for the request.
2307
- * @param data.period Statistics time period
2308
- * @param data.region Region code for tenant context
2309
- * @returns RuleStatisticsResponseDto Rule statistics
2353
+ * @param data.acceptLanguage
2354
+ * @returns UserResponseDto User retrieved successfully
2310
2355
  * @throws ApiError
2311
2356
  */
2312
- public static transactionRuleControllerGetStatistics(
2313
- data: TransactionRuleControllerGetStatisticsData
2314
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2357
+ public static userControllerGetUser(
2358
+ data: UserControllerGetUserData
2359
+ ): CancelablePromise<UserControllerGetUserResponse> {
2315
2360
  return __request(OpenAPI, {
2316
2361
  method: 'GET',
2317
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2318
- path: {
2319
- period: data.period,
2320
- region: data.region
2321
- },
2322
- errors: {
2323
- 401: 'Unauthorized'
2362
+ url: '/api/v1/users',
2363
+ headers: {
2364
+ 'accept-language': data.acceptLanguage
2324
2365
  }
2325
2366
  });
2326
2367
  }
2327
2368
 
2328
2369
  /**
2329
- * Get transaction rule detail
2370
+ * Sign up new user
2371
+ * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2330
2372
  * @param data The data for the request.
2331
- * @param data.ruleId Rule ID
2332
- * @param data.region Region code for tenant context
2333
- * @returns TransactionRuleResponseDto Rule details
2334
- * @throws ApiError
2335
- */
2336
- public static transactionRuleControllerGetDetail(
2337
- data: TransactionRuleControllerGetDetailData
2338
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2339
- return __request(OpenAPI, {
2340
- method: 'GET',
2341
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2342
- path: {
2343
- ruleId: data.ruleId,
2344
- region: data.region
2345
- },
2346
- errors: {
2347
- 401: 'Unauthorized',
2348
- 403: 'Forbidden - not owner of rule',
2349
- 404: 'Rule not found'
2350
- }
2351
- });
2352
- }
2353
-
2354
- /**
2355
- * Update a transaction rule
2356
- * @param data The data for the request.
2357
- * @param data.ruleId Rule ID to update
2358
- * @param data.region Region code for tenant context
2359
- * @param data.requestBody
2360
- * @returns TransactionRuleResponseDto Rule updated successfully
2361
- * @throws ApiError
2362
- */
2363
- public static transactionRuleControllerUpdate(
2364
- data: TransactionRuleControllerUpdateData
2365
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2366
- return __request(OpenAPI, {
2367
- method: 'PUT',
2368
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2369
- path: {
2370
- ruleId: data.ruleId,
2371
- region: data.region
2372
- },
2373
- body: data.requestBody,
2374
- mediaType: 'application/json',
2375
- errors: {
2376
- 400: 'Validation failed',
2377
- 401: 'Unauthorized',
2378
- 403: 'Forbidden - not owner of rule',
2379
- 404: 'Rule not found',
2380
- 409: 'Resource conflict - rule is being modified by another process'
2381
- }
2382
- });
2383
- }
2384
-
2385
- /**
2386
- * Delete a transaction rule
2387
- * @param data The data for the request.
2388
- * @param data.ruleId Rule ID to delete
2389
- * @param data.region Region code for tenant context
2390
- * @returns void Rule deleted successfully
2391
- * @throws ApiError
2392
- */
2393
- public static transactionRuleControllerDelete(
2394
- data: TransactionRuleControllerDeleteData
2395
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2396
- return __request(OpenAPI, {
2397
- method: 'DELETE',
2398
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2399
- path: {
2400
- ruleId: data.ruleId,
2401
- region: data.region
2402
- },
2403
- errors: {
2404
- 401: 'Unauthorized',
2405
- 403: 'Forbidden - not owner of rule',
2406
- 404: 'Rule not found',
2407
- 409: 'Resource conflict - rule is being modified by another process'
2408
- }
2409
- });
2410
- }
2411
-
2412
- /**
2413
- * Test rule matching
2414
- * @param data The data for the request.
2415
- * @param data.ruleId Rule ID to test
2416
- * @param data.region Region code for tenant context
2417
- * @param data.requestBody
2418
- * @returns TestRuleResponseDto Test result
2419
- * @throws ApiError
2420
- */
2421
- public static transactionRuleControllerTest(
2422
- data: TransactionRuleControllerTestData
2423
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2424
- return __request(OpenAPI, {
2425
- method: 'POST',
2426
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2427
- path: {
2428
- ruleId: data.ruleId,
2429
- region: data.region
2430
- },
2431
- body: data.requestBody,
2432
- mediaType: 'application/json',
2433
- errors: {
2434
- 401: 'Unauthorized',
2435
- 403: 'Forbidden - not owner of rule',
2436
- 404: 'Rule not found'
2437
- }
2438
- });
2439
- }
2440
- }
2441
-
2442
- export class UsersService {
2443
- /**
2444
- * Delete own user account
2445
- * @param data The data for the request.
2446
- * @param data.requestBody
2447
- * @returns void User deleted successfully
2448
- * @throws ApiError
2449
- */
2450
- public static userControllerDeleteOwnUser(
2451
- data: UserControllerDeleteOwnUserData
2452
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2453
- return __request(OpenAPI, {
2454
- method: 'DELETE',
2455
- url: '/api/v1/users',
2456
- body: data.requestBody,
2457
- mediaType: 'application/json',
2458
- errors: {
2459
- 403: 'Invalid access token'
2460
- }
2461
- });
2462
- }
2463
-
2464
- /**
2465
- * Get current authenticated user
2466
- * @param data The data for the request.
2467
- * @param data.acceptLanguage
2468
- * @returns unknown User retrieved successfully
2469
- * @throws ApiError
2470
- */
2471
- public static userControllerGetUser(
2472
- data: UserControllerGetUserData
2473
- ): CancelablePromise<UserControllerGetUserResponse> {
2474
- return __request(OpenAPI, {
2475
- method: 'GET',
2476
- url: '/api/v1/users',
2477
- headers: {
2478
- 'accept-language': data.acceptLanguage
2479
- }
2480
- });
2481
- }
2482
-
2483
- /**
2484
- * Sign up new user
2485
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2486
- * @param data The data for the request.
2487
- * @param data.requestBody
2488
- * @returns SignupResponseDto User created successfully
2373
+ * @param data.requestBody
2374
+ * @returns SignupResponseDto User created successfully
2489
2375
  * @throws ApiError
2490
2376
  */
2491
2377
  public static userControllerSignupUser(
@@ -2694,158 +2580,307 @@ export class PropertiesService {
2694
2580
  }
2695
2581
  }
2696
2582
 
2697
- export class ReportingService {
2583
+ export class BeanTransactionRulesService {
2698
2584
  /**
2699
- * Get portfolio value trends
2700
- *
2701
- * Returns time series data of portfolio net worth.
2702
- *
2703
- * **Multi-currency Support:**
2704
- * - `series[].byCurrency` - Currency breakdown for each data point
2705
- * - `byCurrency` - Separate time series grouped by currency
2706
- * - `warnings` - Exchange rate warnings if conversion failed
2707
- *
2708
- * **Parameters:**
2709
- * - `period`: Time period (1m, 3m, 6m, 1y)
2710
- * - `granularity`: Data granularity (day, week, month)
2711
- *
2585
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
2586
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2712
2587
  * @param data The data for the request.
2713
2588
  * @param data.region Region code for tenant context
2714
- * @param data.period Time period
2715
- * @param data.granularity Data granularity
2716
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2589
+ * @param data.requestBody
2590
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2717
2591
  * @throws ApiError
2718
2592
  */
2719
- public static reportingControllerGetPortfolioTrends(
2720
- data: ReportingControllerGetPortfolioTrendsData
2721
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2593
+ public static transactionRuleControllerCreate(
2594
+ data: TransactionRuleControllerCreateData
2595
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2596
+ return __request(OpenAPI, {
2597
+ method: 'POST',
2598
+ url: '/api/v1/{region}/bean/transaction-rules',
2599
+ path: {
2600
+ region: data.region
2601
+ },
2602
+ body: data.requestBody,
2603
+ mediaType: 'application/json',
2604
+ errors: {
2605
+ 400: 'Validation failed',
2606
+ 401: 'Unauthorized',
2607
+ 409: 'Resource conflict - another process is updating this rule'
2608
+ }
2609
+ });
2610
+ }
2611
+
2612
+ /**
2613
+ * Get all transaction rules for user
2614
+ * @param data The data for the request.
2615
+ * @param data.region Region code for tenant context
2616
+ * @param data.limit Max results per page (default: 20, max: 100)
2617
+ * @param data.offset Pagination offset (default: 0)
2618
+ * @param data.enabled Filter by enabled status
2619
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2620
+ * @param data.autoApplyEnabled Filter by auto-apply status
2621
+ * @returns TransactionRuleListResponseDto List of rules
2622
+ * @throws ApiError
2623
+ */
2624
+ public static transactionRuleControllerList(
2625
+ data: TransactionRuleControllerListData
2626
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
2722
2627
  return __request(OpenAPI, {
2723
2628
  method: 'GET',
2724
- url: '/api/v1/{region}/reporting/portfolio/trends',
2629
+ url: '/api/v1/{region}/bean/transaction-rules',
2725
2630
  path: {
2726
2631
  region: data.region
2727
2632
  },
2728
2633
  query: {
2729
- period: data.period,
2730
- granularity: data.granularity
2634
+ limit: data.limit,
2635
+ offset: data.offset,
2636
+ enabled: data.enabled,
2637
+ learningSource: data.learningSource,
2638
+ autoApplyEnabled: data.autoApplyEnabled
2731
2639
  },
2732
2640
  errors: {
2733
- 401: 'User not authenticated'
2641
+ 401: 'Unauthorized'
2734
2642
  }
2735
2643
  });
2736
2644
  }
2737
2645
 
2738
2646
  /**
2739
- * Get cash-flow trends
2740
- *
2741
- * Monthly income / expense / netSavings over a fixed N-month window
2742
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2743
- *
2744
- * **Parameters:**
2745
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
2746
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
2747
- *
2647
+ * Validate transaction rule configuration
2748
2648
  * @param data The data for the request.
2749
2649
  * @param data.region Region code for tenant context
2750
- * @param data.period Time period
2751
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2752
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2650
+ * @param data.requestBody
2651
+ * @returns ValidateRuleResponseDto Validation result
2753
2652
  * @throws ApiError
2754
2653
  */
2755
- public static reportingControllerGetCashFlowTrends(
2756
- data: ReportingControllerGetCashFlowTrendsData
2757
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2654
+ public static transactionRuleControllerValidate(
2655
+ data: TransactionRuleControllerValidateData
2656
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2657
+ return __request(OpenAPI, {
2658
+ method: 'POST',
2659
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
2660
+ path: {
2661
+ region: data.region
2662
+ },
2663
+ body: data.requestBody,
2664
+ mediaType: 'application/json',
2665
+ errors: {
2666
+ 400: 'Validation failed',
2667
+ 401: 'Unauthorized'
2668
+ }
2669
+ });
2670
+ }
2671
+
2672
+ /**
2673
+ * Bulk create transaction rules
2674
+ * @param data The data for the request.
2675
+ * @param data.region Region code for tenant context
2676
+ * @param data.requestBody
2677
+ * @returns BulkCreateRulesResponseDto Bulk create completed
2678
+ * @throws ApiError
2679
+ */
2680
+ public static transactionRuleControllerBulkCreate(
2681
+ data: TransactionRuleControllerBulkCreateData
2682
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2683
+ return __request(OpenAPI, {
2684
+ method: 'POST',
2685
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
2686
+ path: {
2687
+ region: data.region
2688
+ },
2689
+ body: data.requestBody,
2690
+ mediaType: 'application/json',
2691
+ errors: {
2692
+ 400: 'Invalid bulk create data',
2693
+ 401: 'Unauthorized'
2694
+ }
2695
+ });
2696
+ }
2697
+
2698
+ /**
2699
+ * Export transaction rules
2700
+ * @param data The data for the request.
2701
+ * @param data.format Export format (currently only JSON supported)
2702
+ * @param data.region Region code for tenant context
2703
+ * @returns ExportRulesResponseDto Exported rules
2704
+ * @throws ApiError
2705
+ */
2706
+ public static transactionRuleControllerExport(
2707
+ data: TransactionRuleControllerExportData
2708
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
2758
2709
  return __request(OpenAPI, {
2759
2710
  method: 'GET',
2760
- url: '/api/v1/{region}/reporting/cash-flow/trends',
2711
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2761
2712
  path: {
2713
+ format: data.format,
2762
2714
  region: data.region
2763
2715
  },
2764
- query: {
2716
+ errors: {
2717
+ 400: 'Unsupported format',
2718
+ 401: 'Unauthorized'
2719
+ }
2720
+ });
2721
+ }
2722
+
2723
+ /**
2724
+ * Get transaction rule statistics
2725
+ * @param data The data for the request.
2726
+ * @param data.period Statistics time period
2727
+ * @param data.region Region code for tenant context
2728
+ * @returns RuleStatisticsResponseDto Rule statistics
2729
+ * @throws ApiError
2730
+ */
2731
+ public static transactionRuleControllerGetStatistics(
2732
+ data: TransactionRuleControllerGetStatisticsData
2733
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2734
+ return __request(OpenAPI, {
2735
+ method: 'GET',
2736
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2737
+ path: {
2765
2738
  period: data.period,
2766
- granularity: data.granularity
2739
+ region: data.region
2767
2740
  },
2768
2741
  errors: {
2769
- 401: 'User not authenticated'
2742
+ 401: 'Unauthorized'
2770
2743
  }
2771
2744
  });
2772
2745
  }
2773
2746
 
2774
2747
  /**
2775
- * Generate portfolio snapshot
2776
- *
2777
- * Manually generate a portfolio snapshot for a specific date.
2778
- *
2779
- * **Multi-currency Support:**
2780
- * - Fetches balances grouped by currency
2781
- * - Uses user's baseCurrency setting for conversion
2782
- * - Stores exchange rates and warnings
2783
- *
2784
- * **Use Cases:**
2785
- * - Testing snapshot generation
2786
- * - Force regeneration after data correction
2787
- * - Initial setup for new users
2788
- *
2748
+ * Get transaction rule detail
2789
2749
  * @param data The data for the request.
2750
+ * @param data.ruleId Rule ID
2790
2751
  * @param data.region Region code for tenant context
2791
- * @param data.requestBody Optional date (defaults to today)
2792
- * @returns GenerateSnapshotResponse Snapshot generated successfully
2752
+ * @returns TransactionRuleResponseDto Rule details
2793
2753
  * @throws ApiError
2794
2754
  */
2795
- public static reportingControllerGenerateSnapshot(
2796
- data: ReportingControllerGenerateSnapshotData
2797
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2755
+ public static transactionRuleControllerGetDetail(
2756
+ data: TransactionRuleControllerGetDetailData
2757
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2798
2758
  return __request(OpenAPI, {
2799
- method: 'POST',
2800
- url: '/api/v1/{region}/reporting/snapshots/generate',
2759
+ method: 'GET',
2760
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2761
+ path: {
2762
+ ruleId: data.ruleId,
2763
+ region: data.region
2764
+ },
2765
+ errors: {
2766
+ 401: 'Unauthorized',
2767
+ 403: 'Forbidden - not owner of rule',
2768
+ 404: 'Rule not found'
2769
+ }
2770
+ });
2771
+ }
2772
+
2773
+ /**
2774
+ * Update a transaction rule
2775
+ * @param data The data for the request.
2776
+ * @param data.ruleId Rule ID to update
2777
+ * @param data.region Region code for tenant context
2778
+ * @param data.requestBody
2779
+ * @returns TransactionRuleResponseDto Rule updated successfully
2780
+ * @throws ApiError
2781
+ */
2782
+ public static transactionRuleControllerUpdate(
2783
+ data: TransactionRuleControllerUpdateData
2784
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2785
+ return __request(OpenAPI, {
2786
+ method: 'PUT',
2787
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2801
2788
  path: {
2789
+ ruleId: data.ruleId,
2802
2790
  region: data.region
2803
2791
  },
2804
2792
  body: data.requestBody,
2805
2793
  mediaType: 'application/json',
2806
2794
  errors: {
2807
- 400: 'Invalid date format',
2808
- 401: 'User not authenticated'
2795
+ 400: 'Validation failed',
2796
+ 401: 'Unauthorized',
2797
+ 403: 'Forbidden - not owner of rule',
2798
+ 404: 'Rule not found',
2799
+ 409: 'Resource conflict - rule is being modified by another process'
2809
2800
  }
2810
2801
  });
2811
2802
  }
2812
2803
 
2813
2804
  /**
2814
- * Backfill portfolio snapshots
2815
- *
2816
- * Generate snapshots for a date range (historical data backfill).
2817
- *
2818
- * **Multi-currency Support:**
2819
- * - Each snapshot includes multi-currency data
2820
- * - Uses exchange rates available at generation time
2821
- * - Warnings stored for missing exchange rates
2822
- *
2823
- * **Best Practices:**
2824
- * - Use for initial setup after account configuration
2825
- * - Run during low-traffic periods for large date ranges
2826
- * - Existing snapshots are skipped (not regenerated)
2827
- *
2805
+ * Delete a transaction rule
2828
2806
  * @param data The data for the request.
2807
+ * @param data.ruleId Rule ID to delete
2808
+ * @param data.region Region code for tenant context
2809
+ * @returns void Rule deleted successfully
2810
+ * @throws ApiError
2811
+ */
2812
+ public static transactionRuleControllerDelete(
2813
+ data: TransactionRuleControllerDeleteData
2814
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2815
+ return __request(OpenAPI, {
2816
+ method: 'DELETE',
2817
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2818
+ path: {
2819
+ ruleId: data.ruleId,
2820
+ region: data.region
2821
+ },
2822
+ errors: {
2823
+ 401: 'Unauthorized',
2824
+ 403: 'Forbidden - not owner of rule',
2825
+ 404: 'Rule not found',
2826
+ 409: 'Resource conflict - rule is being modified by another process'
2827
+ }
2828
+ });
2829
+ }
2830
+
2831
+ /**
2832
+ * Test rule matching
2833
+ * @param data The data for the request.
2834
+ * @param data.ruleId Rule ID to test
2829
2835
  * @param data.region Region code for tenant context
2830
2836
  * @param data.requestBody
2831
- * @returns BackfillSnapshotsResponse Backfill completed successfully
2837
+ * @returns TestRuleResponseDto Test result
2832
2838
  * @throws ApiError
2833
2839
  */
2834
- public static reportingControllerBackfillSnapshots(
2835
- data: ReportingControllerBackfillSnapshotsData
2836
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2840
+ public static transactionRuleControllerTest(
2841
+ data: TransactionRuleControllerTestData
2842
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
2837
2843
  return __request(OpenAPI, {
2838
2844
  method: 'POST',
2839
- url: '/api/v1/{region}/reporting/snapshots/backfill',
2845
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2840
2846
  path: {
2847
+ ruleId: data.ruleId,
2841
2848
  region: data.region
2842
2849
  },
2843
2850
  body: data.requestBody,
2844
2851
  mediaType: 'application/json',
2845
2852
  errors: {
2846
- 400: 'Invalid date format or range',
2847
- 401: 'User not authenticated',
2848
- 409: 'Backfill already in progress for this user'
2853
+ 401: 'Unauthorized',
2854
+ 403: 'Forbidden - not owner of rule',
2855
+ 404: 'Rule not found'
2856
+ }
2857
+ });
2858
+ }
2859
+ }
2860
+
2861
+ export class BeanCategoryCatalogService {
2862
+ /**
2863
+ * List category catalog for a region
2864
+ * Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2865
+ * @param data The data for the request.
2866
+ * @param data.region Region code for tenant context
2867
+ * @param data.scenario Filter by scenario
2868
+ * @param data.routeBearing Filter by routeBearing (entity-router route() consumes it)
2869
+ * @returns CategoryCatalogListResponseDto Category catalog retrieved successfully
2870
+ * @throws ApiError
2871
+ */
2872
+ public static categoryCatalogControllerList(
2873
+ data: CategoryCatalogControllerListData
2874
+ ): CancelablePromise<CategoryCatalogControllerListResponse> {
2875
+ return __request(OpenAPI, {
2876
+ method: 'GET',
2877
+ url: '/api/v1/{region}/bean/categories',
2878
+ path: {
2879
+ region: data.region
2880
+ },
2881
+ query: {
2882
+ scenario: data.scenario,
2883
+ routeBearing: data.routeBearing
2849
2884
  }
2850
2885
  });
2851
2886
  }
@@ -3726,13 +3761,20 @@ export class BeanPlatformsService {
3726
3761
 
3727
3762
  /**
3728
3763
  * Get platform list for current user
3764
+ * @param data The data for the request.
3765
+ * @param data.region Region code (ISO 3166-1 alpha-2) that biases within-type-bucket ordering (local-region platforms first). Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
3729
3766
  * @returns PlatformListItemDto List of platforms with user binding status
3730
3767
  * @throws ApiError
3731
3768
  */
3732
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3769
+ public static platformControllerGetPlatformList(
3770
+ data: PlatformControllerGetPlatformListData = {}
3771
+ ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3733
3772
  return __request(OpenAPI, {
3734
3773
  method: 'GET',
3735
- url: '/api/v1/bean/platforms/list'
3774
+ url: '/api/v1/bean/platforms/list',
3775
+ query: {
3776
+ region: data.region
3777
+ }
3736
3778
  });
3737
3779
  }
3738
3780
 
@@ -3740,7 +3782,7 @@ export class BeanPlatformsService {
3740
3782
  * Match platforms by name or alias
3741
3783
  * @param data The data for the request.
3742
3784
  * @param data.q Search query — Chinese name, English name, or abbreviation
3743
- * @param data.region Region code for category override lookup
3785
+ * @param data.region Region code (ISO 3166-1 alpha-2) that biases within-tier ordering (local-region platforms first); also the intended categoryOverrides key. Case-insensitive — stored/compared UPPERCASE ("cn" == "CN").
3744
3786
  * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3745
3787
  * @throws ApiError
3746
3788
  */
@@ -4169,3 +4211,53 @@ export class InfoService {
4169
4211
  });
4170
4212
  }
4171
4213
  }
4214
+
4215
+ export class MarketDataService {
4216
+ /**
4217
+ * Search market symbols by name or code
4218
+ * Ranked search over the openbb catalog. Empty `q` returns [].
4219
+ * @param data The data for the request.
4220
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4221
+ * @param data.limit Maximum number of results (clamped 1..50)
4222
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4223
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4224
+ * @returns SymbolSearchResultDto Ranked search results
4225
+ * @throws ApiError
4226
+ */
4227
+ public static symbolControllerSearch(
4228
+ data: SymbolControllerSearchData
4229
+ ): CancelablePromise<SymbolControllerSearchResponse> {
4230
+ return __request(OpenAPI, {
4231
+ method: 'GET',
4232
+ url: '/api/v1/market/symbols/search',
4233
+ query: {
4234
+ q: data.q,
4235
+ limit: data.limit,
4236
+ exchange: data.exchange,
4237
+ assetType: data.assetType
4238
+ }
4239
+ });
4240
+ }
4241
+
4242
+ /**
4243
+ * Get a market symbol quote
4244
+ * @param data The data for the request.
4245
+ * @param data.symbol
4246
+ * @returns SymbolQuoteDto Symbol quote
4247
+ * @throws ApiError
4248
+ */
4249
+ public static symbolControllerGetQuote(
4250
+ data: SymbolControllerGetQuoteData
4251
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
4252
+ return __request(OpenAPI, {
4253
+ method: 'GET',
4254
+ url: '/api/v1/market/symbols/{symbol}/quote',
4255
+ path: {
4256
+ symbol: data.symbol
4257
+ },
4258
+ errors: {
4259
+ 404: 'Symbol not found in the openbb catalog'
4260
+ }
4261
+ });
4262
+ }
4263
+ }