@firela/api-types 0.0.0-canary.a90ce0e4 → 0.0.0-canary.aa5c64ec

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,6 +173,26 @@ import type {
185
173
  PropertyControllerUpdateResponse,
186
174
  PropertyControllerDeleteData,
187
175
  PropertyControllerDeleteResponse,
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,
188
196
  EventControllerCreateData,
189
197
  EventControllerCreateResponse,
190
198
  EventControllerFindAllData,
@@ -249,6 +257,7 @@ import type {
249
257
  PlatformControllerFindAllResponse,
250
258
  PlatformControllerCreateData,
251
259
  PlatformControllerCreateResponse,
260
+ PlatformControllerGetPlatformListData,
252
261
  PlatformControllerGetPlatformListResponse,
253
262
  PlatformControllerMatchPlatformsData,
254
263
  PlatformControllerMatchPlatformsResponse,
@@ -266,14 +275,6 @@ import type {
266
275
  DashboardControllerGetExpensesResponse,
267
276
  HoldingPnlControllerGetHoldingPnlData,
268
277
  HoldingPnlControllerGetHoldingPnlResponse,
269
- ReportingControllerGetPortfolioTrendsData,
270
- ReportingControllerGetPortfolioTrendsResponse,
271
- ReportingControllerGetCashFlowTrendsData,
272
- ReportingControllerGetCashFlowTrendsResponse,
273
- ReportingControllerGenerateSnapshotData,
274
- ReportingControllerGenerateSnapshotResponse,
275
- ReportingControllerBackfillSnapshotsData,
276
- ReportingControllerBackfillSnapshotsResponse,
277
278
  ApiKeysControllerCreateApiKeyResponse,
278
279
  AuthControllerAccessTokenLoginData,
279
280
  AuthControllerAccessTokenLoginResponse,
@@ -288,7 +289,11 @@ import type {
288
289
  HealthControllerResetCircuitBreakerData,
289
290
  HealthControllerResetCircuitBreakerResponse,
290
291
  HealthControllerGetMetricsResponse,
291
- InfoControllerGetInfoResponse
292
+ InfoControllerGetInfoResponse,
293
+ SymbolControllerSearchData,
294
+ SymbolControllerSearchResponse,
295
+ SymbolControllerGetQuoteData,
296
+ SymbolControllerGetQuoteResponse
292
297
  } from './types.gen';
293
298
 
294
299
  export class BeanAccountsService {
@@ -407,7 +412,7 @@ export class BeanAccountsService {
407
412
 
408
413
  /**
409
414
  * Delete account
410
- * Deletes an account (only if no transactions)
415
+ * Deletes an account (only if no active transactions; voided/superseded residual postings are cleaned up)
411
416
  * @param data The data for the request.
412
417
  * @param data.id Account UUID
413
418
  * @param data.region Region code for tenant context
@@ -426,7 +431,7 @@ export class BeanAccountsService {
426
431
  },
427
432
  errors: {
428
433
  404: 'Account not found',
429
- 409: 'Account has transactions and cannot be deleted'
434
+ 409: 'Account has active transactions and cannot be deleted'
430
435
  }
431
436
  });
432
437
  }
@@ -2161,534 +2166,691 @@ export class RecurringForecastService {
2161
2166
  }
2162
2167
  }
2163
2168
 
2164
- export class BeanTransactionRulesService {
2169
+ export class ReportingService {
2165
2170
  /**
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.
2171
+ * Get portfolio value trends
2172
+ *
2173
+ * Returns time series data of portfolio net worth.
2174
+ *
2175
+ * **Multi-currency Support:**
2176
+ * - `series[].byCurrency` - Currency breakdown for each data point
2177
+ * - `byCurrency` - Separate time series grouped by currency
2178
+ * - `warnings` - Exchange rate warnings if conversion failed
2179
+ *
2180
+ * **Parameters:**
2181
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2182
+ * - `granularity`: Data granularity (day, week, month)
2183
+ *
2168
2184
  * @param data The data for the request.
2169
2185
  * @param data.region Region code for tenant context
2170
- * @param data.requestBody
2171
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2186
+ * @param data.period Time period
2187
+ * @param data.granularity Data granularity
2188
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2172
2189
  * @throws ApiError
2173
2190
  */
2174
- public static transactionRuleControllerCreate(
2175
- data: TransactionRuleControllerCreateData
2176
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2191
+ public static reportingControllerGetPortfolioTrends(
2192
+ data: ReportingControllerGetPortfolioTrendsData
2193
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2177
2194
  return __request(OpenAPI, {
2178
- method: 'POST',
2179
- url: '/api/v1/{region}/bean/transaction-rules',
2195
+ method: 'GET',
2196
+ url: '/api/v1/{region}/reporting/portfolio/trends',
2180
2197
  path: {
2181
2198
  region: data.region
2182
2199
  },
2183
- body: data.requestBody,
2184
- mediaType: 'application/json',
2200
+ query: {
2201
+ period: data.period,
2202
+ granularity: data.granularity
2203
+ },
2185
2204
  errors: {
2186
- 400: 'Validation failed',
2187
- 401: 'Unauthorized',
2188
- 409: 'Resource conflict - another process is updating this rule'
2205
+ 401: 'User not authenticated'
2189
2206
  }
2190
2207
  });
2191
2208
  }
2192
2209
 
2193
2210
  /**
2194
- * Get all transaction rules for user
2211
+ * Get cash-flow trends
2212
+ *
2213
+ * Monthly income / expense / netSavings over a fixed N-month window
2214
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2215
+ *
2216
+ * **Parameters:**
2217
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2218
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2219
+ *
2195
2220
  * @param data The data for the request.
2196
2221
  * @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
2222
+ * @param data.period Time period
2223
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2224
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2203
2225
  * @throws ApiError
2204
2226
  */
2205
- public static transactionRuleControllerList(
2206
- data: TransactionRuleControllerListData
2207
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2227
+ public static reportingControllerGetCashFlowTrends(
2228
+ data: ReportingControllerGetCashFlowTrendsData
2229
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2208
2230
  return __request(OpenAPI, {
2209
2231
  method: 'GET',
2210
- url: '/api/v1/{region}/bean/transaction-rules',
2232
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2211
2233
  path: {
2212
2234
  region: data.region
2213
2235
  },
2214
2236
  query: {
2215
- limit: data.limit,
2216
- offset: data.offset,
2217
- enabled: data.enabled,
2218
- learningSource: data.learningSource,
2219
- autoApplyEnabled: data.autoApplyEnabled
2237
+ period: data.period,
2238
+ granularity: data.granularity
2220
2239
  },
2221
2240
  errors: {
2222
- 401: 'Unauthorized'
2241
+ 401: 'User not authenticated'
2223
2242
  }
2224
2243
  });
2225
2244
  }
2226
2245
 
2227
2246
  /**
2228
- * Validate transaction rule configuration
2247
+ * Generate portfolio snapshot
2248
+ *
2249
+ * Manually generate a portfolio snapshot for a specific date.
2250
+ *
2251
+ * **Multi-currency Support:**
2252
+ * - Fetches balances grouped by currency
2253
+ * - Uses user's baseCurrency setting for conversion
2254
+ * - Stores exchange rates and warnings
2255
+ *
2256
+ * **Use Cases:**
2257
+ * - Testing snapshot generation
2258
+ * - Force regeneration after data correction
2259
+ * - Initial setup for new users
2260
+ *
2229
2261
  * @param data The data for the request.
2230
2262
  * @param data.region Region code for tenant context
2231
- * @param data.requestBody
2232
- * @returns ValidateRuleResponseDto Validation result
2263
+ * @param data.requestBody Optional date (defaults to today)
2264
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2233
2265
  * @throws ApiError
2234
2266
  */
2235
- public static transactionRuleControllerValidate(
2236
- data: TransactionRuleControllerValidateData
2237
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2267
+ public static reportingControllerGenerateSnapshot(
2268
+ data: ReportingControllerGenerateSnapshotData
2269
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2238
2270
  return __request(OpenAPI, {
2239
2271
  method: 'POST',
2240
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2272
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2241
2273
  path: {
2242
2274
  region: data.region
2243
2275
  },
2244
2276
  body: data.requestBody,
2245
2277
  mediaType: 'application/json',
2246
2278
  errors: {
2247
- 400: 'Validation failed',
2248
- 401: 'Unauthorized'
2279
+ 400: 'Invalid date format',
2280
+ 401: 'User not authenticated'
2249
2281
  }
2250
2282
  });
2251
2283
  }
2252
2284
 
2253
2285
  /**
2254
- * Bulk create transaction rules
2286
+ * Backfill portfolio snapshots
2287
+ *
2288
+ * Generate snapshots for a date range (historical data backfill).
2289
+ *
2290
+ * **Multi-currency Support:**
2291
+ * - Each snapshot includes multi-currency data
2292
+ * - Uses exchange rates available at generation time
2293
+ * - Warnings stored for missing exchange rates
2294
+ *
2295
+ * **Best Practices:**
2296
+ * - Use for initial setup after account configuration
2297
+ * - Run during low-traffic periods for large date ranges
2298
+ * - Existing snapshots are skipped (not regenerated)
2299
+ *
2255
2300
  * @param data The data for the request.
2256
2301
  * @param data.region Region code for tenant context
2257
2302
  * @param data.requestBody
2258
- * @returns BulkCreateRulesResponseDto Bulk create completed
2303
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2259
2304
  * @throws ApiError
2260
2305
  */
2261
- public static transactionRuleControllerBulkCreate(
2262
- data: TransactionRuleControllerBulkCreateData
2263
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2306
+ public static reportingControllerBackfillSnapshots(
2307
+ data: ReportingControllerBackfillSnapshotsData
2308
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2264
2309
  return __request(OpenAPI, {
2265
2310
  method: 'POST',
2266
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2311
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2267
2312
  path: {
2268
2313
  region: data.region
2269
2314
  },
2270
2315
  body: data.requestBody,
2271
2316
  mediaType: 'application/json',
2272
2317
  errors: {
2273
- 400: 'Invalid bulk create data',
2274
- 401: 'Unauthorized'
2318
+ 400: 'Invalid date format or range',
2319
+ 401: 'User not authenticated',
2320
+ 409: 'Backfill already in progress for this user'
2275
2321
  }
2276
2322
  });
2277
2323
  }
2324
+ }
2278
2325
 
2326
+ export class UsersService {
2279
2327
  /**
2280
- * Export transaction rules
2328
+ * Delete own user account
2281
2329
  * @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
2330
+ * @param data.requestBody
2331
+ * @returns void User deleted successfully
2285
2332
  * @throws ApiError
2286
2333
  */
2287
- public static transactionRuleControllerExport(
2288
- data: TransactionRuleControllerExportData
2289
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2334
+ public static userControllerDeleteOwnUser(
2335
+ data: UserControllerDeleteOwnUserData
2336
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2290
2337
  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
- },
2338
+ method: 'DELETE',
2339
+ url: '/api/v1/users',
2340
+ body: data.requestBody,
2341
+ mediaType: 'application/json',
2297
2342
  errors: {
2298
- 400: 'Unsupported format',
2299
- 401: 'Unauthorized'
2343
+ 403: 'Invalid access token'
2300
2344
  }
2301
2345
  });
2302
2346
  }
2303
2347
 
2304
2348
  /**
2305
- * Get transaction rule statistics
2349
+ * Get current authenticated user
2306
2350
  * @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
2351
+ * @param data.acceptLanguage
2352
+ * @returns unknown User retrieved successfully
2310
2353
  * @throws ApiError
2311
2354
  */
2312
- public static transactionRuleControllerGetStatistics(
2313
- data: TransactionRuleControllerGetStatisticsData
2314
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2355
+ public static userControllerGetUser(
2356
+ data: UserControllerGetUserData
2357
+ ): CancelablePromise<UserControllerGetUserResponse> {
2315
2358
  return __request(OpenAPI, {
2316
2359
  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'
2360
+ url: '/api/v1/users',
2361
+ headers: {
2362
+ 'accept-language': data.acceptLanguage
2324
2363
  }
2325
2364
  });
2326
2365
  }
2327
2366
 
2328
2367
  /**
2329
- * Get transaction rule detail
2368
+ * Sign up new user
2369
+ * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
2330
2370
  * @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
2371
+ * @param data.requestBody
2372
+ * @returns SignupResponseDto User created successfully
2334
2373
  * @throws ApiError
2335
2374
  */
2336
- public static transactionRuleControllerGetDetail(
2337
- data: TransactionRuleControllerGetDetailData
2338
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2375
+ public static userControllerSignupUser(
2376
+ data: UserControllerSignupUserData
2377
+ ): CancelablePromise<UserControllerSignupUserResponse> {
2378
+ return __request(OpenAPI, {
2379
+ method: 'POST',
2380
+ url: '/api/v1/users',
2381
+ body: data.requestBody,
2382
+ mediaType: 'application/json',
2383
+ errors: {
2384
+ 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2385
+ 403: 'User signup is disabled'
2386
+ }
2387
+ });
2388
+ }
2389
+
2390
+ /**
2391
+ * Delete user by ID (admin only)
2392
+ * @param data The data for the request.
2393
+ * @param data.id User ID to delete
2394
+ * @returns void User deleted successfully
2395
+ * @throws ApiError
2396
+ */
2397
+ public static userControllerDeleteUser(
2398
+ data: UserControllerDeleteUserData
2399
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
2400
+ return __request(OpenAPI, {
2401
+ method: 'DELETE',
2402
+ url: '/api/v1/users/{id}',
2403
+ path: {
2404
+ id: data.id
2405
+ },
2406
+ errors: {
2407
+ 403: 'Cannot delete own account or insufficient permissions'
2408
+ }
2409
+ });
2410
+ }
2411
+
2412
+ /**
2413
+ * Get user info by user ID
2414
+ * @param data The data for the request.
2415
+ * @param data.id User ID
2416
+ * @returns unknown User info retrieved successfully
2417
+ * @throws ApiError
2418
+ */
2419
+ public static userControllerGetUserInfo(
2420
+ data: UserControllerGetUserInfoData
2421
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
2339
2422
  return __request(OpenAPI, {
2340
2423
  method: 'GET',
2341
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2424
+ url: '/api/v1/users/{id}/info',
2342
2425
  path: {
2343
- ruleId: data.ruleId,
2344
- region: data.region
2426
+ id: data.id
2345
2427
  },
2346
2428
  errors: {
2347
- 401: 'Unauthorized',
2348
- 403: 'Forbidden - not owner of rule',
2349
- 404: 'Rule not found'
2429
+ 403: 'Cannot access other user info without admin permission'
2350
2430
  }
2351
2431
  });
2352
2432
  }
2353
2433
 
2354
2434
  /**
2355
- * Update a transaction rule
2435
+ * Update user settings
2356
2436
  * @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
2437
  * @param data.requestBody
2360
- * @returns TransactionRuleResponseDto Rule updated successfully
2438
+ * @returns unknown Settings updated successfully
2361
2439
  * @throws ApiError
2362
2440
  */
2363
- public static transactionRuleControllerUpdate(
2364
- data: TransactionRuleControllerUpdateData
2365
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2441
+ public static userControllerUpdateUserSetting(
2442
+ data: UserControllerUpdateUserSettingData
2443
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
2366
2444
  return __request(OpenAPI, {
2367
2445
  method: 'PUT',
2368
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2369
- path: {
2370
- ruleId: data.ruleId,
2371
- region: data.region
2372
- },
2446
+ url: '/api/v1/users/setting',
2373
2447
  body: data.requestBody,
2374
2448
  mediaType: 'application/json',
2375
2449
  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'
2450
+ 403: 'Insufficient permissions'
2381
2451
  }
2382
2452
  });
2383
2453
  }
2384
2454
 
2385
2455
  /**
2386
- * Delete a transaction rule
2456
+ * Get all user settings paginated (admin only)
2387
2457
  * @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
2458
+ * @param data.pageNo Page number
2459
+ * @param data.pageSize Page size
2460
+ * @returns unknown Settings list retrieved successfully
2391
2461
  * @throws ApiError
2392
2462
  */
2393
- public static transactionRuleControllerDelete(
2394
- data: TransactionRuleControllerDeleteData
2395
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2463
+ public static userControllerGetAllUserSettingsByPage(
2464
+ data: UserControllerGetAllUserSettingsByPageData
2465
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
2396
2466
  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
- },
2467
+ method: 'GET',
2468
+ url: '/api/v1/users/settings-by-page',
2469
+ query: {
2470
+ pageNo: data.pageNo,
2471
+ pageSize: data.pageSize
2472
+ }
2473
+ });
2474
+ }
2475
+
2476
+ /**
2477
+ * Get asset and liability summary for current user
2478
+ * @returns unknown Summary retrieved successfully
2479
+ * @throws ApiError
2480
+ */
2481
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2482
+ return __request(OpenAPI, {
2483
+ method: 'GET',
2484
+ url: '/api/v1/users/asset-liability-summary'
2485
+ });
2486
+ }
2487
+ }
2488
+
2489
+ export class PropertiesService {
2490
+ /**
2491
+ * Get all system properties
2492
+ * @returns unknown Properties retrieved successfully
2493
+ * @throws ApiError
2494
+ */
2495
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2496
+ return __request(OpenAPI, {
2497
+ method: 'GET',
2498
+ url: '/api/v1/admin/properties',
2403
2499
  errors: {
2404
2500
  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'
2501
+ 403: 'Forbidden - insufficient permissions'
2408
2502
  }
2409
2503
  });
2410
2504
  }
2411
2505
 
2412
2506
  /**
2413
- * Test rule matching
2507
+ * Get property by key
2414
2508
  * @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
2509
+ * @param data.key Property key
2510
+ * @returns unknown Property retrieved successfully
2419
2511
  * @throws ApiError
2420
2512
  */
2421
- public static transactionRuleControllerTest(
2422
- data: TransactionRuleControllerTestData
2423
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2513
+ public static propertyControllerGetByKey(
2514
+ data: PropertyControllerGetByKeyData
2515
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2424
2516
  return __request(OpenAPI, {
2425
- method: 'POST',
2426
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2517
+ method: 'GET',
2518
+ url: '/api/v1/admin/properties/{key}',
2427
2519
  path: {
2428
- ruleId: data.ruleId,
2429
- region: data.region
2520
+ key: data.key
2430
2521
  },
2431
- body: data.requestBody,
2432
- mediaType: 'application/json',
2433
2522
  errors: {
2434
2523
  401: 'Unauthorized',
2435
- 403: 'Forbidden - not owner of rule',
2436
- 404: 'Rule not found'
2524
+ 403: 'Forbidden - insufficient permissions',
2525
+ 404: 'Property not found'
2437
2526
  }
2438
2527
  });
2439
2528
  }
2440
- }
2441
2529
 
2442
- export class UsersService {
2443
2530
  /**
2444
- * Delete own user account
2531
+ * Update a system property
2445
2532
  * @param data The data for the request.
2533
+ * @param data.key Property key
2446
2534
  * @param data.requestBody
2447
- * @returns void User deleted successfully
2535
+ * @returns unknown Property updated successfully
2448
2536
  * @throws ApiError
2449
2537
  */
2450
- public static userControllerDeleteOwnUser(
2451
- data: UserControllerDeleteOwnUserData
2452
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
2538
+ public static propertyControllerUpdate(
2539
+ data: PropertyControllerUpdateData
2540
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
2453
2541
  return __request(OpenAPI, {
2454
- method: 'DELETE',
2455
- url: '/api/v1/users',
2542
+ method: 'PUT',
2543
+ url: '/api/v1/admin/properties/{key}',
2544
+ path: {
2545
+ key: data.key
2546
+ },
2456
2547
  body: data.requestBody,
2457
2548
  mediaType: 'application/json',
2458
2549
  errors: {
2459
- 403: 'Invalid access token'
2550
+ 401: 'Unauthorized',
2551
+ 403: 'Forbidden - insufficient permissions'
2460
2552
  }
2461
2553
  });
2462
2554
  }
2463
2555
 
2464
2556
  /**
2465
- * Get current authenticated user
2557
+ * Delete a system property
2466
2558
  * @param data The data for the request.
2467
- * @param data.acceptLanguage
2468
- * @returns unknown User retrieved successfully
2559
+ * @param data.key Property key
2560
+ * @returns void Property deleted successfully
2469
2561
  * @throws ApiError
2470
2562
  */
2471
- public static userControllerGetUser(
2472
- data: UserControllerGetUserData
2473
- ): CancelablePromise<UserControllerGetUserResponse> {
2563
+ public static propertyControllerDelete(
2564
+ data: PropertyControllerDeleteData
2565
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
2474
2566
  return __request(OpenAPI, {
2475
- method: 'GET',
2476
- url: '/api/v1/users',
2477
- headers: {
2478
- 'accept-language': data.acceptLanguage
2567
+ method: 'DELETE',
2568
+ url: '/api/v1/admin/properties/{key}',
2569
+ path: {
2570
+ key: data.key
2571
+ },
2572
+ errors: {
2573
+ 401: 'Unauthorized',
2574
+ 403: 'Forbidden - insufficient permissions',
2575
+ 404: 'Property not found'
2479
2576
  }
2480
2577
  });
2481
2578
  }
2579
+ }
2482
2580
 
2581
+ export class BeanTransactionRulesService {
2483
2582
  /**
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).
2583
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
2584
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2486
2585
  * @param data The data for the request.
2586
+ * @param data.region Region code for tenant context
2487
2587
  * @param data.requestBody
2488
- * @returns unknown User created successfully
2588
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2489
2589
  * @throws ApiError
2490
2590
  */
2491
- public static userControllerSignupUser(
2492
- data: UserControllerSignupUserData
2493
- ): CancelablePromise<UserControllerSignupUserResponse> {
2591
+ public static transactionRuleControllerCreate(
2592
+ data: TransactionRuleControllerCreateData
2593
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2494
2594
  return __request(OpenAPI, {
2495
2595
  method: 'POST',
2496
- url: '/api/v1/users',
2596
+ url: '/api/v1/{region}/bean/transaction-rules',
2597
+ path: {
2598
+ region: data.region
2599
+ },
2497
2600
  body: data.requestBody,
2498
2601
  mediaType: 'application/json',
2499
2602
  errors: {
2500
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
2501
- 403: 'User signup is disabled'
2603
+ 400: 'Validation failed',
2604
+ 401: 'Unauthorized',
2605
+ 409: 'Resource conflict - another process is updating this rule'
2502
2606
  }
2503
2607
  });
2504
2608
  }
2505
2609
 
2506
2610
  /**
2507
- * Delete user by ID (admin only)
2611
+ * Get all transaction rules for user
2508
2612
  * @param data The data for the request.
2509
- * @param data.id User ID to delete
2510
- * @returns void User deleted successfully
2613
+ * @param data.region Region code for tenant context
2614
+ * @param data.limit Max results per page (default: 20, max: 100)
2615
+ * @param data.offset Pagination offset (default: 0)
2616
+ * @param data.enabled Filter by enabled status
2617
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2618
+ * @param data.autoApplyEnabled Filter by auto-apply status
2619
+ * @returns TransactionRuleListResponseDto List of rules
2511
2620
  * @throws ApiError
2512
2621
  */
2513
- public static userControllerDeleteUser(
2514
- data: UserControllerDeleteUserData
2515
- ): CancelablePromise<UserControllerDeleteUserResponse> {
2622
+ public static transactionRuleControllerList(
2623
+ data: TransactionRuleControllerListData
2624
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
2516
2625
  return __request(OpenAPI, {
2517
- method: 'DELETE',
2518
- url: '/api/v1/users/{id}',
2626
+ method: 'GET',
2627
+ url: '/api/v1/{region}/bean/transaction-rules',
2519
2628
  path: {
2520
- id: data.id
2629
+ region: data.region
2630
+ },
2631
+ query: {
2632
+ limit: data.limit,
2633
+ offset: data.offset,
2634
+ enabled: data.enabled,
2635
+ learningSource: data.learningSource,
2636
+ autoApplyEnabled: data.autoApplyEnabled
2521
2637
  },
2522
2638
  errors: {
2523
- 403: 'Cannot delete own account or insufficient permissions'
2639
+ 401: 'Unauthorized'
2524
2640
  }
2525
2641
  });
2526
2642
  }
2527
2643
 
2528
2644
  /**
2529
- * Get user info by user ID
2645
+ * Validate transaction rule configuration
2530
2646
  * @param data The data for the request.
2531
- * @param data.id User ID
2532
- * @returns unknown User info retrieved successfully
2647
+ * @param data.region Region code for tenant context
2648
+ * @param data.requestBody
2649
+ * @returns ValidateRuleResponseDto Validation result
2533
2650
  * @throws ApiError
2534
2651
  */
2535
- public static userControllerGetUserInfo(
2536
- data: UserControllerGetUserInfoData
2537
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
2652
+ public static transactionRuleControllerValidate(
2653
+ data: TransactionRuleControllerValidateData
2654
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2538
2655
  return __request(OpenAPI, {
2539
- method: 'GET',
2540
- url: '/api/v1/users/{id}/info',
2656
+ method: 'POST',
2657
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
2541
2658
  path: {
2542
- id: data.id
2659
+ region: data.region
2543
2660
  },
2661
+ body: data.requestBody,
2662
+ mediaType: 'application/json',
2544
2663
  errors: {
2545
- 403: 'Cannot access other user info without admin permission'
2664
+ 400: 'Validation failed',
2665
+ 401: 'Unauthorized'
2546
2666
  }
2547
2667
  });
2548
2668
  }
2549
2669
 
2550
2670
  /**
2551
- * Update user settings
2671
+ * Bulk create transaction rules
2552
2672
  * @param data The data for the request.
2673
+ * @param data.region Region code for tenant context
2553
2674
  * @param data.requestBody
2554
- * @returns unknown Settings updated successfully
2675
+ * @returns BulkCreateRulesResponseDto Bulk create completed
2555
2676
  * @throws ApiError
2556
2677
  */
2557
- public static userControllerUpdateUserSetting(
2558
- data: UserControllerUpdateUserSettingData
2559
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
2678
+ public static transactionRuleControllerBulkCreate(
2679
+ data: TransactionRuleControllerBulkCreateData
2680
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2560
2681
  return __request(OpenAPI, {
2561
- method: 'PUT',
2562
- url: '/api/v1/users/setting',
2682
+ method: 'POST',
2683
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
2684
+ path: {
2685
+ region: data.region
2686
+ },
2563
2687
  body: data.requestBody,
2564
2688
  mediaType: 'application/json',
2565
2689
  errors: {
2566
- 403: 'Insufficient permissions'
2690
+ 400: 'Invalid bulk create data',
2691
+ 401: 'Unauthorized'
2567
2692
  }
2568
2693
  });
2569
2694
  }
2570
2695
 
2571
2696
  /**
2572
- * Get all user settings paginated (admin only)
2697
+ * Export transaction rules
2573
2698
  * @param data The data for the request.
2574
- * @param data.pageNo Page number
2575
- * @param data.pageSize Page size
2576
- * @returns unknown Settings list retrieved successfully
2699
+ * @param data.format Export format (currently only JSON supported)
2700
+ * @param data.region Region code for tenant context
2701
+ * @returns ExportRulesResponseDto Exported rules
2577
2702
  * @throws ApiError
2578
2703
  */
2579
- public static userControllerGetAllUserSettingsByPage(
2580
- data: UserControllerGetAllUserSettingsByPageData
2581
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
2704
+ public static transactionRuleControllerExport(
2705
+ data: TransactionRuleControllerExportData
2706
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
2582
2707
  return __request(OpenAPI, {
2583
2708
  method: 'GET',
2584
- url: '/api/v1/users/settings-by-page',
2585
- query: {
2586
- pageNo: data.pageNo,
2587
- pageSize: data.pageSize
2709
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2710
+ path: {
2711
+ format: data.format,
2712
+ region: data.region
2713
+ },
2714
+ errors: {
2715
+ 400: 'Unsupported format',
2716
+ 401: 'Unauthorized'
2588
2717
  }
2589
2718
  });
2590
2719
  }
2591
2720
 
2592
2721
  /**
2593
- * Get asset and liability summary for current user
2594
- * @returns unknown Summary retrieved successfully
2722
+ * Get transaction rule statistics
2723
+ * @param data The data for the request.
2724
+ * @param data.period Statistics time period
2725
+ * @param data.region Region code for tenant context
2726
+ * @returns RuleStatisticsResponseDto Rule statistics
2595
2727
  * @throws ApiError
2596
2728
  */
2597
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
2729
+ public static transactionRuleControllerGetStatistics(
2730
+ data: TransactionRuleControllerGetStatisticsData
2731
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2598
2732
  return __request(OpenAPI, {
2599
2733
  method: 'GET',
2600
- url: '/api/v1/users/asset-liability-summary'
2734
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2735
+ path: {
2736
+ period: data.period,
2737
+ region: data.region
2738
+ },
2739
+ errors: {
2740
+ 401: 'Unauthorized'
2741
+ }
2601
2742
  });
2602
2743
  }
2603
- }
2604
2744
 
2605
- export class PropertiesService {
2606
2745
  /**
2607
- * Get all system properties
2608
- * @returns unknown Properties retrieved successfully
2746
+ * Get transaction rule detail
2747
+ * @param data The data for the request.
2748
+ * @param data.ruleId Rule ID
2749
+ * @param data.region Region code for tenant context
2750
+ * @returns TransactionRuleResponseDto Rule details
2609
2751
  * @throws ApiError
2610
2752
  */
2611
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
2753
+ public static transactionRuleControllerGetDetail(
2754
+ data: TransactionRuleControllerGetDetailData
2755
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2612
2756
  return __request(OpenAPI, {
2613
2757
  method: 'GET',
2614
- url: '/api/v1/admin/properties',
2758
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2759
+ path: {
2760
+ ruleId: data.ruleId,
2761
+ region: data.region
2762
+ },
2615
2763
  errors: {
2616
2764
  401: 'Unauthorized',
2617
- 403: 'Forbidden - insufficient permissions'
2765
+ 403: 'Forbidden - not owner of rule',
2766
+ 404: 'Rule not found'
2618
2767
  }
2619
2768
  });
2620
2769
  }
2621
2770
 
2622
2771
  /**
2623
- * Get property by key
2772
+ * Update a transaction rule
2624
2773
  * @param data The data for the request.
2625
- * @param data.key Property key
2626
- * @returns unknown Property retrieved successfully
2774
+ * @param data.ruleId Rule ID to update
2775
+ * @param data.region Region code for tenant context
2776
+ * @param data.requestBody
2777
+ * @returns TransactionRuleResponseDto Rule updated successfully
2627
2778
  * @throws ApiError
2628
2779
  */
2629
- public static propertyControllerGetByKey(
2630
- data: PropertyControllerGetByKeyData
2631
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2780
+ public static transactionRuleControllerUpdate(
2781
+ data: TransactionRuleControllerUpdateData
2782
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2632
2783
  return __request(OpenAPI, {
2633
- method: 'GET',
2634
- url: '/api/v1/admin/properties/{key}',
2784
+ method: 'PUT',
2785
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2635
2786
  path: {
2636
- key: data.key
2787
+ ruleId: data.ruleId,
2788
+ region: data.region
2637
2789
  },
2790
+ body: data.requestBody,
2791
+ mediaType: 'application/json',
2638
2792
  errors: {
2793
+ 400: 'Validation failed',
2639
2794
  401: 'Unauthorized',
2640
- 403: 'Forbidden - insufficient permissions',
2641
- 404: 'Property not found'
2795
+ 403: 'Forbidden - not owner of rule',
2796
+ 404: 'Rule not found',
2797
+ 409: 'Resource conflict - rule is being modified by another process'
2642
2798
  }
2643
2799
  });
2644
2800
  }
2645
2801
 
2646
2802
  /**
2647
- * Update a system property
2803
+ * Delete a transaction rule
2648
2804
  * @param data The data for the request.
2649
- * @param data.key Property key
2650
- * @param data.requestBody
2651
- * @returns unknown Property updated successfully
2805
+ * @param data.ruleId Rule ID to delete
2806
+ * @param data.region Region code for tenant context
2807
+ * @returns void Rule deleted successfully
2652
2808
  * @throws ApiError
2653
2809
  */
2654
- public static propertyControllerUpdate(
2655
- data: PropertyControllerUpdateData
2656
- ): CancelablePromise<PropertyControllerUpdateResponse> {
2810
+ public static transactionRuleControllerDelete(
2811
+ data: TransactionRuleControllerDeleteData
2812
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2657
2813
  return __request(OpenAPI, {
2658
- method: 'PUT',
2659
- url: '/api/v1/admin/properties/{key}',
2814
+ method: 'DELETE',
2815
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2660
2816
  path: {
2661
- key: data.key
2817
+ ruleId: data.ruleId,
2818
+ region: data.region
2662
2819
  },
2663
- body: data.requestBody,
2664
- mediaType: 'application/json',
2665
2820
  errors: {
2666
2821
  401: 'Unauthorized',
2667
- 403: 'Forbidden - insufficient permissions'
2822
+ 403: 'Forbidden - not owner of rule',
2823
+ 404: 'Rule not found',
2824
+ 409: 'Resource conflict - rule is being modified by another process'
2668
2825
  }
2669
2826
  });
2670
2827
  }
2671
2828
 
2672
2829
  /**
2673
- * Delete a system property
2830
+ * Test rule matching
2674
2831
  * @param data The data for the request.
2675
- * @param data.key Property key
2676
- * @returns void Property deleted successfully
2832
+ * @param data.ruleId Rule ID to test
2833
+ * @param data.region Region code for tenant context
2834
+ * @param data.requestBody
2835
+ * @returns TestRuleResponseDto Test result
2677
2836
  * @throws ApiError
2678
2837
  */
2679
- public static propertyControllerDelete(
2680
- data: PropertyControllerDeleteData
2681
- ): CancelablePromise<PropertyControllerDeleteResponse> {
2838
+ public static transactionRuleControllerTest(
2839
+ data: TransactionRuleControllerTestData
2840
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
2682
2841
  return __request(OpenAPI, {
2683
- method: 'DELETE',
2684
- url: '/api/v1/admin/properties/{key}',
2842
+ method: 'POST',
2843
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2685
2844
  path: {
2686
- key: data.key
2845
+ ruleId: data.ruleId,
2846
+ region: data.region
2687
2847
  },
2848
+ body: data.requestBody,
2849
+ mediaType: 'application/json',
2688
2850
  errors: {
2689
2851
  401: 'Unauthorized',
2690
- 403: 'Forbidden - insufficient permissions',
2691
- 404: 'Property not found'
2852
+ 403: 'Forbidden - not owner of rule',
2853
+ 404: 'Rule not found'
2692
2854
  }
2693
2855
  });
2694
2856
  }
@@ -3569,13 +3731,20 @@ export class BeanPlatformsService {
3569
3731
 
3570
3732
  /**
3571
3733
  * Get platform list for current user
3572
- * @returns unknown List of platforms with user binding status
3734
+ * @param data The data for the request.
3735
+ * @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").
3736
+ * @returns PlatformListItemDto List of platforms with user binding status
3573
3737
  * @throws ApiError
3574
3738
  */
3575
- public static platformControllerGetPlatformList(): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3739
+ public static platformControllerGetPlatformList(
3740
+ data: PlatformControllerGetPlatformListData = {}
3741
+ ): CancelablePromise<PlatformControllerGetPlatformListResponse> {
3576
3742
  return __request(OpenAPI, {
3577
3743
  method: 'GET',
3578
- url: '/api/v1/bean/platforms/list'
3744
+ url: '/api/v1/bean/platforms/list',
3745
+ query: {
3746
+ region: data.region
3747
+ }
3579
3748
  });
3580
3749
  }
3581
3750
 
@@ -3583,8 +3752,8 @@ export class BeanPlatformsService {
3583
3752
  * Match platforms by name or alias
3584
3753
  * @param data The data for the request.
3585
3754
  * @param data.q Search query — Chinese name, English name, or abbreviation
3586
- * @param data.region Region code for category override lookup
3587
- * @returns unknown List of matching platforms with suggested segment names
3755
+ * @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").
3756
+ * @returns PlatformMatchResponseDto Matching platforms with overall match type and truncation flag
3588
3757
  * @throws ApiError
3589
3758
  */
3590
3759
  public static platformControllerMatchPlatforms(
@@ -3802,163 +3971,6 @@ export class InvestmentService {
3802
3971
  }
3803
3972
  }
3804
3973
 
3805
- export class ReportingService {
3806
- /**
3807
- * Get portfolio value trends
3808
- *
3809
- * Returns time series data of portfolio net worth.
3810
- *
3811
- * **Multi-currency Support:**
3812
- * - `series[].byCurrency` - Currency breakdown for each data point
3813
- * - `byCurrency` - Separate time series grouped by currency
3814
- * - `warnings` - Exchange rate warnings if conversion failed
3815
- *
3816
- * **Parameters:**
3817
- * - `period`: Time period (1m, 3m, 6m, 1y)
3818
- * - `granularity`: Data granularity (day, week, month)
3819
- *
3820
- * @param data The data for the request.
3821
- * @param data.region Region code for tenant context
3822
- * @param data.period Time period
3823
- * @param data.granularity Data granularity
3824
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
3825
- * @throws ApiError
3826
- */
3827
- public static reportingControllerGetPortfolioTrends(
3828
- data: ReportingControllerGetPortfolioTrendsData
3829
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
3830
- return __request(OpenAPI, {
3831
- method: 'GET',
3832
- url: '/api/v1/{region}/reporting/portfolio/trends',
3833
- path: {
3834
- region: data.region
3835
- },
3836
- query: {
3837
- period: data.period,
3838
- granularity: data.granularity
3839
- },
3840
- errors: {
3841
- 401: 'User not authenticated'
3842
- }
3843
- });
3844
- }
3845
-
3846
- /**
3847
- * Get cash-flow trends
3848
- *
3849
- * Monthly income / expense / netSavings over a fixed N-month window
3850
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
3851
- *
3852
- * **Parameters:**
3853
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
3854
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
3855
- *
3856
- * @param data The data for the request.
3857
- * @param data.region Region code for tenant context
3858
- * @param data.period Time period
3859
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
3860
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
3861
- * @throws ApiError
3862
- */
3863
- public static reportingControllerGetCashFlowTrends(
3864
- data: ReportingControllerGetCashFlowTrendsData
3865
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
3866
- return __request(OpenAPI, {
3867
- method: 'GET',
3868
- url: '/api/v1/{region}/reporting/cash-flow/trends',
3869
- path: {
3870
- region: data.region
3871
- },
3872
- query: {
3873
- period: data.period,
3874
- granularity: data.granularity
3875
- },
3876
- errors: {
3877
- 401: 'User not authenticated'
3878
- }
3879
- });
3880
- }
3881
-
3882
- /**
3883
- * Generate portfolio snapshot
3884
- *
3885
- * Manually generate a portfolio snapshot for a specific date.
3886
- *
3887
- * **Multi-currency Support:**
3888
- * - Fetches balances grouped by currency
3889
- * - Uses user's baseCurrency setting for conversion
3890
- * - Stores exchange rates and warnings
3891
- *
3892
- * **Use Cases:**
3893
- * - Testing snapshot generation
3894
- * - Force regeneration after data correction
3895
- * - Initial setup for new users
3896
- *
3897
- * @param data The data for the request.
3898
- * @param data.region Region code for tenant context
3899
- * @param data.requestBody Optional date (defaults to today)
3900
- * @returns GenerateSnapshotResponse Snapshot generated successfully
3901
- * @throws ApiError
3902
- */
3903
- public static reportingControllerGenerateSnapshot(
3904
- data: ReportingControllerGenerateSnapshotData
3905
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
3906
- return __request(OpenAPI, {
3907
- method: 'POST',
3908
- url: '/api/v1/{region}/reporting/snapshots/generate',
3909
- path: {
3910
- region: data.region
3911
- },
3912
- body: data.requestBody,
3913
- mediaType: 'application/json',
3914
- errors: {
3915
- 400: 'Invalid date format',
3916
- 401: 'User not authenticated'
3917
- }
3918
- });
3919
- }
3920
-
3921
- /**
3922
- * Backfill portfolio snapshots
3923
- *
3924
- * Generate snapshots for a date range (historical data backfill).
3925
- *
3926
- * **Multi-currency Support:**
3927
- * - Each snapshot includes multi-currency data
3928
- * - Uses exchange rates available at generation time
3929
- * - Warnings stored for missing exchange rates
3930
- *
3931
- * **Best Practices:**
3932
- * - Use for initial setup after account configuration
3933
- * - Run during low-traffic periods for large date ranges
3934
- * - Existing snapshots are skipped (not regenerated)
3935
- *
3936
- * @param data The data for the request.
3937
- * @param data.region Region code for tenant context
3938
- * @param data.requestBody
3939
- * @returns BackfillSnapshotsResponse Backfill completed successfully
3940
- * @throws ApiError
3941
- */
3942
- public static reportingControllerBackfillSnapshots(
3943
- data: ReportingControllerBackfillSnapshotsData
3944
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
3945
- return __request(OpenAPI, {
3946
- method: 'POST',
3947
- url: '/api/v1/{region}/reporting/snapshots/backfill',
3948
- path: {
3949
- region: data.region
3950
- },
3951
- body: data.requestBody,
3952
- mediaType: 'application/json',
3953
- errors: {
3954
- 400: 'Invalid date format or range',
3955
- 401: 'User not authenticated',
3956
- 409: 'Backfill already in progress for this user'
3957
- }
3958
- });
3959
- }
3960
- }
3961
-
3962
3974
  export class ApiKeysService {
3963
3975
  /**
3964
3976
  * Create API key
@@ -3982,7 +3994,7 @@ export class AuthService {
3982
3994
  * Anonymous login with access token
3983
3995
  * @param data The data for the request.
3984
3996
  * @param data.requestBody
3985
- * @returns unknown Login successful
3997
+ * @returns AnonymousLoginResponseDto Login successful
3986
3998
  * @throws ApiError
3987
3999
  */
3988
4000
  public static authControllerAccessTokenLogin(
@@ -4169,3 +4181,53 @@ export class InfoService {
4169
4181
  });
4170
4182
  }
4171
4183
  }
4184
+
4185
+ export class MarketDataService {
4186
+ /**
4187
+ * Search market symbols by name or code
4188
+ * Ranked search over the openbb catalog. Empty `q` returns [].
4189
+ * @param data The data for the request.
4190
+ * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4191
+ * @param data.limit Maximum number of results (clamped 1..50)
4192
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4193
+ * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4194
+ * @returns SymbolSearchResultDto Ranked search results
4195
+ * @throws ApiError
4196
+ */
4197
+ public static symbolControllerSearch(
4198
+ data: SymbolControllerSearchData
4199
+ ): CancelablePromise<SymbolControllerSearchResponse> {
4200
+ return __request(OpenAPI, {
4201
+ method: 'GET',
4202
+ url: '/api/v1/market/symbols/search',
4203
+ query: {
4204
+ q: data.q,
4205
+ limit: data.limit,
4206
+ exchange: data.exchange,
4207
+ assetType: data.assetType
4208
+ }
4209
+ });
4210
+ }
4211
+
4212
+ /**
4213
+ * Get a market symbol quote
4214
+ * @param data The data for the request.
4215
+ * @param data.symbol
4216
+ * @returns SymbolQuoteDto Symbol quote
4217
+ * @throws ApiError
4218
+ */
4219
+ public static symbolControllerGetQuote(
4220
+ data: SymbolControllerGetQuoteData
4221
+ ): CancelablePromise<SymbolControllerGetQuoteResponse> {
4222
+ return __request(OpenAPI, {
4223
+ method: 'GET',
4224
+ url: '/api/v1/market/symbols/{symbol}/quote',
4225
+ path: {
4226
+ symbol: data.symbol
4227
+ },
4228
+ errors: {
4229
+ 404: 'Symbol not found in the openbb catalog'
4230
+ }
4231
+ });
4232
+ }
4233
+ }