@firela/api-types 0.0.0-canary.fcd7d276 → 0.0.0-canary.fd60e04

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.
@@ -57,6 +57,48 @@ import type {
57
57
  ReviewControllerUndoResponse,
58
58
  ReviewControllerBatchResolveData,
59
59
  ReviewControllerBatchResolveResponse,
60
+ TransactionRuleControllerCreateData,
61
+ TransactionRuleControllerCreateResponse,
62
+ TransactionRuleControllerListData,
63
+ TransactionRuleControllerListResponse,
64
+ TransactionRuleControllerValidateData,
65
+ TransactionRuleControllerValidateResponse,
66
+ TransactionRuleControllerBulkCreateData,
67
+ TransactionRuleControllerBulkCreateResponse,
68
+ TransactionRuleControllerExportData,
69
+ TransactionRuleControllerExportResponse,
70
+ TransactionRuleControllerGetStatisticsData,
71
+ TransactionRuleControllerGetStatisticsResponse,
72
+ TransactionRuleControllerGetDetailData,
73
+ TransactionRuleControllerGetDetailResponse,
74
+ TransactionRuleControllerUpdateData,
75
+ TransactionRuleControllerUpdateResponse,
76
+ TransactionRuleControllerDeleteData,
77
+ TransactionRuleControllerDeleteResponse,
78
+ TransactionRuleControllerTestData,
79
+ TransactionRuleControllerTestResponse,
80
+ UserControllerDeleteOwnUserData,
81
+ UserControllerDeleteOwnUserResponse,
82
+ UserControllerGetUserData,
83
+ UserControllerGetUserResponse,
84
+ UserControllerSignupUserData,
85
+ UserControllerSignupUserResponse,
86
+ UserControllerDeleteUserData,
87
+ UserControllerDeleteUserResponse,
88
+ UserControllerGetUserInfoData,
89
+ UserControllerGetUserInfoResponse,
90
+ UserControllerUpdateUserSettingData,
91
+ UserControllerUpdateUserSettingResponse,
92
+ UserControllerGetAllUserSettingsByPageData,
93
+ UserControllerGetAllUserSettingsByPageResponse,
94
+ UserControllerGetAssetLiabilitySummaryResponse,
95
+ PropertyControllerGetAllResponse,
96
+ PropertyControllerGetByKeyData,
97
+ PropertyControllerGetByKeyResponse,
98
+ PropertyControllerUpdateData,
99
+ PropertyControllerUpdateResponse,
100
+ PropertyControllerDeleteData,
101
+ PropertyControllerDeleteResponse,
60
102
  PayeeControllerCreateData,
61
103
  PayeeControllerCreateResponse,
62
104
  PayeeControllerFindAllData,
@@ -85,6 +127,7 @@ import type {
85
127
  PayeeProfileAdminControllerVerifyResponse,
86
128
  PayeeProfileAdminControllerUnverifyData,
87
129
  PayeeProfileAdminControllerUnverifyResponse,
130
+ PayeeProfileControllerListActiveResponse,
88
131
  CommodityControllerCreateData,
89
132
  CommodityControllerCreateResponse,
90
133
  CommodityControllerFindAllData,
@@ -119,28 +162,6 @@ import type {
119
162
  PriceControllerDeleteResponse,
120
163
  PriceControllerBulkCreateData,
121
164
  PriceControllerBulkCreateResponse,
122
- UserControllerDeleteOwnUserData,
123
- UserControllerDeleteOwnUserResponse,
124
- UserControllerGetUserData,
125
- UserControllerGetUserResponse,
126
- UserControllerSignupUserData,
127
- UserControllerSignupUserResponse,
128
- UserControllerDeleteUserData,
129
- UserControllerDeleteUserResponse,
130
- UserControllerGetUserInfoData,
131
- UserControllerGetUserInfoResponse,
132
- UserControllerUpdateUserSettingData,
133
- UserControllerUpdateUserSettingResponse,
134
- UserControllerGetAllUserSettingsByPageData,
135
- UserControllerGetAllUserSettingsByPageResponse,
136
- UserControllerGetAssetLiabilitySummaryResponse,
137
- PropertyControllerGetAllResponse,
138
- PropertyControllerGetByKeyData,
139
- PropertyControllerGetByKeyResponse,
140
- PropertyControllerUpdateData,
141
- PropertyControllerUpdateResponse,
142
- PropertyControllerDeleteData,
143
- PropertyControllerDeleteResponse,
144
165
  RecurringRuleControllerCreateData,
145
166
  RecurringRuleControllerCreateResponse,
146
167
  RecurringRuleControllerFindAllData,
@@ -173,26 +194,6 @@ import type {
173
194
  ExpectedTransactionControllerEnterNowResponse,
174
195
  ForecastControllerGetForecastData,
175
196
  ForecastControllerGetForecastResponse,
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
197
  CategoryCatalogControllerListData,
197
198
  CategoryCatalogControllerListResponse,
198
199
  EventControllerCreateData,
@@ -217,6 +218,7 @@ import type {
217
218
  ReconciliationControllerPadResponse,
218
219
  ReconciliationControllerHistoryData,
219
220
  ReconciliationControllerHistoryResponse,
221
+ ExportControllerExportBeancountData,
220
222
  ExportControllerExportBeancountResponse,
221
223
  FileImportControllerImportFileData,
222
224
  FileImportControllerImportFileResponse,
@@ -277,11 +279,15 @@ import type {
277
279
  DashboardControllerGetCashFlowResponse,
278
280
  DashboardControllerGetExpensesData,
279
281
  DashboardControllerGetExpensesResponse,
282
+ DashboardControllerGetAdvisorContextData,
283
+ DashboardControllerGetAdvisorContextResponse,
280
284
  HoldingPnlControllerGetHoldingPnlData,
281
285
  HoldingPnlControllerGetHoldingPnlResponse,
282
286
  ApiKeysControllerCreateApiKeyResponse,
283
287
  AuthControllerAccessTokenLoginData,
284
288
  AuthControllerAccessTokenLoginResponse,
289
+ AuthControllerAdvisorTokenLoginData,
290
+ AuthControllerAdvisorTokenLoginResponse,
285
291
  ParserContributionControllerCreateData,
286
292
  ParserContributionControllerCreateResponse,
287
293
  CacheControllerFlushCacheResponse,
@@ -1049,1816 +1055,1834 @@ export class BeanReviewsService {
1049
1055
  }
1050
1056
  }
1051
1057
 
1052
- export class BeanPayeesService {
1058
+ export class BeanTransactionRulesService {
1053
1059
  /**
1054
- * Create a new payee
1055
- * Creates a new payee mapping for the authenticated user. The payee name must be unique within the user's account.
1060
+ * Create a new transaction rule (or upsert if upsertByPayee=true)
1061
+ * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
1056
1062
  * @param data The data for the request.
1063
+ * @param data.region Region code for tenant context
1057
1064
  * @param data.requestBody
1058
- * @returns PayeeResponseDto Payee created successfully
1065
+ * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
1059
1066
  * @throws ApiError
1060
1067
  */
1061
- public static payeeControllerCreate(
1062
- data: PayeeControllerCreateData
1063
- ): CancelablePromise<PayeeControllerCreateResponse> {
1068
+ public static transactionRuleControllerCreate(
1069
+ data: TransactionRuleControllerCreateData
1070
+ ): CancelablePromise<TransactionRuleControllerCreateResponse> {
1064
1071
  return __request(OpenAPI, {
1065
1072
  method: 'POST',
1066
- url: '/api/v1/bean/payees',
1073
+ url: '/api/v1/{region}/bean/transaction-rules',
1074
+ path: {
1075
+ region: data.region
1076
+ },
1067
1077
  body: data.requestBody,
1068
1078
  mediaType: 'application/json',
1069
1079
  errors: {
1070
- 400: 'Invalid input data',
1071
- 409: 'Payee already exists'
1080
+ 400: 'Validation failed',
1081
+ 401: 'Unauthorized',
1082
+ 409: 'Resource conflict - another process is updating this rule'
1072
1083
  }
1073
1084
  });
1074
1085
  }
1075
1086
 
1076
1087
  /**
1077
- * List user payees
1078
- * Returns all payee mappings for the authenticated user with optional filtering
1088
+ * Get all transaction rules for user
1079
1089
  * @param data The data for the request.
1080
- * @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
1081
- * @param data.payee Filter by exact payee name match
1082
- * @param data.category Filter by custom category
1083
- * @param data.tag Filter by custom tag (returns payees that have this tag)
1084
- * @param data.isActive Filter by active status. Defaults to true (show only active payees).
1085
- * @returns PayeeListResponseDto Payees retrieved successfully
1090
+ * @param data.region Region code for tenant context
1091
+ * @param data.limit Max results per page (default: 20, max: 100)
1092
+ * @param data.offset Pagination offset (default: 0)
1093
+ * @param data.enabled Filter by enabled status
1094
+ * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
1095
+ * @param data.autoApplyEnabled Filter by auto-apply status
1096
+ * @returns TransactionRuleListResponseDto List of rules
1086
1097
  * @throws ApiError
1087
1098
  */
1088
- public static payeeControllerFindAll(
1089
- data: PayeeControllerFindAllData = {}
1090
- ): CancelablePromise<PayeeControllerFindAllResponse> {
1099
+ public static transactionRuleControllerList(
1100
+ data: TransactionRuleControllerListData
1101
+ ): CancelablePromise<TransactionRuleControllerListResponse> {
1091
1102
  return __request(OpenAPI, {
1092
1103
  method: 'GET',
1093
- url: '/api/v1/bean/payees',
1104
+ url: '/api/v1/{region}/bean/transaction-rules',
1105
+ path: {
1106
+ region: data.region
1107
+ },
1094
1108
  query: {
1095
- search: data.search,
1096
- payee: data.payee,
1097
- category: data.category,
1098
- tag: data.tag,
1099
- isActive: data.isActive
1109
+ limit: data.limit,
1110
+ offset: data.offset,
1111
+ enabled: data.enabled,
1112
+ learningSource: data.learningSource,
1113
+ autoApplyEnabled: data.autoApplyEnabled
1114
+ },
1115
+ errors: {
1116
+ 401: 'Unauthorized'
1100
1117
  }
1101
1118
  });
1102
1119
  }
1103
1120
 
1104
1121
  /**
1105
- * Get payee autocomplete suggestions
1106
- * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
1122
+ * Validate transaction rule configuration
1107
1123
  * @param data The data for the request.
1108
- * @param data.q Search query for payee name (partial match, case-insensitive)
1109
- * @param data.limit Maximum number of suggestions
1110
- * @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
1124
+ * @param data.region Region code for tenant context
1125
+ * @param data.requestBody
1126
+ * @returns ValidateRuleResponseDto Validation result
1111
1127
  * @throws ApiError
1112
1128
  */
1113
- public static payeeControllerAutocomplete(
1114
- data: PayeeControllerAutocompleteData
1115
- ): CancelablePromise<PayeeControllerAutocompleteResponse> {
1129
+ public static transactionRuleControllerValidate(
1130
+ data: TransactionRuleControllerValidateData
1131
+ ): CancelablePromise<TransactionRuleControllerValidateResponse> {
1116
1132
  return __request(OpenAPI, {
1117
- method: 'GET',
1118
- url: '/api/v1/bean/payees/autocomplete',
1119
- query: {
1120
- q: data.q,
1121
- limit: data.limit
1133
+ method: 'POST',
1134
+ url: '/api/v1/{region}/bean/transaction-rules/validate',
1135
+ path: {
1136
+ region: data.region
1137
+ },
1138
+ body: data.requestBody,
1139
+ mediaType: 'application/json',
1140
+ errors: {
1141
+ 400: 'Validation failed',
1142
+ 401: 'Unauthorized'
1122
1143
  }
1123
1144
  });
1124
1145
  }
1125
1146
 
1126
1147
  /**
1127
- * Get top payees by usage
1128
- * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
1148
+ * Bulk create transaction rules
1129
1149
  * @param data The data for the request.
1130
- * @param data.limit Maximum number of results
1131
- * @returns PayeeStatsResponseDto Top payees retrieved successfully
1150
+ * @param data.region Region code for tenant context
1151
+ * @param data.requestBody
1152
+ * @returns BulkCreateRulesResponseDto Bulk create completed
1132
1153
  * @throws ApiError
1133
1154
  */
1134
- public static payeeControllerGetTopPayees(
1135
- data: PayeeControllerGetTopPayeesData = {}
1136
- ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
1155
+ public static transactionRuleControllerBulkCreate(
1156
+ data: TransactionRuleControllerBulkCreateData
1157
+ ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
1137
1158
  return __request(OpenAPI, {
1138
- method: 'GET',
1139
- url: '/api/v1/bean/payees/top',
1140
- query: {
1141
- limit: data.limit
1159
+ method: 'POST',
1160
+ url: '/api/v1/{region}/bean/transaction-rules/bulk',
1161
+ path: {
1162
+ region: data.region
1163
+ },
1164
+ body: data.requestBody,
1165
+ mediaType: 'application/json',
1166
+ errors: {
1167
+ 400: 'Invalid bulk create data',
1168
+ 401: 'Unauthorized'
1142
1169
  }
1143
1170
  });
1144
1171
  }
1145
1172
 
1146
1173
  /**
1147
- * Get payee by ID
1148
- * Returns a specific payee mapping by its UUID
1174
+ * Export transaction rules
1149
1175
  * @param data The data for the request.
1150
- * @param data.id Payee UUID
1151
- * @returns PayeeResponseDto Payee retrieved successfully
1176
+ * @param data.format Export format (currently only JSON supported)
1177
+ * @param data.region Region code for tenant context
1178
+ * @returns ExportRulesResponseDto Exported rules
1152
1179
  * @throws ApiError
1153
1180
  */
1154
- public static payeeControllerFindOne(
1155
- data: PayeeControllerFindOneData
1156
- ): CancelablePromise<PayeeControllerFindOneResponse> {
1181
+ public static transactionRuleControllerExport(
1182
+ data: TransactionRuleControllerExportData
1183
+ ): CancelablePromise<TransactionRuleControllerExportResponse> {
1157
1184
  return __request(OpenAPI, {
1158
1185
  method: 'GET',
1159
- url: '/api/v1/bean/payees/{id}',
1186
+ url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
1160
1187
  path: {
1161
- id: data.id
1188
+ format: data.format,
1189
+ region: data.region
1162
1190
  },
1163
1191
  errors: {
1164
- 403: 'Payee belongs to another user',
1165
- 404: 'Payee not found'
1192
+ 400: 'Unsupported format',
1193
+ 401: 'Unauthorized'
1166
1194
  }
1167
1195
  });
1168
1196
  }
1169
1197
 
1170
1198
  /**
1171
- * Update payee
1172
- * Updates a payee mapping. The payee name cannot be changed after creation.
1199
+ * Get transaction rule statistics
1173
1200
  * @param data The data for the request.
1174
- * @param data.id Payee UUID
1175
- * @param data.requestBody
1176
- * @returns PayeeResponseDto Payee updated successfully
1201
+ * @param data.period Statistics time period
1202
+ * @param data.region Region code for tenant context
1203
+ * @returns RuleStatisticsResponseDto Rule statistics
1177
1204
  * @throws ApiError
1178
1205
  */
1179
- public static payeeControllerUpdate(
1180
- data: PayeeControllerUpdateData
1181
- ): CancelablePromise<PayeeControllerUpdateResponse> {
1206
+ public static transactionRuleControllerGetStatistics(
1207
+ data: TransactionRuleControllerGetStatisticsData
1208
+ ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
1182
1209
  return __request(OpenAPI, {
1183
- method: 'PUT',
1184
- url: '/api/v1/bean/payees/{id}',
1210
+ method: 'GET',
1211
+ url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
1185
1212
  path: {
1186
- id: data.id
1213
+ period: data.period,
1214
+ region: data.region
1187
1215
  },
1188
- body: data.requestBody,
1189
- mediaType: 'application/json',
1190
1216
  errors: {
1191
- 400: 'Invalid input data',
1192
- 404: 'Payee not found'
1217
+ 401: 'Unauthorized'
1193
1218
  }
1194
1219
  });
1195
1220
  }
1196
1221
 
1197
1222
  /**
1198
- * Delete payee
1199
- * Soft deletes a payee by marking it as inactive. Inactive payees will not appear in autocomplete suggestions.
1223
+ * Get transaction rule detail
1200
1224
  * @param data The data for the request.
1201
- * @param data.id Payee UUID
1202
- * @returns void Payee deleted successfully
1225
+ * @param data.ruleId Rule ID
1226
+ * @param data.region Region code for tenant context
1227
+ * @returns TransactionRuleResponseDto Rule details
1203
1228
  * @throws ApiError
1204
1229
  */
1205
- public static payeeControllerDelete(
1206
- data: PayeeControllerDeleteData
1207
- ): CancelablePromise<PayeeControllerDeleteResponse> {
1230
+ public static transactionRuleControllerGetDetail(
1231
+ data: TransactionRuleControllerGetDetailData
1232
+ ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
1208
1233
  return __request(OpenAPI, {
1209
- method: 'DELETE',
1210
- url: '/api/v1/bean/payees/{id}',
1234
+ method: 'GET',
1235
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1211
1236
  path: {
1212
- id: data.id
1237
+ ruleId: data.ruleId,
1238
+ region: data.region
1213
1239
  },
1214
1240
  errors: {
1215
- 404: 'Payee not found'
1241
+ 401: 'Unauthorized',
1242
+ 403: 'Forbidden - not owner of rule',
1243
+ 404: 'Rule not found'
1216
1244
  }
1217
1245
  });
1218
1246
  }
1219
- }
1220
1247
 
1221
- export class AdminPayeeProfilesService {
1222
1248
  /**
1223
- * Create payee profile (Admin only)
1224
- * Creates a new global payee profile. The canonical name must be unique (case-insensitive).
1249
+ * Update a transaction rule
1225
1250
  * @param data The data for the request.
1251
+ * @param data.ruleId Rule ID to update
1252
+ * @param data.region Region code for tenant context
1226
1253
  * @param data.requestBody
1227
- * @returns PayeeProfileResponseDto Payee profile created successfully
1254
+ * @returns TransactionRuleResponseDto Rule updated successfully
1228
1255
  * @throws ApiError
1229
1256
  */
1230
- public static payeeProfileAdminControllerCreate(
1231
- data: PayeeProfileAdminControllerCreateData
1232
- ): CancelablePromise<PayeeProfileAdminControllerCreateResponse> {
1257
+ public static transactionRuleControllerUpdate(
1258
+ data: TransactionRuleControllerUpdateData
1259
+ ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
1233
1260
  return __request(OpenAPI, {
1234
- method: 'POST',
1235
- url: '/api/v1/admin/payee-profiles',
1261
+ method: 'PUT',
1262
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1263
+ path: {
1264
+ ruleId: data.ruleId,
1265
+ region: data.region
1266
+ },
1236
1267
  body: data.requestBody,
1237
1268
  mediaType: 'application/json',
1238
1269
  errors: {
1239
1270
  400: 'Validation failed',
1240
- 403: 'Admin access required',
1241
- 409: 'Payee profile already exists'
1271
+ 401: 'Unauthorized',
1272
+ 403: 'Forbidden - not owner of rule',
1273
+ 404: 'Rule not found',
1274
+ 409: 'Resource conflict - rule is being modified by another process'
1242
1275
  }
1243
1276
  });
1244
1277
  }
1245
1278
 
1246
1279
  /**
1247
- * List payee profiles (Admin only)
1248
- * Returns all payee profiles with optional filtering by category, country, verification status, etc.
1280
+ * Delete a transaction rule
1249
1281
  * @param data The data for the request.
1250
- * @param data.search Search term for canonical name and aliases (case-insensitive)
1251
- * @param data.category Filter by category
1252
- * @param data.country Filter by country (ISO 3166-1 alpha-2)
1253
- * @param data.isActive Filter by active status (default: true - show only active)
1254
- * @param data.verified Filter by verification status. true = verified only, false = unverified only
1255
- * @param data.dataSource Filter by data source
1256
- * @returns PayeeProfileListResponseDto Payee profiles retrieved successfully
1282
+ * @param data.ruleId Rule ID to delete
1283
+ * @param data.region Region code for tenant context
1284
+ * @returns void Rule deleted successfully
1257
1285
  * @throws ApiError
1258
1286
  */
1259
- public static payeeProfileAdminControllerFindAll(
1260
- data: PayeeProfileAdminControllerFindAllData = {}
1261
- ): CancelablePromise<PayeeProfileAdminControllerFindAllResponse> {
1287
+ public static transactionRuleControllerDelete(
1288
+ data: TransactionRuleControllerDeleteData
1289
+ ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
1262
1290
  return __request(OpenAPI, {
1263
- method: 'GET',
1264
- url: '/api/v1/admin/payee-profiles',
1265
- query: {
1266
- search: data.search,
1267
- category: data.category,
1268
- country: data.country,
1269
- isActive: data.isActive,
1270
- verified: data.verified,
1271
- dataSource: data.dataSource
1291
+ method: 'DELETE',
1292
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
1293
+ path: {
1294
+ ruleId: data.ruleId,
1295
+ region: data.region
1272
1296
  },
1273
1297
  errors: {
1274
- 403: 'Admin access required'
1298
+ 401: 'Unauthorized',
1299
+ 403: 'Forbidden - not owner of rule',
1300
+ 404: 'Rule not found',
1301
+ 409: 'Resource conflict - rule is being modified by another process'
1275
1302
  }
1276
1303
  });
1277
1304
  }
1278
1305
 
1279
1306
  /**
1280
- * Get payee profile by ID (Admin only)
1281
- * Returns a single payee profile by its ID.
1307
+ * Test rule matching
1282
1308
  * @param data The data for the request.
1283
- * @param data.id Payee profile ID (UUID)
1284
- * @returns PayeeProfileResponseDto Payee profile retrieved successfully
1309
+ * @param data.ruleId Rule ID to test
1310
+ * @param data.region Region code for tenant context
1311
+ * @param data.requestBody
1312
+ * @returns TestRuleResponseDto Test result
1285
1313
  * @throws ApiError
1286
1314
  */
1287
- public static payeeProfileAdminControllerFindOne(
1288
- data: PayeeProfileAdminControllerFindOneData
1289
- ): CancelablePromise<PayeeProfileAdminControllerFindOneResponse> {
1315
+ public static transactionRuleControllerTest(
1316
+ data: TransactionRuleControllerTestData
1317
+ ): CancelablePromise<TransactionRuleControllerTestResponse> {
1290
1318
  return __request(OpenAPI, {
1291
- method: 'GET',
1292
- url: '/api/v1/admin/payee-profiles/{id}',
1319
+ method: 'POST',
1320
+ url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
1293
1321
  path: {
1294
- id: data.id
1322
+ ruleId: data.ruleId,
1323
+ region: data.region
1295
1324
  },
1325
+ body: data.requestBody,
1326
+ mediaType: 'application/json',
1296
1327
  errors: {
1297
- 403: 'Admin access required',
1298
- 404: 'Payee profile not found'
1328
+ 401: 'Unauthorized',
1329
+ 403: 'Forbidden - not owner of rule',
1330
+ 404: 'Rule not found'
1299
1331
  }
1300
1332
  });
1301
1333
  }
1334
+ }
1302
1335
 
1336
+ export class UsersService {
1303
1337
  /**
1304
- * Update payee profile (Admin only)
1305
- * Updates an existing payee profile. The canonical name cannot be changed.
1338
+ * Delete own user account
1306
1339
  * @param data The data for the request.
1307
- * @param data.id Payee profile ID (UUID)
1308
1340
  * @param data.requestBody
1309
- * @returns PayeeProfileResponseDto Payee profile updated successfully
1341
+ * @returns void User deleted successfully
1310
1342
  * @throws ApiError
1311
1343
  */
1312
- public static payeeProfileAdminControllerUpdate(
1313
- data: PayeeProfileAdminControllerUpdateData
1314
- ): CancelablePromise<PayeeProfileAdminControllerUpdateResponse> {
1344
+ public static userControllerDeleteOwnUser(
1345
+ data: UserControllerDeleteOwnUserData
1346
+ ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
1315
1347
  return __request(OpenAPI, {
1316
- method: 'PUT',
1317
- url: '/api/v1/admin/payee-profiles/{id}',
1318
- path: {
1319
- id: data.id
1320
- },
1348
+ method: 'DELETE',
1349
+ url: '/api/v1/users',
1321
1350
  body: data.requestBody,
1322
1351
  mediaType: 'application/json',
1323
1352
  errors: {
1324
- 403: 'Admin access required',
1325
- 404: 'Payee profile not found'
1353
+ 403: 'Invalid access token'
1326
1354
  }
1327
1355
  });
1328
1356
  }
1329
1357
 
1330
1358
  /**
1331
- * Soft delete payee profile (Admin only)
1332
- * Marks a payee profile as inactive (soft delete). The profile cannot be deleted if it is referenced by user payees.
1359
+ * Get current authenticated user
1333
1360
  * @param data The data for the request.
1334
- * @param data.id Payee profile ID (UUID)
1335
- * @returns void Payee profile deleted successfully
1361
+ * @param data.acceptLanguage
1362
+ * @returns UserResponseDto User retrieved successfully
1336
1363
  * @throws ApiError
1337
1364
  */
1338
- public static payeeProfileAdminControllerDelete(
1339
- data: PayeeProfileAdminControllerDeleteData
1340
- ): CancelablePromise<PayeeProfileAdminControllerDeleteResponse> {
1365
+ public static userControllerGetUser(
1366
+ data: UserControllerGetUserData
1367
+ ): CancelablePromise<UserControllerGetUserResponse> {
1341
1368
  return __request(OpenAPI, {
1342
- method: 'DELETE',
1343
- url: '/api/v1/admin/payee-profiles/{id}',
1344
- path: {
1345
- id: data.id
1346
- },
1347
- errors: {
1348
- 403: 'Admin access required',
1349
- 404: 'Payee profile not found',
1350
- 409: 'Payee profile is in use and cannot be deleted'
1369
+ method: 'GET',
1370
+ url: '/api/v1/users',
1371
+ headers: {
1372
+ 'accept-language': data.acceptLanguage
1351
1373
  }
1352
1374
  });
1353
1375
  }
1354
1376
 
1355
1377
  /**
1356
- * Verify payee profile (Admin only)
1357
- * Marks a payee profile as verified by setting verifiedAt to current timestamp.
1378
+ * Sign up new user
1379
+ * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
1358
1380
  * @param data The data for the request.
1359
- * @param data.id Payee profile ID (UUID)
1360
- * @returns PayeeProfileResponseDto Payee profile verified successfully
1381
+ * @param data.requestBody
1382
+ * @returns SignupResponseDto User created successfully
1361
1383
  * @throws ApiError
1362
1384
  */
1363
- public static payeeProfileAdminControllerVerify(
1364
- data: PayeeProfileAdminControllerVerifyData
1365
- ): CancelablePromise<PayeeProfileAdminControllerVerifyResponse> {
1385
+ public static userControllerSignupUser(
1386
+ data: UserControllerSignupUserData
1387
+ ): CancelablePromise<UserControllerSignupUserResponse> {
1366
1388
  return __request(OpenAPI, {
1367
1389
  method: 'POST',
1368
- url: '/api/v1/admin/payee-profiles/{id}/verify',
1369
- path: {
1370
- id: data.id
1371
- },
1390
+ url: '/api/v1/users',
1391
+ body: data.requestBody,
1392
+ mediaType: 'application/json',
1372
1393
  errors: {
1373
- 403: 'Admin access required',
1374
- 404: 'Payee profile not found'
1394
+ 400: 'Invalid Turnstile token (when Turnstile is enabled)',
1395
+ 403: 'User signup is disabled'
1375
1396
  }
1376
1397
  });
1377
1398
  }
1378
1399
 
1379
1400
  /**
1380
- * Unverify payee profile (Admin only)
1381
- * Removes verification status by setting verifiedAt to null.
1401
+ * Delete user by ID (admin only)
1382
1402
  * @param data The data for the request.
1383
- * @param data.id Payee profile ID (UUID)
1384
- * @returns void Payee profile unverified successfully
1403
+ * @param data.id User ID to delete
1404
+ * @returns void User deleted successfully
1385
1405
  * @throws ApiError
1386
1406
  */
1387
- public static payeeProfileAdminControllerUnverify(
1388
- data: PayeeProfileAdminControllerUnverifyData
1389
- ): CancelablePromise<PayeeProfileAdminControllerUnverifyResponse> {
1407
+ public static userControllerDeleteUser(
1408
+ data: UserControllerDeleteUserData
1409
+ ): CancelablePromise<UserControllerDeleteUserResponse> {
1390
1410
  return __request(OpenAPI, {
1391
1411
  method: 'DELETE',
1392
- url: '/api/v1/admin/payee-profiles/{id}/verify',
1412
+ url: '/api/v1/users/{id}',
1393
1413
  path: {
1394
1414
  id: data.id
1395
1415
  },
1396
1416
  errors: {
1397
- 403: 'Admin access required',
1398
- 404: 'Payee profile not found'
1417
+ 403: 'Cannot delete own account or insufficient permissions'
1399
1418
  }
1400
1419
  });
1401
1420
  }
1402
- }
1403
1421
 
1404
- export class BeanCommoditiesService {
1405
1422
  /**
1406
- * Create a new commodity
1407
- * Creates a new commodity definition for the authenticated user
1423
+ * Get user info by user ID
1408
1424
  * @param data The data for the request.
1409
- * @param data.region Region code for tenant context
1410
- * @param data.requestBody
1411
- * @returns CommodityResponseDto Commodity created successfully
1425
+ * @param data.id User ID
1426
+ * @returns unknown User info retrieved successfully
1412
1427
  * @throws ApiError
1413
1428
  */
1414
- public static commodityControllerCreate(
1415
- data: CommodityControllerCreateData
1416
- ): CancelablePromise<CommodityControllerCreateResponse> {
1429
+ public static userControllerGetUserInfo(
1430
+ data: UserControllerGetUserInfoData
1431
+ ): CancelablePromise<UserControllerGetUserInfoResponse> {
1417
1432
  return __request(OpenAPI, {
1418
- method: 'POST',
1419
- url: '/api/v1/{region}/bean/commodities',
1433
+ method: 'GET',
1434
+ url: '/api/v1/users/{id}/info',
1420
1435
  path: {
1421
- region: data.region
1436
+ id: data.id
1422
1437
  },
1423
- body: data.requestBody,
1424
- mediaType: 'application/json',
1425
1438
  errors: {
1426
- 400: 'Invalid input data',
1427
- 409: 'Commodity already exists'
1439
+ 403: 'Cannot access other user info without admin permission'
1428
1440
  }
1429
1441
  });
1430
1442
  }
1431
1443
 
1432
1444
  /**
1433
- * List user commodities
1434
- * Returns all commodity definitions for the authenticated user with optional filtering
1445
+ * Update user settings
1435
1446
  * @param data The data for the request.
1436
- * @param data.region Region code for tenant context
1437
- * @param data.search Search term for symbol or metadata fields (partial match). Searches symbol and metadata.name.
1438
- * @param data.symbol Filter by exact symbol match
1439
- * @returns CommodityListResponseDto Commodities retrieved successfully
1447
+ * @param data.requestBody
1448
+ * @returns unknown Settings updated successfully
1440
1449
  * @throws ApiError
1441
1450
  */
1442
- public static commodityControllerFindAll(
1443
- data: CommodityControllerFindAllData
1444
- ): CancelablePromise<CommodityControllerFindAllResponse> {
1445
- return __request(OpenAPI, {
1446
- method: 'GET',
1447
- url: '/api/v1/{region}/bean/commodities',
1448
- path: {
1449
- region: data.region
1450
- },
1451
- query: {
1452
- search: data.search,
1453
- symbol: data.symbol
1454
- }
1455
- });
1456
- }
1457
-
1458
- /**
1459
- * Get commodity by symbol
1460
- * Returns a specific commodity definition by its symbol
1461
- * @param data The data for the request.
1462
- * @param data.symbol Commodity symbol
1463
- * @param data.region Region code for tenant context
1464
- * @returns CommodityResponseDto Commodity retrieved successfully
1465
- * @throws ApiError
1466
- */
1467
- public static commodityControllerFindOne(
1468
- data: CommodityControllerFindOneData
1469
- ): CancelablePromise<CommodityControllerFindOneResponse> {
1451
+ public static userControllerUpdateUserSetting(
1452
+ data: UserControllerUpdateUserSettingData
1453
+ ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
1470
1454
  return __request(OpenAPI, {
1471
- method: 'GET',
1472
- url: '/api/v1/{region}/bean/commodities/{symbol}',
1473
- path: {
1474
- symbol: data.symbol,
1475
- region: data.region
1476
- },
1455
+ method: 'PUT',
1456
+ url: '/api/v1/users/setting',
1457
+ body: data.requestBody,
1458
+ mediaType: 'application/json',
1477
1459
  errors: {
1478
- 404: 'Commodity not found'
1460
+ 403: 'Insufficient permissions'
1479
1461
  }
1480
1462
  });
1481
1463
  }
1482
1464
 
1483
1465
  /**
1484
- * Update commodity
1485
- * Updates an existing commodity definition. Symbol cannot be changed.
1466
+ * Get all user settings paginated (admin only)
1486
1467
  * @param data The data for the request.
1487
- * @param data.symbol Commodity symbol
1488
- * @param data.region Region code for tenant context
1489
- * @param data.requestBody
1490
- * @returns CommodityResponseDto Commodity updated successfully
1468
+ * @param data.pageNo Page number
1469
+ * @param data.pageSize Page size
1470
+ * @returns unknown Settings list retrieved successfully
1491
1471
  * @throws ApiError
1492
1472
  */
1493
- public static commodityControllerUpdate(
1494
- data: CommodityControllerUpdateData
1495
- ): CancelablePromise<CommodityControllerUpdateResponse> {
1473
+ public static userControllerGetAllUserSettingsByPage(
1474
+ data: UserControllerGetAllUserSettingsByPageData
1475
+ ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
1496
1476
  return __request(OpenAPI, {
1497
- method: 'PUT',
1498
- url: '/api/v1/{region}/bean/commodities/{symbol}',
1499
- path: {
1500
- symbol: data.symbol,
1501
- region: data.region
1502
- },
1503
- body: data.requestBody,
1504
- mediaType: 'application/json',
1505
- errors: {
1506
- 400: 'Invalid input data',
1507
- 404: 'Commodity not found'
1477
+ method: 'GET',
1478
+ url: '/api/v1/users/settings-by-page',
1479
+ query: {
1480
+ pageNo: data.pageNo,
1481
+ pageSize: data.pageSize
1508
1482
  }
1509
1483
  });
1510
1484
  }
1511
1485
 
1512
1486
  /**
1513
- * Delete commodity
1514
- * Deletes a commodity definition
1515
- * @param data The data for the request.
1516
- * @param data.symbol Commodity symbol
1517
- * @param data.region Region code for tenant context
1518
- * @returns void Commodity deleted successfully
1487
+ * Get asset and liability summary for current user
1488
+ * @returns unknown Summary retrieved successfully
1519
1489
  * @throws ApiError
1520
1490
  */
1521
- public static commodityControllerDelete(
1522
- data: CommodityControllerDeleteData
1523
- ): CancelablePromise<CommodityControllerDeleteResponse> {
1491
+ public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
1524
1492
  return __request(OpenAPI, {
1525
- method: 'DELETE',
1526
- url: '/api/v1/{region}/bean/commodities/{symbol}',
1527
- path: {
1528
- symbol: data.symbol,
1529
- region: data.region
1530
- },
1531
- errors: {
1532
- 404: 'Commodity not found'
1533
- }
1493
+ method: 'GET',
1494
+ url: '/api/v1/users/asset-liability-summary'
1534
1495
  });
1535
1496
  }
1497
+ }
1536
1498
 
1499
+ export class PropertiesService {
1537
1500
  /**
1538
- * Ensure commodity exists
1539
- * Gets existing commodity or creates it with automatic initialization from OpenBB
1540
- * @param data The data for the request.
1541
- * @param data.symbol Commodity symbol
1542
- * @param data.region Region code for tenant context
1543
- * @returns CommodityResponseDto Commodity retrieved or created
1501
+ * Get all system properties
1502
+ * @returns unknown Properties retrieved successfully
1544
1503
  * @throws ApiError
1545
1504
  */
1546
- public static commodityControllerGetOrCreate(
1547
- data: CommodityControllerGetOrCreateData
1548
- ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
1505
+ public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
1549
1506
  return __request(OpenAPI, {
1550
- method: 'POST',
1551
- url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
1552
- path: {
1553
- symbol: data.symbol,
1554
- region: data.region
1507
+ method: 'GET',
1508
+ url: '/api/v1/admin/properties',
1509
+ errors: {
1510
+ 401: 'Unauthorized',
1511
+ 403: 'Forbidden - insufficient permissions'
1555
1512
  }
1556
1513
  });
1557
1514
  }
1558
1515
 
1559
1516
  /**
1560
- * Bulk create commodities
1561
- * Creates multiple commodities from a list of symbols, useful for initialization
1517
+ * Get property by key
1562
1518
  * @param data The data for the request.
1563
- * @param data.region Region code for tenant context
1564
- * @returns CommodityResponseDto Commodities created successfully
1519
+ * @param data.key Property key
1520
+ * @returns unknown Property retrieved successfully
1565
1521
  * @throws ApiError
1566
1522
  */
1567
- public static commodityControllerBulkCreate(
1568
- data: CommodityControllerBulkCreateData
1569
- ): CancelablePromise<CommodityControllerBulkCreateResponse> {
1523
+ public static propertyControllerGetByKey(
1524
+ data: PropertyControllerGetByKeyData
1525
+ ): CancelablePromise<PropertyControllerGetByKeyResponse> {
1570
1526
  return __request(OpenAPI, {
1571
- method: 'POST',
1572
- url: '/api/v1/{region}/bean/commodities/bulk',
1527
+ method: 'GET',
1528
+ url: '/api/v1/admin/properties/{key}',
1573
1529
  path: {
1574
- region: data.region
1530
+ key: data.key
1531
+ },
1532
+ errors: {
1533
+ 401: 'Unauthorized',
1534
+ 403: 'Forbidden - insufficient permissions',
1535
+ 404: 'Property not found'
1575
1536
  }
1576
1537
  });
1577
1538
  }
1578
- }
1579
1539
 
1580
- export class ReportingService {
1581
1540
  /**
1582
- * Get portfolio value trends
1583
- *
1584
- * Returns time series data of portfolio net worth.
1585
- *
1586
- * **Multi-currency Support:**
1587
- * - `series[].byCurrency` - Currency breakdown for each data point
1588
- * - `byCurrency` - Separate time series grouped by currency
1589
- * - `warnings` - Exchange rate warnings if conversion failed
1590
- *
1591
- * **Parameters:**
1592
- * - `period`: Time period (1m, 3m, 6m, 1y)
1593
- * - `granularity`: Data granularity (day, week, month)
1594
- *
1541
+ * Update a system property
1595
1542
  * @param data The data for the request.
1596
- * @param data.region Region code for tenant context
1597
- * @param data.period Time period
1598
- * @param data.granularity Data granularity
1599
- * @returns PortfolioTrendsResponseDto Trends retrieved successfully
1543
+ * @param data.key Property key
1544
+ * @param data.requestBody
1545
+ * @returns unknown Property updated successfully
1600
1546
  * @throws ApiError
1601
1547
  */
1602
- public static reportingControllerGetPortfolioTrends(
1603
- data: ReportingControllerGetPortfolioTrendsData
1604
- ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
1548
+ public static propertyControllerUpdate(
1549
+ data: PropertyControllerUpdateData
1550
+ ): CancelablePromise<PropertyControllerUpdateResponse> {
1605
1551
  return __request(OpenAPI, {
1606
- method: 'GET',
1607
- url: '/api/v1/{region}/reporting/portfolio/trends',
1552
+ method: 'PUT',
1553
+ url: '/api/v1/admin/properties/{key}',
1608
1554
  path: {
1609
- region: data.region
1610
- },
1611
- query: {
1612
- period: data.period,
1613
- granularity: data.granularity
1555
+ key: data.key
1614
1556
  },
1557
+ body: data.requestBody,
1558
+ mediaType: 'application/json',
1615
1559
  errors: {
1616
- 401: 'User not authenticated'
1560
+ 401: 'Unauthorized',
1561
+ 403: 'Forbidden - insufficient permissions'
1617
1562
  }
1618
1563
  });
1619
1564
  }
1620
1565
 
1621
1566
  /**
1622
- * Get cash-flow trends
1623
- *
1624
- * Monthly income / expense / netSavings over a fixed N-month window
1625
- * (current month + N−1 prior). Missing months are zero-filled (flow metric).
1626
- *
1627
- * **Parameters:**
1628
- * - `period`: 1m | 3m | 6m | 1y (default 6m)
1629
- * - `granularity`: accepted for API symmetry; v1 returns month buckets
1630
- *
1567
+ * Delete a system property
1631
1568
  * @param data The data for the request.
1632
- * @param data.region Region code for tenant context
1633
- * @param data.period Time period
1634
- * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
1635
- * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
1569
+ * @param data.key Property key
1570
+ * @returns void Property deleted successfully
1636
1571
  * @throws ApiError
1637
1572
  */
1638
- public static reportingControllerGetCashFlowTrends(
1639
- data: ReportingControllerGetCashFlowTrendsData
1640
- ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
1573
+ public static propertyControllerDelete(
1574
+ data: PropertyControllerDeleteData
1575
+ ): CancelablePromise<PropertyControllerDeleteResponse> {
1641
1576
  return __request(OpenAPI, {
1642
- method: 'GET',
1643
- url: '/api/v1/{region}/reporting/cash-flow/trends',
1577
+ method: 'DELETE',
1578
+ url: '/api/v1/admin/properties/{key}',
1644
1579
  path: {
1645
- region: data.region
1646
- },
1647
- query: {
1648
- period: data.period,
1649
- granularity: data.granularity
1580
+ key: data.key
1650
1581
  },
1651
1582
  errors: {
1652
- 401: 'User not authenticated'
1583
+ 401: 'Unauthorized',
1584
+ 403: 'Forbidden - insufficient permissions',
1585
+ 404: 'Property not found'
1653
1586
  }
1654
1587
  });
1655
1588
  }
1589
+ }
1656
1590
 
1591
+ export class BeanPayeesService {
1657
1592
  /**
1658
- * Generate portfolio snapshot
1659
- *
1660
- * Manually generate a portfolio snapshot for a specific date.
1661
- *
1662
- * **Multi-currency Support:**
1663
- * - Fetches balances grouped by currency
1664
- * - Uses user's baseCurrency setting for conversion
1665
- * - Stores exchange rates and warnings
1666
- *
1667
- * **Use Cases:**
1668
- * - Testing snapshot generation
1669
- * - Force regeneration after data correction
1670
- * - Initial setup for new users
1671
- *
1593
+ * Create a new payee
1594
+ * Creates a new payee mapping for the authenticated user. The payee name must be unique within the user's account.
1672
1595
  * @param data The data for the request.
1673
- * @param data.region Region code for tenant context
1674
- * @param data.requestBody Optional date (defaults to today)
1675
- * @returns GenerateSnapshotResponse Snapshot generated successfully
1596
+ * @param data.requestBody
1597
+ * @returns PayeeResponseDto Payee created successfully
1676
1598
  * @throws ApiError
1677
1599
  */
1678
- public static reportingControllerGenerateSnapshot(
1679
- data: ReportingControllerGenerateSnapshotData
1680
- ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
1600
+ public static payeeControllerCreate(
1601
+ data: PayeeControllerCreateData
1602
+ ): CancelablePromise<PayeeControllerCreateResponse> {
1681
1603
  return __request(OpenAPI, {
1682
1604
  method: 'POST',
1683
- url: '/api/v1/{region}/reporting/snapshots/generate',
1684
- path: {
1685
- region: data.region
1686
- },
1605
+ url: '/api/v1/bean/payees',
1687
1606
  body: data.requestBody,
1688
1607
  mediaType: 'application/json',
1689
1608
  errors: {
1690
- 400: 'Invalid date format',
1691
- 401: 'User not authenticated'
1609
+ 400: 'Invalid input data',
1610
+ 409: 'Payee already exists'
1692
1611
  }
1693
1612
  });
1694
1613
  }
1695
1614
 
1696
1615
  /**
1697
- * Backfill portfolio snapshots
1698
- *
1699
- * Generate snapshots for a date range (historical data backfill).
1700
- *
1701
- * **Multi-currency Support:**
1702
- * - Each snapshot includes multi-currency data
1703
- * - Uses exchange rates available at generation time
1704
- * - Warnings stored for missing exchange rates
1705
- *
1706
- * **Best Practices:**
1707
- * - Use for initial setup after account configuration
1708
- * - Run during low-traffic periods for large date ranges
1709
- * - Existing snapshots are skipped (not regenerated)
1710
- *
1616
+ * List user payees
1617
+ * Returns all payee mappings for the authenticated user with optional filtering
1711
1618
  * @param data The data for the request.
1712
- * @param data.region Region code for tenant context
1713
- * @param data.requestBody
1714
- * @returns BackfillSnapshotsResponse Backfill completed successfully
1619
+ * @param data.search Search term for payee name (partial match, case-insensitive). Useful for autocomplete.
1620
+ * @param data.payee Filter by exact payee name match
1621
+ * @param data.category Filter by custom category
1622
+ * @param data.tag Filter by custom tag (returns payees that have this tag)
1623
+ * @param data.isActive Filter by active status. Defaults to true (show only active payees).
1624
+ * @returns PayeeListResponseDto Payees retrieved successfully
1715
1625
  * @throws ApiError
1716
1626
  */
1717
- public static reportingControllerBackfillSnapshots(
1718
- data: ReportingControllerBackfillSnapshotsData
1719
- ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
1627
+ public static payeeControllerFindAll(
1628
+ data: PayeeControllerFindAllData = {}
1629
+ ): CancelablePromise<PayeeControllerFindAllResponse> {
1720
1630
  return __request(OpenAPI, {
1721
- method: 'POST',
1722
- url: '/api/v1/{region}/reporting/snapshots/backfill',
1723
- path: {
1724
- region: data.region
1725
- },
1726
- body: data.requestBody,
1727
- mediaType: 'application/json',
1728
- errors: {
1729
- 400: 'Invalid date format or range',
1730
- 401: 'User not authenticated',
1731
- 409: 'Backfill already in progress for this user'
1631
+ method: 'GET',
1632
+ url: '/api/v1/bean/payees',
1633
+ query: {
1634
+ search: data.search,
1635
+ payee: data.payee,
1636
+ category: data.category,
1637
+ tag: data.tag,
1638
+ isActive: data.isActive
1732
1639
  }
1733
1640
  });
1734
1641
  }
1735
- }
1736
1642
 
1737
- export class BeanPricesService {
1738
1643
  /**
1739
- * Create a new price
1740
- * Creates a new price entry for the authenticated user
1644
+ * Get payee autocomplete suggestions
1645
+ * Returns active payee names matching the query, sorted by recent usage. Used for transaction input autocomplete.
1741
1646
  * @param data The data for the request.
1742
- * @param data.region Region code for tenant context
1743
- * @param data.requestBody
1744
- * @returns PriceResponseDto Price created successfully
1647
+ * @param data.q Search query for payee name (partial match, case-insensitive)
1648
+ * @param data.limit Maximum number of suggestions
1649
+ * @returns PayeeAutocompleteResponseDto Autocomplete suggestions retrieved successfully
1745
1650
  * @throws ApiError
1746
1651
  */
1747
- public static priceControllerCreate(
1748
- data: PriceControllerCreateData
1749
- ): CancelablePromise<PriceControllerCreateResponse> {
1652
+ public static payeeControllerAutocomplete(
1653
+ data: PayeeControllerAutocompleteData
1654
+ ): CancelablePromise<PayeeControllerAutocompleteResponse> {
1750
1655
  return __request(OpenAPI, {
1751
- method: 'POST',
1752
- url: '/api/v1/{region}/bean/prices',
1753
- path: {
1754
- region: data.region
1755
- },
1756
- body: data.requestBody,
1757
- mediaType: 'application/json',
1758
- errors: {
1759
- 404: 'Currency or quoteCurrency commodity not found',
1760
- 409: 'Price already exists for this currency pair and date'
1656
+ method: 'GET',
1657
+ url: '/api/v1/bean/payees/autocomplete',
1658
+ query: {
1659
+ q: data.q,
1660
+ limit: data.limit
1761
1661
  }
1762
1662
  });
1763
1663
  }
1764
1664
 
1765
1665
  /**
1766
- * List user prices
1767
- * Returns all price entries for the authenticated user with optional filtering
1666
+ * Get top payees by usage
1667
+ * Returns the most frequently used payees, sorted by use count. Used for statistics and analytics.
1768
1668
  * @param data The data for the request.
1769
- * @param data.region Region code for tenant context
1770
- * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
1771
- * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
1772
- * @param data.dateFrom Filter prices from this date (ISO 8601 format)
1773
- * @param data.dateTo Filter prices to this date (ISO 8601 format)
1774
- * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
1775
- * @param data.page Page number for pagination (default: 1)
1776
- * @param data.limit Number of items per page (default: 20, max: 100)
1777
- * @returns PriceListResponseDto Prices retrieved successfully
1669
+ * @param data.limit Maximum number of results
1670
+ * @returns PayeeStatsResponseDto Top payees retrieved successfully
1778
1671
  * @throws ApiError
1779
1672
  */
1780
- public static priceControllerFindAll(
1781
- data: PriceControllerFindAllData
1782
- ): CancelablePromise<PriceControllerFindAllResponse> {
1673
+ public static payeeControllerGetTopPayees(
1674
+ data: PayeeControllerGetTopPayeesData = {}
1675
+ ): CancelablePromise<PayeeControllerGetTopPayeesResponse> {
1783
1676
  return __request(OpenAPI, {
1784
1677
  method: 'GET',
1785
- url: '/api/v1/{region}/bean/prices',
1786
- path: {
1787
- region: data.region
1788
- },
1678
+ url: '/api/v1/bean/payees/top',
1789
1679
  query: {
1790
- currency: data.currency,
1791
- quoteCurrency: data.quoteCurrency,
1792
- dateFrom: data.dateFrom,
1793
- dateTo: data.dateTo,
1794
- search: data.search,
1795
- page: data.page,
1796
1680
  limit: data.limit
1797
1681
  }
1798
1682
  });
1799
1683
  }
1800
1684
 
1801
1685
  /**
1802
- * Get price by ID
1803
- * Returns a single price entry by its ID
1686
+ * Get payee by ID
1687
+ * Returns a specific payee mapping by its UUID
1804
1688
  * @param data The data for the request.
1805
- * @param data.id Price ID
1806
- * @param data.region Region code for tenant context
1807
- * @returns PriceResponseDto Price retrieved successfully
1689
+ * @param data.id Payee UUID
1690
+ * @returns PayeeResponseDto Payee retrieved successfully
1808
1691
  * @throws ApiError
1809
1692
  */
1810
- public static priceControllerFindOne(
1811
- data: PriceControllerFindOneData
1812
- ): CancelablePromise<PriceControllerFindOneResponse> {
1693
+ public static payeeControllerFindOne(
1694
+ data: PayeeControllerFindOneData
1695
+ ): CancelablePromise<PayeeControllerFindOneResponse> {
1813
1696
  return __request(OpenAPI, {
1814
1697
  method: 'GET',
1815
- url: '/api/v1/{region}/bean/prices/{id}',
1698
+ url: '/api/v1/bean/payees/{id}',
1816
1699
  path: {
1817
- id: data.id,
1818
- region: data.region
1700
+ id: data.id
1819
1701
  },
1820
1702
  errors: {
1821
- 404: 'Price not found'
1703
+ 403: 'Payee belongs to another user',
1704
+ 404: 'Payee not found'
1822
1705
  }
1823
1706
  });
1824
1707
  }
1825
1708
 
1826
1709
  /**
1827
- * Update a price
1828
- * Updates an existing price entry
1710
+ * Update payee
1711
+ * Updates a payee mapping. The payee name cannot be changed after creation.
1829
1712
  * @param data The data for the request.
1830
- * @param data.id Price ID
1831
- * @param data.region Region code for tenant context
1713
+ * @param data.id Payee UUID
1832
1714
  * @param data.requestBody
1833
- * @returns PriceResponseDto Price updated successfully
1715
+ * @returns PayeeResponseDto Payee updated successfully
1834
1716
  * @throws ApiError
1835
1717
  */
1836
- public static priceControllerUpdate(
1837
- data: PriceControllerUpdateData
1838
- ): CancelablePromise<PriceControllerUpdateResponse> {
1718
+ public static payeeControllerUpdate(
1719
+ data: PayeeControllerUpdateData
1720
+ ): CancelablePromise<PayeeControllerUpdateResponse> {
1839
1721
  return __request(OpenAPI, {
1840
1722
  method: 'PUT',
1841
- url: '/api/v1/{region}/bean/prices/{id}',
1723
+ url: '/api/v1/bean/payees/{id}',
1842
1724
  path: {
1843
- id: data.id,
1844
- region: data.region
1725
+ id: data.id
1845
1726
  },
1846
1727
  body: data.requestBody,
1847
1728
  mediaType: 'application/json',
1848
1729
  errors: {
1849
- 404: 'Price not found',
1850
- 409: 'Updated price conflicts with existing price'
1730
+ 400: 'Invalid input data',
1731
+ 404: 'Payee not found'
1851
1732
  }
1852
1733
  });
1853
1734
  }
1854
1735
 
1855
1736
  /**
1856
- * Delete a price
1857
- * Deletes a price entry (hard delete)
1737
+ * Delete payee
1738
+ * Soft deletes a payee by marking it as inactive. Inactive payees will not appear in autocomplete suggestions.
1858
1739
  * @param data The data for the request.
1859
- * @param data.id Price ID
1860
- * @param data.region Region code for tenant context
1861
- * @returns void Price deleted successfully
1740
+ * @param data.id Payee UUID
1741
+ * @returns void Payee deleted successfully
1862
1742
  * @throws ApiError
1863
1743
  */
1864
- public static priceControllerDelete(
1865
- data: PriceControllerDeleteData
1866
- ): CancelablePromise<PriceControllerDeleteResponse> {
1744
+ public static payeeControllerDelete(
1745
+ data: PayeeControllerDeleteData
1746
+ ): CancelablePromise<PayeeControllerDeleteResponse> {
1867
1747
  return __request(OpenAPI, {
1868
1748
  method: 'DELETE',
1869
- url: '/api/v1/{region}/bean/prices/{id}',
1749
+ url: '/api/v1/bean/payees/{id}',
1870
1750
  path: {
1871
- id: data.id,
1872
- region: data.region
1751
+ id: data.id
1873
1752
  },
1874
1753
  errors: {
1875
- 404: 'Price not found'
1754
+ 404: 'Payee not found'
1876
1755
  }
1877
1756
  });
1878
1757
  }
1758
+ }
1879
1759
 
1760
+ export class AdminPayeeProfilesService {
1880
1761
  /**
1881
- * Bulk create prices
1882
- * Creates multiple price entries at once (skips duplicates)
1762
+ * Create payee profile (Admin only)
1763
+ * Creates a new global payee profile. The canonical name must be unique (case-insensitive).
1883
1764
  * @param data The data for the request.
1884
- * @param data.region Region code for tenant context
1885
1765
  * @param data.requestBody
1886
- * @returns PriceResponseDto Prices created successfully
1766
+ * @returns PayeeProfileResponseDto Payee profile created successfully
1887
1767
  * @throws ApiError
1888
1768
  */
1889
- public static priceControllerBulkCreate(
1890
- data: PriceControllerBulkCreateData
1891
- ): CancelablePromise<PriceControllerBulkCreateResponse> {
1769
+ public static payeeProfileAdminControllerCreate(
1770
+ data: PayeeProfileAdminControllerCreateData
1771
+ ): CancelablePromise<PayeeProfileAdminControllerCreateResponse> {
1892
1772
  return __request(OpenAPI, {
1893
1773
  method: 'POST',
1894
- url: '/api/v1/{region}/bean/prices/bulk',
1895
- path: {
1896
- region: data.region
1897
- },
1774
+ url: '/api/v1/admin/payee-profiles',
1898
1775
  body: data.requestBody,
1899
- mediaType: 'application/json'
1776
+ mediaType: 'application/json',
1777
+ errors: {
1778
+ 400: 'Validation failed',
1779
+ 403: 'Admin access required',
1780
+ 409: 'Payee profile already exists'
1781
+ }
1900
1782
  });
1901
1783
  }
1902
- }
1903
1784
 
1904
- export class UsersService {
1905
1785
  /**
1906
- * Delete own user account
1786
+ * List payee profiles (Admin only)
1787
+ * Returns all payee profiles with optional filtering by category, country, verification status, etc.
1907
1788
  * @param data The data for the request.
1908
- * @param data.requestBody
1909
- * @returns void User deleted successfully
1789
+ * @param data.search Search term for canonical name and aliases (case-insensitive)
1790
+ * @param data.category Filter by category
1791
+ * @param data.country Filter by country (ISO 3166-1 alpha-2)
1792
+ * @param data.isActive Filter by active status (default: true - show only active)
1793
+ * @param data.verified Filter by verification status. true = verified only, false = unverified only
1794
+ * @param data.dataSource Filter by data source
1795
+ * @returns PayeeProfileListResponseDto Payee profiles retrieved successfully
1910
1796
  * @throws ApiError
1911
1797
  */
1912
- public static userControllerDeleteOwnUser(
1913
- data: UserControllerDeleteOwnUserData
1914
- ): CancelablePromise<UserControllerDeleteOwnUserResponse> {
1798
+ public static payeeProfileAdminControllerFindAll(
1799
+ data: PayeeProfileAdminControllerFindAllData = {}
1800
+ ): CancelablePromise<PayeeProfileAdminControllerFindAllResponse> {
1915
1801
  return __request(OpenAPI, {
1916
- method: 'DELETE',
1917
- url: '/api/v1/users',
1918
- body: data.requestBody,
1919
- mediaType: 'application/json',
1802
+ method: 'GET',
1803
+ url: '/api/v1/admin/payee-profiles',
1804
+ query: {
1805
+ search: data.search,
1806
+ category: data.category,
1807
+ country: data.country,
1808
+ isActive: data.isActive,
1809
+ verified: data.verified,
1810
+ dataSource: data.dataSource
1811
+ },
1920
1812
  errors: {
1921
- 403: 'Invalid access token'
1813
+ 403: 'Admin access required'
1922
1814
  }
1923
1815
  });
1924
1816
  }
1925
1817
 
1926
1818
  /**
1927
- * Get current authenticated user
1819
+ * Get payee profile by ID (Admin only)
1820
+ * Returns a single payee profile by its ID.
1928
1821
  * @param data The data for the request.
1929
- * @param data.acceptLanguage
1930
- * @returns UserResponseDto User retrieved successfully
1822
+ * @param data.id Payee profile ID (UUID)
1823
+ * @returns PayeeProfileResponseDto Payee profile retrieved successfully
1931
1824
  * @throws ApiError
1932
1825
  */
1933
- public static userControllerGetUser(
1934
- data: UserControllerGetUserData
1935
- ): CancelablePromise<UserControllerGetUserResponse> {
1826
+ public static payeeProfileAdminControllerFindOne(
1827
+ data: PayeeProfileAdminControllerFindOneData
1828
+ ): CancelablePromise<PayeeProfileAdminControllerFindOneResponse> {
1936
1829
  return __request(OpenAPI, {
1937
1830
  method: 'GET',
1938
- url: '/api/v1/users',
1939
- headers: {
1940
- 'accept-language': data.acceptLanguage
1831
+ url: '/api/v1/admin/payee-profiles/{id}',
1832
+ path: {
1833
+ id: data.id
1834
+ },
1835
+ errors: {
1836
+ 403: 'Admin access required',
1837
+ 404: 'Payee profile not found'
1941
1838
  }
1942
1839
  });
1943
1840
  }
1944
1841
 
1945
1842
  /**
1946
- * Sign up new user
1947
- * Create a new account with auto-generated access token. Protected by Cloudflare Turnstile to prevent automated signup (when enabled).
1843
+ * Update payee profile (Admin only)
1844
+ * Updates an existing payee profile. The canonical name cannot be changed.
1948
1845
  * @param data The data for the request.
1846
+ * @param data.id Payee profile ID (UUID)
1949
1847
  * @param data.requestBody
1950
- * @returns SignupResponseDto User created successfully
1848
+ * @returns PayeeProfileResponseDto Payee profile updated successfully
1951
1849
  * @throws ApiError
1952
1850
  */
1953
- public static userControllerSignupUser(
1954
- data: UserControllerSignupUserData
1955
- ): CancelablePromise<UserControllerSignupUserResponse> {
1851
+ public static payeeProfileAdminControllerUpdate(
1852
+ data: PayeeProfileAdminControllerUpdateData
1853
+ ): CancelablePromise<PayeeProfileAdminControllerUpdateResponse> {
1956
1854
  return __request(OpenAPI, {
1957
- method: 'POST',
1958
- url: '/api/v1/users',
1855
+ method: 'PUT',
1856
+ url: '/api/v1/admin/payee-profiles/{id}',
1857
+ path: {
1858
+ id: data.id
1859
+ },
1959
1860
  body: data.requestBody,
1960
1861
  mediaType: 'application/json',
1961
1862
  errors: {
1962
- 400: 'Invalid Turnstile token (when Turnstile is enabled)',
1963
- 403: 'User signup is disabled'
1863
+ 403: 'Admin access required',
1864
+ 404: 'Payee profile not found'
1964
1865
  }
1965
1866
  });
1966
1867
  }
1967
1868
 
1968
1869
  /**
1969
- * Delete user by ID (admin only)
1870
+ * Soft delete payee profile (Admin only)
1871
+ * Marks a payee profile as inactive (soft delete). The profile cannot be deleted if it is referenced by user payees.
1970
1872
  * @param data The data for the request.
1971
- * @param data.id User ID to delete
1972
- * @returns void User deleted successfully
1873
+ * @param data.id Payee profile ID (UUID)
1874
+ * @returns void Payee profile deleted successfully
1973
1875
  * @throws ApiError
1974
1876
  */
1975
- public static userControllerDeleteUser(
1976
- data: UserControllerDeleteUserData
1977
- ): CancelablePromise<UserControllerDeleteUserResponse> {
1877
+ public static payeeProfileAdminControllerDelete(
1878
+ data: PayeeProfileAdminControllerDeleteData
1879
+ ): CancelablePromise<PayeeProfileAdminControllerDeleteResponse> {
1978
1880
  return __request(OpenAPI, {
1979
1881
  method: 'DELETE',
1980
- url: '/api/v1/users/{id}',
1882
+ url: '/api/v1/admin/payee-profiles/{id}',
1981
1883
  path: {
1982
1884
  id: data.id
1983
1885
  },
1984
1886
  errors: {
1985
- 403: 'Cannot delete own account or insufficient permissions'
1887
+ 403: 'Admin access required',
1888
+ 404: 'Payee profile not found',
1889
+ 409: 'Payee profile is in use and cannot be deleted'
1986
1890
  }
1987
1891
  });
1988
1892
  }
1989
1893
 
1990
1894
  /**
1991
- * Get user info by user ID
1895
+ * Verify payee profile (Admin only)
1896
+ * Marks a payee profile as verified by setting verifiedAt to current timestamp.
1992
1897
  * @param data The data for the request.
1993
- * @param data.id User ID
1994
- * @returns unknown User info retrieved successfully
1898
+ * @param data.id Payee profile ID (UUID)
1899
+ * @returns PayeeProfileResponseDto Payee profile verified successfully
1995
1900
  * @throws ApiError
1996
1901
  */
1997
- public static userControllerGetUserInfo(
1998
- data: UserControllerGetUserInfoData
1999
- ): CancelablePromise<UserControllerGetUserInfoResponse> {
1902
+ public static payeeProfileAdminControllerVerify(
1903
+ data: PayeeProfileAdminControllerVerifyData
1904
+ ): CancelablePromise<PayeeProfileAdminControllerVerifyResponse> {
2000
1905
  return __request(OpenAPI, {
2001
- method: 'GET',
2002
- url: '/api/v1/users/{id}/info',
1906
+ method: 'POST',
1907
+ url: '/api/v1/admin/payee-profiles/{id}/verify',
2003
1908
  path: {
2004
1909
  id: data.id
2005
1910
  },
2006
1911
  errors: {
2007
- 403: 'Cannot access other user info without admin permission'
1912
+ 403: 'Admin access required',
1913
+ 404: 'Payee profile not found'
2008
1914
  }
2009
1915
  });
2010
1916
  }
2011
1917
 
2012
1918
  /**
2013
- * Update user settings
1919
+ * Unverify payee profile (Admin only)
1920
+ * Removes verification status by setting verifiedAt to null.
2014
1921
  * @param data The data for the request.
2015
- * @param data.requestBody
2016
- * @returns unknown Settings updated successfully
1922
+ * @param data.id Payee profile ID (UUID)
1923
+ * @returns void Payee profile unverified successfully
2017
1924
  * @throws ApiError
2018
1925
  */
2019
- public static userControllerUpdateUserSetting(
2020
- data: UserControllerUpdateUserSettingData
2021
- ): CancelablePromise<UserControllerUpdateUserSettingResponse> {
1926
+ public static payeeProfileAdminControllerUnverify(
1927
+ data: PayeeProfileAdminControllerUnverifyData
1928
+ ): CancelablePromise<PayeeProfileAdminControllerUnverifyResponse> {
2022
1929
  return __request(OpenAPI, {
2023
- method: 'PUT',
2024
- url: '/api/v1/users/setting',
2025
- body: data.requestBody,
2026
- mediaType: 'application/json',
1930
+ method: 'DELETE',
1931
+ url: '/api/v1/admin/payee-profiles/{id}/verify',
1932
+ path: {
1933
+ id: data.id
1934
+ },
2027
1935
  errors: {
2028
- 403: 'Insufficient permissions'
1936
+ 403: 'Admin access required',
1937
+ 404: 'Payee profile not found'
2029
1938
  }
2030
1939
  });
2031
1940
  }
1941
+ }
2032
1942
 
1943
+ export class PayeeProfilesService {
2033
1944
  /**
2034
- * Get all user settings paginated (admin only)
2035
- * @param data The data for the request.
2036
- * @param data.pageNo Page number
2037
- * @param data.pageSize Page size
2038
- * @returns unknown Settings list retrieved successfully
1945
+ * List active payee profiles (directory dump)
1946
+ * Returns the full active PayeeProfile set as a trimmed projection for client-side dictionary caching. Aliases are verbatim as stored; clients normalize on their side.
1947
+ * @returns PayeeProfileDirectoryResponseDto Active payee profiles
2039
1948
  * @throws ApiError
2040
1949
  */
2041
- public static userControllerGetAllUserSettingsByPage(
2042
- data: UserControllerGetAllUserSettingsByPageData
2043
- ): CancelablePromise<UserControllerGetAllUserSettingsByPageResponse> {
1950
+ public static payeeProfileControllerListActive(): CancelablePromise<PayeeProfileControllerListActiveResponse> {
2044
1951
  return __request(OpenAPI, {
2045
1952
  method: 'GET',
2046
- url: '/api/v1/users/settings-by-page',
2047
- query: {
2048
- pageNo: data.pageNo,
2049
- pageSize: data.pageSize
1953
+ url: '/api/v1/bean/payee-profiles',
1954
+ errors: {
1955
+ 401: 'Missing or invalid token'
2050
1956
  }
2051
1957
  });
2052
1958
  }
1959
+ }
2053
1960
 
1961
+ export class BeanCommoditiesService {
2054
1962
  /**
2055
- * Get asset and liability summary for current user
2056
- * @returns unknown Summary retrieved successfully
1963
+ * Create a new commodity
1964
+ * Creates a new commodity definition for the authenticated user
1965
+ * @param data The data for the request.
1966
+ * @param data.region Region code for tenant context
1967
+ * @param data.requestBody
1968
+ * @returns CommodityResponseDto Commodity created successfully
2057
1969
  * @throws ApiError
2058
1970
  */
2059
- public static userControllerGetAssetLiabilitySummary(): CancelablePromise<UserControllerGetAssetLiabilitySummaryResponse> {
1971
+ public static commodityControllerCreate(
1972
+ data: CommodityControllerCreateData
1973
+ ): CancelablePromise<CommodityControllerCreateResponse> {
2060
1974
  return __request(OpenAPI, {
2061
- method: 'GET',
2062
- url: '/api/v1/users/asset-liability-summary'
1975
+ method: 'POST',
1976
+ url: '/api/v1/{region}/bean/commodities',
1977
+ path: {
1978
+ region: data.region
1979
+ },
1980
+ body: data.requestBody,
1981
+ mediaType: 'application/json',
1982
+ errors: {
1983
+ 400: 'Invalid input data',
1984
+ 409: 'Commodity already exists'
1985
+ }
2063
1986
  });
2064
1987
  }
2065
- }
2066
1988
 
2067
- export class PropertiesService {
2068
1989
  /**
2069
- * Get all system properties
2070
- * @returns unknown Properties retrieved successfully
1990
+ * List user commodities
1991
+ * Returns all commodity definitions for the authenticated user with optional filtering
1992
+ * @param data The data for the request.
1993
+ * @param data.region Region code for tenant context
1994
+ * @param data.search Search term for symbol or metadata fields (partial match). Searches symbol and metadata.name.
1995
+ * @param data.symbol Filter by exact symbol match
1996
+ * @returns CommodityListResponseDto Commodities retrieved successfully
2071
1997
  * @throws ApiError
2072
1998
  */
2073
- public static propertyControllerGetAll(): CancelablePromise<PropertyControllerGetAllResponse> {
1999
+ public static commodityControllerFindAll(
2000
+ data: CommodityControllerFindAllData
2001
+ ): CancelablePromise<CommodityControllerFindAllResponse> {
2074
2002
  return __request(OpenAPI, {
2075
2003
  method: 'GET',
2076
- url: '/api/v1/admin/properties',
2077
- errors: {
2078
- 401: 'Unauthorized',
2079
- 403: 'Forbidden - insufficient permissions'
2004
+ url: '/api/v1/{region}/bean/commodities',
2005
+ path: {
2006
+ region: data.region
2007
+ },
2008
+ query: {
2009
+ search: data.search,
2010
+ symbol: data.symbol
2080
2011
  }
2081
2012
  });
2082
2013
  }
2083
2014
 
2084
2015
  /**
2085
- * Get property by key
2016
+ * Get commodity by symbol
2017
+ * Returns a specific commodity definition by its symbol
2086
2018
  * @param data The data for the request.
2087
- * @param data.key Property key
2088
- * @returns unknown Property retrieved successfully
2019
+ * @param data.symbol Commodity symbol
2020
+ * @param data.region Region code for tenant context
2021
+ * @returns CommodityResponseDto Commodity retrieved successfully
2089
2022
  * @throws ApiError
2090
2023
  */
2091
- public static propertyControllerGetByKey(
2092
- data: PropertyControllerGetByKeyData
2093
- ): CancelablePromise<PropertyControllerGetByKeyResponse> {
2024
+ public static commodityControllerFindOne(
2025
+ data: CommodityControllerFindOneData
2026
+ ): CancelablePromise<CommodityControllerFindOneResponse> {
2094
2027
  return __request(OpenAPI, {
2095
2028
  method: 'GET',
2096
- url: '/api/v1/admin/properties/{key}',
2029
+ url: '/api/v1/{region}/bean/commodities/{symbol}',
2097
2030
  path: {
2098
- key: data.key
2031
+ symbol: data.symbol,
2032
+ region: data.region
2099
2033
  },
2100
2034
  errors: {
2101
- 401: 'Unauthorized',
2102
- 403: 'Forbidden - insufficient permissions',
2103
- 404: 'Property not found'
2035
+ 404: 'Commodity not found'
2104
2036
  }
2105
2037
  });
2106
2038
  }
2107
2039
 
2108
2040
  /**
2109
- * Update a system property
2041
+ * Update commodity
2042
+ * Updates an existing commodity definition. Symbol cannot be changed.
2110
2043
  * @param data The data for the request.
2111
- * @param data.key Property key
2044
+ * @param data.symbol Commodity symbol
2045
+ * @param data.region Region code for tenant context
2112
2046
  * @param data.requestBody
2113
- * @returns unknown Property updated successfully
2047
+ * @returns CommodityResponseDto Commodity updated successfully
2114
2048
  * @throws ApiError
2115
2049
  */
2116
- public static propertyControllerUpdate(
2117
- data: PropertyControllerUpdateData
2118
- ): CancelablePromise<PropertyControllerUpdateResponse> {
2050
+ public static commodityControllerUpdate(
2051
+ data: CommodityControllerUpdateData
2052
+ ): CancelablePromise<CommodityControllerUpdateResponse> {
2119
2053
  return __request(OpenAPI, {
2120
2054
  method: 'PUT',
2121
- url: '/api/v1/admin/properties/{key}',
2055
+ url: '/api/v1/{region}/bean/commodities/{symbol}',
2122
2056
  path: {
2123
- key: data.key
2057
+ symbol: data.symbol,
2058
+ region: data.region
2124
2059
  },
2125
2060
  body: data.requestBody,
2126
2061
  mediaType: 'application/json',
2127
2062
  errors: {
2128
- 401: 'Unauthorized',
2129
- 403: 'Forbidden - insufficient permissions'
2063
+ 400: 'Invalid input data',
2064
+ 404: 'Commodity not found'
2130
2065
  }
2131
2066
  });
2132
2067
  }
2133
2068
 
2134
2069
  /**
2135
- * Delete a system property
2070
+ * Delete commodity
2071
+ * Deletes a commodity definition
2136
2072
  * @param data The data for the request.
2137
- * @param data.key Property key
2138
- * @returns void Property deleted successfully
2073
+ * @param data.symbol Commodity symbol
2074
+ * @param data.region Region code for tenant context
2075
+ * @returns void Commodity deleted successfully
2139
2076
  * @throws ApiError
2140
2077
  */
2141
- public static propertyControllerDelete(
2142
- data: PropertyControllerDeleteData
2143
- ): CancelablePromise<PropertyControllerDeleteResponse> {
2078
+ public static commodityControllerDelete(
2079
+ data: CommodityControllerDeleteData
2080
+ ): CancelablePromise<CommodityControllerDeleteResponse> {
2144
2081
  return __request(OpenAPI, {
2145
2082
  method: 'DELETE',
2146
- url: '/api/v1/admin/properties/{key}',
2083
+ url: '/api/v1/{region}/bean/commodities/{symbol}',
2147
2084
  path: {
2148
- key: data.key
2085
+ symbol: data.symbol,
2086
+ region: data.region
2149
2087
  },
2150
2088
  errors: {
2151
- 401: 'Unauthorized',
2152
- 403: 'Forbidden - insufficient permissions',
2153
- 404: 'Property not found'
2089
+ 404: 'Commodity not found'
2154
2090
  }
2155
2091
  });
2156
2092
  }
2157
- }
2158
2093
 
2159
- export class RecurringRulesService {
2160
2094
  /**
2161
- * Create a new recurring rule
2162
- * Creates a new recurring transaction rule for the authenticated user
2095
+ * Ensure commodity exists
2096
+ * Gets existing commodity or creates it with automatic initialization from OpenBB
2163
2097
  * @param data The data for the request.
2098
+ * @param data.symbol Commodity symbol
2164
2099
  * @param data.region Region code for tenant context
2165
- * @param data.requestBody
2166
- * @returns RecurringRuleResponseDto Rule created successfully
2100
+ * @returns CommodityResponseDto Commodity retrieved or created
2167
2101
  * @throws ApiError
2168
2102
  */
2169
- public static recurringRuleControllerCreate(
2170
- data: RecurringRuleControllerCreateData
2171
- ): CancelablePromise<RecurringRuleControllerCreateResponse> {
2103
+ public static commodityControllerGetOrCreate(
2104
+ data: CommodityControllerGetOrCreateData
2105
+ ): CancelablePromise<CommodityControllerGetOrCreateResponse> {
2172
2106
  return __request(OpenAPI, {
2173
2107
  method: 'POST',
2174
- url: '/api/v1/{region}/bean/recurring-rules',
2108
+ url: '/api/v1/{region}/bean/commodities/{symbol}/ensure',
2175
2109
  path: {
2110
+ symbol: data.symbol,
2176
2111
  region: data.region
2177
- },
2178
- body: data.requestBody,
2179
- mediaType: 'application/json',
2180
- errors: {
2181
- 400: 'Invalid input data (e.g., autoCreate without accounts)',
2182
- 409: 'Rule with same name already exists'
2183
2112
  }
2184
2113
  });
2185
2114
  }
2186
2115
 
2187
2116
  /**
2188
- * List recurring rules
2189
- * Returns all recurring rules for the authenticated user with optional filtering
2117
+ * Bulk create commodities
2118
+ * Creates multiple commodities from a list of symbols, useful for initialization
2190
2119
  * @param data The data for the request.
2191
2120
  * @param data.region Region code for tenant context
2192
- * @param data.isActive Filter by active status
2193
- * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
2194
- * @param data.hasAutoCreate Filter by autoCreate enabled
2195
- * @returns RecurringRuleResponseDto Rules retrieved successfully
2121
+ * @returns CommodityResponseDto Commodities created successfully
2196
2122
  * @throws ApiError
2197
2123
  */
2198
- public static recurringRuleControllerFindAll(
2199
- data: RecurringRuleControllerFindAllData
2200
- ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
2124
+ public static commodityControllerBulkCreate(
2125
+ data: CommodityControllerBulkCreateData
2126
+ ): CancelablePromise<CommodityControllerBulkCreateResponse> {
2201
2127
  return __request(OpenAPI, {
2202
- method: 'GET',
2203
- url: '/api/v1/{region}/bean/recurring-rules',
2128
+ method: 'POST',
2129
+ url: '/api/v1/{region}/bean/commodities/bulk',
2204
2130
  path: {
2205
2131
  region: data.region
2206
- },
2207
- query: {
2208
- isActive: data.isActive,
2209
- frequency: data.frequency,
2210
- hasAutoCreate: data.hasAutoCreate
2211
2132
  }
2212
2133
  });
2213
2134
  }
2135
+ }
2214
2136
 
2137
+ export class ReportingService {
2215
2138
  /**
2216
- * Create recurring rule from transaction
2217
- * Auto-creates a recurring rule using transaction data. User only confirms frequency.
2139
+ * Get portfolio value trends
2140
+ *
2141
+ * Returns time series data of portfolio net worth.
2142
+ *
2143
+ * **Multi-currency Support:**
2144
+ * - `series[].byCurrency` - Currency breakdown for each data point
2145
+ * - `byCurrency` - Separate time series grouped by currency
2146
+ * - `warnings` - Exchange rate warnings if conversion failed
2147
+ *
2148
+ * **Parameters:**
2149
+ * - `period`: Time period (1m, 3m, 6m, 1y)
2150
+ * - `granularity`: Data granularity (day, week, month)
2151
+ *
2218
2152
  * @param data The data for the request.
2219
- * @param data.transactionId Source transaction ID
2220
2153
  * @param data.region Region code for tenant context
2221
- * @param data.requestBody
2222
- * @returns RecurringRuleResponseDto Rule created successfully
2154
+ * @param data.period Time period
2155
+ * @param data.granularity Data granularity
2156
+ * @returns PortfolioTrendsResponseDto Trends retrieved successfully
2223
2157
  * @throws ApiError
2224
2158
  */
2225
- public static recurringRuleControllerCreateFromTransaction(
2226
- data: RecurringRuleControllerCreateFromTransactionData
2227
- ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2159
+ public static reportingControllerGetPortfolioTrends(
2160
+ data: ReportingControllerGetPortfolioTrendsData
2161
+ ): CancelablePromise<ReportingControllerGetPortfolioTrendsResponse> {
2228
2162
  return __request(OpenAPI, {
2229
- method: 'POST',
2230
- url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2163
+ method: 'GET',
2164
+ url: '/api/v1/{region}/reporting/portfolio/trends',
2231
2165
  path: {
2232
- transactionId: data.transactionId,
2233
2166
  region: data.region
2234
2167
  },
2235
- body: data.requestBody,
2236
- mediaType: 'application/json',
2168
+ query: {
2169
+ period: data.period,
2170
+ granularity: data.granularity
2171
+ },
2237
2172
  errors: {
2238
- 404: 'Transaction not found',
2239
- 409: 'Rule with same name already exists or transaction already linked'
2173
+ 401: 'User not authenticated'
2240
2174
  }
2241
2175
  });
2242
2176
  }
2243
2177
 
2244
2178
  /**
2245
- * Get recurring rule by ID
2246
- * Returns a specific recurring rule with its details
2179
+ * Get cash-flow trends
2180
+ *
2181
+ * Monthly income / expense / netSavings over a fixed N-month window
2182
+ * (current month + N−1 prior). Missing months are zero-filled (flow metric).
2183
+ *
2184
+ * **Parameters:**
2185
+ * - `period`: 1m | 3m | 6m | 1y (default 6m)
2186
+ * - `granularity`: accepted for API symmetry; v1 returns month buckets
2187
+ *
2247
2188
  * @param data The data for the request.
2248
- * @param data.id Rule ID
2249
2189
  * @param data.region Region code for tenant context
2250
- * @returns RecurringRuleResponseDto Rule retrieved successfully
2190
+ * @param data.period Time period
2191
+ * @param data.granularity Data granularity (accepted for API symmetry; v1 returns month buckets)
2192
+ * @returns CashFlowTrendsResponseDto Cash-flow trends retrieved successfully
2251
2193
  * @throws ApiError
2252
2194
  */
2253
- public static recurringRuleControllerFindOne(
2254
- data: RecurringRuleControllerFindOneData
2255
- ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2195
+ public static reportingControllerGetCashFlowTrends(
2196
+ data: ReportingControllerGetCashFlowTrendsData
2197
+ ): CancelablePromise<ReportingControllerGetCashFlowTrendsResponse> {
2256
2198
  return __request(OpenAPI, {
2257
2199
  method: 'GET',
2258
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2200
+ url: '/api/v1/{region}/reporting/cash-flow/trends',
2259
2201
  path: {
2260
- id: data.id,
2261
2202
  region: data.region
2262
2203
  },
2204
+ query: {
2205
+ period: data.period,
2206
+ granularity: data.granularity
2207
+ },
2263
2208
  errors: {
2264
- 404: 'Rule not found'
2209
+ 401: 'User not authenticated'
2265
2210
  }
2266
2211
  });
2267
2212
  }
2268
2213
 
2269
2214
  /**
2270
- * Update recurring rule
2271
- * Updates an existing recurring rule
2215
+ * Generate portfolio snapshot
2216
+ *
2217
+ * Manually generate a portfolio snapshot for a specific date.
2218
+ *
2219
+ * **Multi-currency Support:**
2220
+ * - Fetches balances grouped by currency
2221
+ * - Uses user's baseCurrency setting for conversion
2222
+ * - Stores exchange rates and warnings
2223
+ *
2224
+ * **Use Cases:**
2225
+ * - Testing snapshot generation
2226
+ * - Force regeneration after data correction
2227
+ * - Initial setup for new users
2228
+ *
2272
2229
  * @param data The data for the request.
2273
- * @param data.id Rule ID
2274
2230
  * @param data.region Region code for tenant context
2275
- * @param data.requestBody
2276
- * @returns RecurringRuleResponseDto Rule updated successfully
2231
+ * @param data.requestBody Optional date (defaults to today)
2232
+ * @returns GenerateSnapshotResponse Snapshot generated successfully
2277
2233
  * @throws ApiError
2278
2234
  */
2279
- public static recurringRuleControllerUpdate(
2280
- data: RecurringRuleControllerUpdateData
2281
- ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2235
+ public static reportingControllerGenerateSnapshot(
2236
+ data: ReportingControllerGenerateSnapshotData
2237
+ ): CancelablePromise<ReportingControllerGenerateSnapshotResponse> {
2282
2238
  return __request(OpenAPI, {
2283
- method: 'PATCH',
2284
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2239
+ method: 'POST',
2240
+ url: '/api/v1/{region}/reporting/snapshots/generate',
2285
2241
  path: {
2286
- id: data.id,
2287
2242
  region: data.region
2288
2243
  },
2289
2244
  body: data.requestBody,
2290
2245
  mediaType: 'application/json',
2291
2246
  errors: {
2292
- 400: 'Invalid input data',
2293
- 404: 'Rule not found'
2247
+ 400: 'Invalid date format',
2248
+ 401: 'User not authenticated'
2294
2249
  }
2295
2250
  });
2296
2251
  }
2297
2252
 
2298
2253
  /**
2299
- * Delete recurring rule
2300
- * Soft deletes a recurring rule (sets isActive to false)
2254
+ * Backfill portfolio snapshots
2255
+ *
2256
+ * Generate snapshots for a date range (historical data backfill).
2257
+ *
2258
+ * **Multi-currency Support:**
2259
+ * - Each snapshot includes multi-currency data
2260
+ * - Uses exchange rates available at generation time
2261
+ * - Warnings stored for missing exchange rates
2262
+ *
2263
+ * **Best Practices:**
2264
+ * - Use for initial setup after account configuration
2265
+ * - Run during low-traffic periods for large date ranges
2266
+ * - Existing snapshots are skipped (not regenerated)
2267
+ *
2301
2268
  * @param data The data for the request.
2302
- * @param data.id Rule ID
2303
2269
  * @param data.region Region code for tenant context
2304
- * @returns void Rule deleted successfully
2270
+ * @param data.requestBody
2271
+ * @returns BackfillSnapshotsResponse Backfill completed successfully
2305
2272
  * @throws ApiError
2306
2273
  */
2307
- public static recurringRuleControllerDelete(
2308
- data: RecurringRuleControllerDeleteData
2309
- ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2274
+ public static reportingControllerBackfillSnapshots(
2275
+ data: ReportingControllerBackfillSnapshotsData
2276
+ ): CancelablePromise<ReportingControllerBackfillSnapshotsResponse> {
2310
2277
  return __request(OpenAPI, {
2311
- method: 'DELETE',
2312
- url: '/api/v1/{region}/bean/recurring-rules/{id}',
2278
+ method: 'POST',
2279
+ url: '/api/v1/{region}/reporting/snapshots/backfill',
2313
2280
  path: {
2314
- id: data.id,
2315
2281
  region: data.region
2316
2282
  },
2283
+ body: data.requestBody,
2284
+ mediaType: 'application/json',
2317
2285
  errors: {
2318
- 404: 'Rule not found'
2286
+ 400: 'Invalid date format or range',
2287
+ 401: 'User not authenticated',
2288
+ 409: 'Backfill already in progress for this user'
2319
2289
  }
2320
2290
  });
2321
2291
  }
2292
+ }
2322
2293
 
2294
+ export class BeanPricesService {
2323
2295
  /**
2324
- * Get rule with statistics
2325
- * Returns a rule with pending/overdue counts and next expected date
2296
+ * Create a new price
2297
+ * Creates a new price entry for the authenticated user
2326
2298
  * @param data The data for the request.
2327
- * @param data.id Rule ID
2328
2299
  * @param data.region Region code for tenant context
2329
- * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2300
+ * @param data.requestBody
2301
+ * @returns PriceResponseDto Price created successfully
2330
2302
  * @throws ApiError
2331
2303
  */
2332
- public static recurringRuleControllerGetWithStats(
2333
- data: RecurringRuleControllerGetWithStatsData
2334
- ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2304
+ public static priceControllerCreate(
2305
+ data: PriceControllerCreateData
2306
+ ): CancelablePromise<PriceControllerCreateResponse> {
2335
2307
  return __request(OpenAPI, {
2336
- method: 'GET',
2337
- url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2308
+ method: 'POST',
2309
+ url: '/api/v1/{region}/bean/prices',
2338
2310
  path: {
2339
- id: data.id,
2340
2311
  region: data.region
2341
2312
  },
2313
+ body: data.requestBody,
2314
+ mediaType: 'application/json',
2342
2315
  errors: {
2343
- 404: 'Rule not found'
2316
+ 404: 'Currency or quoteCurrency commodity not found',
2317
+ 409: 'Price already exists for this currency pair and date'
2344
2318
  }
2345
2319
  });
2346
2320
  }
2347
- }
2348
2321
 
2349
- export class ExpectedTransactionsService {
2350
2322
  /**
2351
- * List expected transactions
2352
- * Returns expected transactions for the authenticated user with optional filtering
2323
+ * List user prices
2324
+ * Returns all price entries for the authenticated user with optional filtering
2353
2325
  * @param data The data for the request.
2354
2326
  * @param data.region Region code for tenant context
2355
- * @param data.ruleId Filter by recurring rule ID
2356
- * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
2357
- * @param data.fromDate Filter by date range start (YYYY-MM-DD)
2358
- * @param data.toDate Filter by date range end (YYYY-MM-DD)
2359
- * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2327
+ * @param data.currency Filter by currency (e.g., BTC, AAPL, USD)
2328
+ * @param data.quoteCurrency Filter by quote currency (pricing currency, e.g., USD, CNY)
2329
+ * @param data.dateFrom Filter prices from this date (ISO 8601 format)
2330
+ * @param data.dateTo Filter prices to this date (ISO 8601 format)
2331
+ * @param data.search Search term for currency or quoteCurrency (case-insensitive partial match)
2332
+ * @param data.page Page number for pagination (default: 1)
2333
+ * @param data.limit Number of items per page (default: 20, max: 100)
2334
+ * @returns PriceListResponseDto Prices retrieved successfully
2360
2335
  * @throws ApiError
2361
2336
  */
2362
- public static expectedTransactionControllerFindAll(
2363
- data: ExpectedTransactionControllerFindAllData
2364
- ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2337
+ public static priceControllerFindAll(
2338
+ data: PriceControllerFindAllData
2339
+ ): CancelablePromise<PriceControllerFindAllResponse> {
2365
2340
  return __request(OpenAPI, {
2366
2341
  method: 'GET',
2367
- url: '/api/v1/{region}/bean/expected-transactions',
2342
+ url: '/api/v1/{region}/bean/prices',
2368
2343
  path: {
2369
2344
  region: data.region
2370
2345
  },
2371
2346
  query: {
2372
- ruleId: data.ruleId,
2373
- status: data.status,
2374
- fromDate: data.fromDate,
2375
- toDate: data.toDate
2347
+ currency: data.currency,
2348
+ quoteCurrency: data.quoteCurrency,
2349
+ dateFrom: data.dateFrom,
2350
+ dateTo: data.dateTo,
2351
+ search: data.search,
2352
+ page: data.page,
2353
+ limit: data.limit
2376
2354
  }
2377
2355
  });
2378
2356
  }
2379
2357
 
2380
2358
  /**
2381
- * List overdue expected transactions
2382
- * Returns all overdue expected transactions (PENDING past tolerance)
2359
+ * Get price by ID
2360
+ * Returns a single price entry by its ID
2383
2361
  * @param data The data for the request.
2362
+ * @param data.id Price ID
2384
2363
  * @param data.region Region code for tenant context
2385
- * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2364
+ * @returns PriceResponseDto Price retrieved successfully
2386
2365
  * @throws ApiError
2387
- */
2388
- public static expectedTransactionControllerFindOverdue(
2389
- data: ExpectedTransactionControllerFindOverdueData
2390
- ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2366
+ */
2367
+ public static priceControllerFindOne(
2368
+ data: PriceControllerFindOneData
2369
+ ): CancelablePromise<PriceControllerFindOneResponse> {
2391
2370
  return __request(OpenAPI, {
2392
2371
  method: 'GET',
2393
- url: '/api/v1/{region}/bean/expected-transactions/overdue',
2372
+ url: '/api/v1/{region}/bean/prices/{id}',
2394
2373
  path: {
2374
+ id: data.id,
2395
2375
  region: data.region
2376
+ },
2377
+ errors: {
2378
+ 404: 'Price not found'
2396
2379
  }
2397
2380
  });
2398
2381
  }
2399
2382
 
2400
2383
  /**
2401
- * Get expected transaction by ID
2402
- * Returns a specific expected transaction with rule details
2384
+ * Update a price
2385
+ * Updates an existing price entry
2403
2386
  * @param data The data for the request.
2404
- * @param data.id Expected transaction ID
2387
+ * @param data.id Price ID
2405
2388
  * @param data.region Region code for tenant context
2406
- * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2389
+ * @param data.requestBody
2390
+ * @returns PriceResponseDto Price updated successfully
2407
2391
  * @throws ApiError
2408
2392
  */
2409
- public static expectedTransactionControllerFindOne(
2410
- data: ExpectedTransactionControllerFindOneData
2411
- ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2393
+ public static priceControllerUpdate(
2394
+ data: PriceControllerUpdateData
2395
+ ): CancelablePromise<PriceControllerUpdateResponse> {
2412
2396
  return __request(OpenAPI, {
2413
- method: 'GET',
2414
- url: '/api/v1/{region}/bean/expected-transactions/{id}',
2397
+ method: 'PUT',
2398
+ url: '/api/v1/{region}/bean/prices/{id}',
2415
2399
  path: {
2416
2400
  id: data.id,
2417
2401
  region: data.region
2418
2402
  },
2403
+ body: data.requestBody,
2404
+ mediaType: 'application/json',
2419
2405
  errors: {
2420
- 404: 'Expected transaction not found'
2406
+ 404: 'Price not found',
2407
+ 409: 'Updated price conflicts with existing price'
2421
2408
  }
2422
2409
  });
2423
2410
  }
2424
2411
 
2425
2412
  /**
2426
- * Skip expected transaction
2427
- * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2413
+ * Delete a price
2414
+ * Deletes a price entry (hard delete)
2428
2415
  * @param data The data for the request.
2429
- * @param data.id Expected transaction ID
2416
+ * @param data.id Price ID
2430
2417
  * @param data.region Region code for tenant context
2431
- * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2418
+ * @returns void Price deleted successfully
2432
2419
  * @throws ApiError
2433
2420
  */
2434
- public static expectedTransactionControllerSkip(
2435
- data: ExpectedTransactionControllerSkipData
2436
- ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2421
+ public static priceControllerDelete(
2422
+ data: PriceControllerDeleteData
2423
+ ): CancelablePromise<PriceControllerDeleteResponse> {
2437
2424
  return __request(OpenAPI, {
2438
- method: 'POST',
2439
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2425
+ method: 'DELETE',
2426
+ url: '/api/v1/{region}/bean/prices/{id}',
2440
2427
  path: {
2441
2428
  id: data.id,
2442
2429
  region: data.region
2443
2430
  },
2444
2431
  errors: {
2445
- 400: 'Cannot skip - not in PENDING status',
2446
- 404: 'Expected transaction not found'
2432
+ 404: 'Price not found'
2447
2433
  }
2448
2434
  });
2449
2435
  }
2450
2436
 
2451
2437
  /**
2452
- * Undo skip
2453
- * Reverses a skip operation (SKIPPED -> PENDING)
2438
+ * Bulk create prices
2439
+ * Creates multiple price entries at once (skips duplicates)
2454
2440
  * @param data The data for the request.
2455
- * @param data.id Expected transaction ID
2456
2441
  * @param data.region Region code for tenant context
2457
- * @returns void Skip undone successfully
2442
+ * @param data.requestBody
2443
+ * @returns PriceResponseDto Prices created successfully
2458
2444
  * @throws ApiError
2459
2445
  */
2460
- public static expectedTransactionControllerUndoSkip(
2461
- data: ExpectedTransactionControllerUndoSkipData
2462
- ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2446
+ public static priceControllerBulkCreate(
2447
+ data: PriceControllerBulkCreateData
2448
+ ): CancelablePromise<PriceControllerBulkCreateResponse> {
2463
2449
  return __request(OpenAPI, {
2464
- method: 'DELETE',
2465
- url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2450
+ method: 'POST',
2451
+ url: '/api/v1/{region}/bean/prices/bulk',
2466
2452
  path: {
2467
- id: data.id,
2468
2453
  region: data.region
2469
2454
  },
2470
- errors: {
2471
- 400: 'Cannot undo - not in SKIPPED status',
2472
- 404: 'Expected transaction not found'
2473
- }
2455
+ body: data.requestBody,
2456
+ mediaType: 'application/json'
2474
2457
  });
2475
2458
  }
2459
+ }
2476
2460
 
2461
+ export class RecurringRulesService {
2477
2462
  /**
2478
- * Confirm transaction match
2479
- * Manually matches an expected transaction with an actual transaction
2463
+ * Create a new recurring rule
2464
+ * Creates a new recurring transaction rule for the authenticated user
2480
2465
  * @param data The data for the request.
2481
- * @param data.id Expected transaction ID
2482
2466
  * @param data.region Region code for tenant context
2483
2467
  * @param data.requestBody
2484
- * @returns unknown Match confirmed successfully
2468
+ * @returns RecurringRuleResponseDto Rule created successfully
2485
2469
  * @throws ApiError
2486
2470
  */
2487
- public static expectedTransactionControllerConfirmMatch(
2488
- data: ExpectedTransactionControllerConfirmMatchData
2489
- ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2471
+ public static recurringRuleControllerCreate(
2472
+ data: RecurringRuleControllerCreateData
2473
+ ): CancelablePromise<RecurringRuleControllerCreateResponse> {
2490
2474
  return __request(OpenAPI, {
2491
2475
  method: 'POST',
2492
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2476
+ url: '/api/v1/{region}/bean/recurring-rules',
2493
2477
  path: {
2494
- id: data.id,
2495
2478
  region: data.region
2496
2479
  },
2497
2480
  body: data.requestBody,
2498
2481
  mediaType: 'application/json',
2499
2482
  errors: {
2500
- 400: 'Cannot match - not in PENDING status',
2501
- 404: 'Expected or actual transaction not found',
2502
- 409: 'Actual transaction already matched to another rule'
2483
+ 400: 'Invalid input data (e.g., autoCreate without accounts)',
2484
+ 409: 'Rule with same name already exists'
2503
2485
  }
2504
2486
  });
2505
2487
  }
2506
2488
 
2507
2489
  /**
2508
- * Unmatch transaction
2509
- * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2490
+ * List recurring rules
2491
+ * Returns all recurring rules for the authenticated user with optional filtering
2510
2492
  * @param data The data for the request.
2511
- * @param data.id Expected transaction ID
2512
2493
  * @param data.region Region code for tenant context
2513
- * @returns void Match removed successfully
2494
+ * @param data.isActive Filter by active status
2495
+ * @param data.frequency Filter by frequency (WEEKLY, MONTHLY, etc.)
2496
+ * @param data.hasAutoCreate Filter by autoCreate enabled
2497
+ * @returns RecurringRuleResponseDto Rules retrieved successfully
2514
2498
  * @throws ApiError
2515
2499
  */
2516
- public static expectedTransactionControllerUnmatch(
2517
- data: ExpectedTransactionControllerUnmatchData
2518
- ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2500
+ public static recurringRuleControllerFindAll(
2501
+ data: RecurringRuleControllerFindAllData
2502
+ ): CancelablePromise<RecurringRuleControllerFindAllResponse> {
2519
2503
  return __request(OpenAPI, {
2520
- method: 'DELETE',
2521
- url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2504
+ method: 'GET',
2505
+ url: '/api/v1/{region}/bean/recurring-rules',
2522
2506
  path: {
2523
- id: data.id,
2524
2507
  region: data.region
2525
2508
  },
2526
- errors: {
2527
- 400: 'Cannot unmatch - not in COMPLETED status',
2528
- 404: 'Expected transaction not found'
2509
+ query: {
2510
+ isActive: data.isActive,
2511
+ frequency: data.frequency,
2512
+ hasAutoCreate: data.hasAutoCreate
2529
2513
  }
2530
2514
  });
2531
2515
  }
2532
2516
 
2533
2517
  /**
2534
- * Enter Now
2535
- * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2518
+ * Create recurring rule from transaction
2519
+ * Auto-creates a recurring rule using transaction data. User only confirms frequency.
2536
2520
  * @param data The data for the request.
2537
- * @param data.id Expected transaction ID
2521
+ * @param data.transactionId Source transaction ID
2538
2522
  * @param data.region Region code for tenant context
2539
2523
  * @param data.requestBody
2540
- * @returns unknown Transaction created successfully
2524
+ * @returns RecurringRuleResponseDto Rule created successfully
2541
2525
  * @throws ApiError
2542
2526
  */
2543
- public static expectedTransactionControllerEnterNow(
2544
- data: ExpectedTransactionControllerEnterNowData
2545
- ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2527
+ public static recurringRuleControllerCreateFromTransaction(
2528
+ data: RecurringRuleControllerCreateFromTransactionData
2529
+ ): CancelablePromise<RecurringRuleControllerCreateFromTransactionResponse> {
2546
2530
  return __request(OpenAPI, {
2547
2531
  method: 'POST',
2548
- url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2532
+ url: '/api/v1/{region}/bean/recurring-rules/from-transaction/{transactionId}',
2549
2533
  path: {
2550
- id: data.id,
2534
+ transactionId: data.transactionId,
2551
2535
  region: data.region
2552
2536
  },
2553
2537
  body: data.requestBody,
2554
2538
  mediaType: 'application/json',
2555
2539
  errors: {
2556
- 400: 'Cannot enter - not in PENDING status or missing accounts',
2557
- 404: 'Expected transaction or accounts not found'
2540
+ 404: 'Transaction not found',
2541
+ 409: 'Rule with same name already exists or transaction already linked'
2558
2542
  }
2559
2543
  });
2560
2544
  }
2561
- }
2562
2545
 
2563
- export class RecurringForecastService {
2564
2546
  /**
2565
- * Get cash flow forecast
2566
- * Returns predicted outflows for the next N months based on active recurring rules
2547
+ * Get recurring rule by ID
2548
+ * Returns a specific recurring rule with its details
2567
2549
  * @param data The data for the request.
2550
+ * @param data.id Rule ID
2568
2551
  * @param data.region Region code for tenant context
2569
- * @param data.months Number of months to forecast (1-12, default 3)
2570
- * @returns ForecastResponseDto Forecast retrieved successfully
2552
+ * @returns RecurringRuleResponseDto Rule retrieved successfully
2571
2553
  * @throws ApiError
2572
2554
  */
2573
- public static forecastControllerGetForecast(
2574
- data: ForecastControllerGetForecastData
2575
- ): CancelablePromise<ForecastControllerGetForecastResponse> {
2555
+ public static recurringRuleControllerFindOne(
2556
+ data: RecurringRuleControllerFindOneData
2557
+ ): CancelablePromise<RecurringRuleControllerFindOneResponse> {
2576
2558
  return __request(OpenAPI, {
2577
2559
  method: 'GET',
2578
- url: '/api/v1/{region}/bean/recurring/forecast',
2560
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2579
2561
  path: {
2562
+ id: data.id,
2580
2563
  region: data.region
2581
2564
  },
2582
- query: {
2583
- months: data.months
2565
+ errors: {
2566
+ 404: 'Rule not found'
2584
2567
  }
2585
2568
  });
2586
2569
  }
2587
- }
2588
2570
 
2589
- export class BeanTransactionRulesService {
2590
2571
  /**
2591
- * Create a new transaction rule (or upsert if upsertByPayee=true)
2592
- * Creates a new rule. If upsertByPayee=true, updates existing rule matching payeeKeywords[0] instead of creating duplicate.
2572
+ * Update recurring rule
2573
+ * Updates an existing recurring rule
2593
2574
  * @param data The data for the request.
2575
+ * @param data.id Rule ID
2594
2576
  * @param data.region Region code for tenant context
2595
2577
  * @param data.requestBody
2596
- * @returns TransactionRuleResponseDto Rule updated successfully (upsert mode)
2578
+ * @returns RecurringRuleResponseDto Rule updated successfully
2597
2579
  * @throws ApiError
2598
2580
  */
2599
- public static transactionRuleControllerCreate(
2600
- data: TransactionRuleControllerCreateData
2601
- ): CancelablePromise<TransactionRuleControllerCreateResponse> {
2581
+ public static recurringRuleControllerUpdate(
2582
+ data: RecurringRuleControllerUpdateData
2583
+ ): CancelablePromise<RecurringRuleControllerUpdateResponse> {
2602
2584
  return __request(OpenAPI, {
2603
- method: 'POST',
2604
- url: '/api/v1/{region}/bean/transaction-rules',
2585
+ method: 'PATCH',
2586
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2605
2587
  path: {
2588
+ id: data.id,
2606
2589
  region: data.region
2607
2590
  },
2608
2591
  body: data.requestBody,
2609
2592
  mediaType: 'application/json',
2610
2593
  errors: {
2611
- 400: 'Validation failed',
2612
- 401: 'Unauthorized',
2613
- 409: 'Resource conflict - another process is updating this rule'
2594
+ 400: 'Invalid input data',
2595
+ 404: 'Rule not found'
2614
2596
  }
2615
2597
  });
2616
2598
  }
2617
2599
 
2618
2600
  /**
2619
- * Get all transaction rules for user
2601
+ * Delete recurring rule
2602
+ * Soft deletes a recurring rule (sets isActive to false)
2620
2603
  * @param data The data for the request.
2604
+ * @param data.id Rule ID
2621
2605
  * @param data.region Region code for tenant context
2622
- * @param data.limit Max results per page (default: 20, max: 100)
2623
- * @param data.offset Pagination offset (default: 0)
2624
- * @param data.enabled Filter by enabled status
2625
- * @param data.learningSource Filter by learning source. Omit this parameter or pass empty string to get manually created rules (learningSource is null in database).
2626
- * @param data.autoApplyEnabled Filter by auto-apply status
2627
- * @returns TransactionRuleListResponseDto List of rules
2606
+ * @returns void Rule deleted successfully
2628
2607
  * @throws ApiError
2629
2608
  */
2630
- public static transactionRuleControllerList(
2631
- data: TransactionRuleControllerListData
2632
- ): CancelablePromise<TransactionRuleControllerListResponse> {
2609
+ public static recurringRuleControllerDelete(
2610
+ data: RecurringRuleControllerDeleteData
2611
+ ): CancelablePromise<RecurringRuleControllerDeleteResponse> {
2633
2612
  return __request(OpenAPI, {
2634
- method: 'GET',
2635
- url: '/api/v1/{region}/bean/transaction-rules',
2613
+ method: 'DELETE',
2614
+ url: '/api/v1/{region}/bean/recurring-rules/{id}',
2636
2615
  path: {
2616
+ id: data.id,
2637
2617
  region: data.region
2638
2618
  },
2639
- query: {
2640
- limit: data.limit,
2641
- offset: data.offset,
2642
- enabled: data.enabled,
2643
- learningSource: data.learningSource,
2644
- autoApplyEnabled: data.autoApplyEnabled
2619
+ errors: {
2620
+ 404: 'Rule not found'
2621
+ }
2622
+ });
2623
+ }
2624
+
2625
+ /**
2626
+ * Get rule with statistics
2627
+ * Returns a rule with pending/overdue counts and next expected date
2628
+ * @param data The data for the request.
2629
+ * @param data.id Rule ID
2630
+ * @param data.region Region code for tenant context
2631
+ * @returns RecurringRuleWithStatsResponseDto Rule with stats retrieved successfully
2632
+ * @throws ApiError
2633
+ */
2634
+ public static recurringRuleControllerGetWithStats(
2635
+ data: RecurringRuleControllerGetWithStatsData
2636
+ ): CancelablePromise<RecurringRuleControllerGetWithStatsResponse> {
2637
+ return __request(OpenAPI, {
2638
+ method: 'GET',
2639
+ url: '/api/v1/{region}/bean/recurring-rules/{id}/stats',
2640
+ path: {
2641
+ id: data.id,
2642
+ region: data.region
2645
2643
  },
2646
2644
  errors: {
2647
- 401: 'Unauthorized'
2645
+ 404: 'Rule not found'
2648
2646
  }
2649
2647
  });
2650
2648
  }
2649
+ }
2651
2650
 
2651
+ export class ExpectedTransactionsService {
2652
2652
  /**
2653
- * Validate transaction rule configuration
2653
+ * List expected transactions
2654
+ * Returns expected transactions for the authenticated user with optional filtering
2654
2655
  * @param data The data for the request.
2655
2656
  * @param data.region Region code for tenant context
2656
- * @param data.requestBody
2657
- * @returns ValidateRuleResponseDto Validation result
2657
+ * @param data.ruleId Filter by recurring rule ID
2658
+ * @param data.status Filter by status (PENDING, COMPLETED, SKIPPED)
2659
+ * @param data.fromDate Filter by date range start (YYYY-MM-DD)
2660
+ * @param data.toDate Filter by date range end (YYYY-MM-DD)
2661
+ * @returns ExpectedTransactionListResponseDto Expected transactions retrieved successfully
2658
2662
  * @throws ApiError
2659
2663
  */
2660
- public static transactionRuleControllerValidate(
2661
- data: TransactionRuleControllerValidateData
2662
- ): CancelablePromise<TransactionRuleControllerValidateResponse> {
2664
+ public static expectedTransactionControllerFindAll(
2665
+ data: ExpectedTransactionControllerFindAllData
2666
+ ): CancelablePromise<ExpectedTransactionControllerFindAllResponse> {
2663
2667
  return __request(OpenAPI, {
2664
- method: 'POST',
2665
- url: '/api/v1/{region}/bean/transaction-rules/validate',
2668
+ method: 'GET',
2669
+ url: '/api/v1/{region}/bean/expected-transactions',
2666
2670
  path: {
2667
2671
  region: data.region
2668
2672
  },
2669
- body: data.requestBody,
2670
- mediaType: 'application/json',
2671
- errors: {
2672
- 400: 'Validation failed',
2673
- 401: 'Unauthorized'
2673
+ query: {
2674
+ ruleId: data.ruleId,
2675
+ status: data.status,
2676
+ fromDate: data.fromDate,
2677
+ toDate: data.toDate
2674
2678
  }
2675
2679
  });
2676
2680
  }
2677
2681
 
2678
2682
  /**
2679
- * Bulk create transaction rules
2683
+ * List overdue expected transactions
2684
+ * Returns all overdue expected transactions (PENDING past tolerance)
2680
2685
  * @param data The data for the request.
2681
2686
  * @param data.region Region code for tenant context
2682
- * @param data.requestBody
2683
- * @returns BulkCreateRulesResponseDto Bulk create completed
2687
+ * @returns ExpectedTransactionListResponseDto Overdue transactions retrieved successfully
2684
2688
  * @throws ApiError
2685
2689
  */
2686
- public static transactionRuleControllerBulkCreate(
2687
- data: TransactionRuleControllerBulkCreateData
2688
- ): CancelablePromise<TransactionRuleControllerBulkCreateResponse> {
2690
+ public static expectedTransactionControllerFindOverdue(
2691
+ data: ExpectedTransactionControllerFindOverdueData
2692
+ ): CancelablePromise<ExpectedTransactionControllerFindOverdueResponse> {
2689
2693
  return __request(OpenAPI, {
2690
- method: 'POST',
2691
- url: '/api/v1/{region}/bean/transaction-rules/bulk',
2694
+ method: 'GET',
2695
+ url: '/api/v1/{region}/bean/expected-transactions/overdue',
2692
2696
  path: {
2693
2697
  region: data.region
2694
- },
2695
- body: data.requestBody,
2696
- mediaType: 'application/json',
2697
- errors: {
2698
- 400: 'Invalid bulk create data',
2699
- 401: 'Unauthorized'
2700
2698
  }
2701
2699
  });
2702
2700
  }
2703
2701
 
2704
2702
  /**
2705
- * Export transaction rules
2703
+ * Get expected transaction by ID
2704
+ * Returns a specific expected transaction with rule details
2706
2705
  * @param data The data for the request.
2707
- * @param data.format Export format (currently only JSON supported)
2706
+ * @param data.id Expected transaction ID
2708
2707
  * @param data.region Region code for tenant context
2709
- * @returns ExportRulesResponseDto Exported rules
2708
+ * @returns ExpectedTransactionResponseDto Expected transaction retrieved successfully
2710
2709
  * @throws ApiError
2711
2710
  */
2712
- public static transactionRuleControllerExport(
2713
- data: TransactionRuleControllerExportData
2714
- ): CancelablePromise<TransactionRuleControllerExportResponse> {
2711
+ public static expectedTransactionControllerFindOne(
2712
+ data: ExpectedTransactionControllerFindOneData
2713
+ ): CancelablePromise<ExpectedTransactionControllerFindOneResponse> {
2715
2714
  return __request(OpenAPI, {
2716
2715
  method: 'GET',
2717
- url: '/api/v1/{region}/bean/transaction-rules/export/{format}',
2716
+ url: '/api/v1/{region}/bean/expected-transactions/{id}',
2718
2717
  path: {
2719
- format: data.format,
2718
+ id: data.id,
2720
2719
  region: data.region
2721
2720
  },
2722
2721
  errors: {
2723
- 400: 'Unsupported format',
2724
- 401: 'Unauthorized'
2722
+ 404: 'Expected transaction not found'
2725
2723
  }
2726
2724
  });
2727
2725
  }
2728
2726
 
2729
2727
  /**
2730
- * Get transaction rule statistics
2728
+ * Skip expected transaction
2729
+ * Marks an expected transaction as skipped (PENDING -> SKIPPED)
2731
2730
  * @param data The data for the request.
2732
- * @param data.period Statistics time period
2731
+ * @param data.id Expected transaction ID
2733
2732
  * @param data.region Region code for tenant context
2734
- * @returns RuleStatisticsResponseDto Rule statistics
2733
+ * @returns ExpectedTransactionResponseDto Expected transaction skipped successfully
2735
2734
  * @throws ApiError
2736
2735
  */
2737
- public static transactionRuleControllerGetStatistics(
2738
- data: TransactionRuleControllerGetStatisticsData
2739
- ): CancelablePromise<TransactionRuleControllerGetStatisticsResponse> {
2736
+ public static expectedTransactionControllerSkip(
2737
+ data: ExpectedTransactionControllerSkipData
2738
+ ): CancelablePromise<ExpectedTransactionControllerSkipResponse> {
2740
2739
  return __request(OpenAPI, {
2741
- method: 'GET',
2742
- url: '/api/v1/{region}/bean/transaction-rules/statistics/{period}',
2740
+ method: 'POST',
2741
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2743
2742
  path: {
2744
- period: data.period,
2743
+ id: data.id,
2745
2744
  region: data.region
2746
2745
  },
2747
2746
  errors: {
2748
- 401: 'Unauthorized'
2747
+ 400: 'Cannot skip - not in PENDING status',
2748
+ 404: 'Expected transaction not found'
2749
2749
  }
2750
2750
  });
2751
2751
  }
2752
2752
 
2753
2753
  /**
2754
- * Get transaction rule detail
2754
+ * Undo skip
2755
+ * Reverses a skip operation (SKIPPED -> PENDING)
2755
2756
  * @param data The data for the request.
2756
- * @param data.ruleId Rule ID
2757
+ * @param data.id Expected transaction ID
2757
2758
  * @param data.region Region code for tenant context
2758
- * @returns TransactionRuleResponseDto Rule details
2759
+ * @returns void Skip undone successfully
2759
2760
  * @throws ApiError
2760
2761
  */
2761
- public static transactionRuleControllerGetDetail(
2762
- data: TransactionRuleControllerGetDetailData
2763
- ): CancelablePromise<TransactionRuleControllerGetDetailResponse> {
2762
+ public static expectedTransactionControllerUndoSkip(
2763
+ data: ExpectedTransactionControllerUndoSkipData
2764
+ ): CancelablePromise<ExpectedTransactionControllerUndoSkipResponse> {
2764
2765
  return __request(OpenAPI, {
2765
- method: 'GET',
2766
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2766
+ method: 'DELETE',
2767
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/skip',
2767
2768
  path: {
2768
- ruleId: data.ruleId,
2769
+ id: data.id,
2769
2770
  region: data.region
2770
2771
  },
2771
2772
  errors: {
2772
- 401: 'Unauthorized',
2773
- 403: 'Forbidden - not owner of rule',
2774
- 404: 'Rule not found'
2773
+ 400: 'Cannot undo - not in SKIPPED status',
2774
+ 404: 'Expected transaction not found'
2775
2775
  }
2776
2776
  });
2777
2777
  }
2778
2778
 
2779
2779
  /**
2780
- * Update a transaction rule
2780
+ * Confirm transaction match
2781
+ * Manually matches an expected transaction with an actual transaction
2781
2782
  * @param data The data for the request.
2782
- * @param data.ruleId Rule ID to update
2783
+ * @param data.id Expected transaction ID
2783
2784
  * @param data.region Region code for tenant context
2784
2785
  * @param data.requestBody
2785
- * @returns TransactionRuleResponseDto Rule updated successfully
2786
+ * @returns unknown Match confirmed successfully
2786
2787
  * @throws ApiError
2787
2788
  */
2788
- public static transactionRuleControllerUpdate(
2789
- data: TransactionRuleControllerUpdateData
2790
- ): CancelablePromise<TransactionRuleControllerUpdateResponse> {
2789
+ public static expectedTransactionControllerConfirmMatch(
2790
+ data: ExpectedTransactionControllerConfirmMatchData
2791
+ ): CancelablePromise<ExpectedTransactionControllerConfirmMatchResponse> {
2791
2792
  return __request(OpenAPI, {
2792
- method: 'PUT',
2793
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2793
+ method: 'POST',
2794
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2794
2795
  path: {
2795
- ruleId: data.ruleId,
2796
+ id: data.id,
2796
2797
  region: data.region
2797
2798
  },
2798
2799
  body: data.requestBody,
2799
2800
  mediaType: 'application/json',
2800
2801
  errors: {
2801
- 400: 'Validation failed',
2802
- 401: 'Unauthorized',
2803
- 403: 'Forbidden - not owner of rule',
2804
- 404: 'Rule not found',
2805
- 409: 'Resource conflict - rule is being modified by another process'
2802
+ 400: 'Cannot match - not in PENDING status',
2803
+ 404: 'Expected or actual transaction not found',
2804
+ 409: 'Actual transaction already matched to another rule'
2806
2805
  }
2807
2806
  });
2808
2807
  }
2809
2808
 
2810
2809
  /**
2811
- * Delete a transaction rule
2810
+ * Unmatch transaction
2811
+ * Removes the match between expected and actual transaction (COMPLETED -> PENDING)
2812
2812
  * @param data The data for the request.
2813
- * @param data.ruleId Rule ID to delete
2813
+ * @param data.id Expected transaction ID
2814
2814
  * @param data.region Region code for tenant context
2815
- * @returns void Rule deleted successfully
2815
+ * @returns void Match removed successfully
2816
2816
  * @throws ApiError
2817
2817
  */
2818
- public static transactionRuleControllerDelete(
2819
- data: TransactionRuleControllerDeleteData
2820
- ): CancelablePromise<TransactionRuleControllerDeleteResponse> {
2818
+ public static expectedTransactionControllerUnmatch(
2819
+ data: ExpectedTransactionControllerUnmatchData
2820
+ ): CancelablePromise<ExpectedTransactionControllerUnmatchResponse> {
2821
2821
  return __request(OpenAPI, {
2822
2822
  method: 'DELETE',
2823
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}',
2823
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/match',
2824
2824
  path: {
2825
- ruleId: data.ruleId,
2825
+ id: data.id,
2826
2826
  region: data.region
2827
2827
  },
2828
2828
  errors: {
2829
- 401: 'Unauthorized',
2830
- 403: 'Forbidden - not owner of rule',
2831
- 404: 'Rule not found',
2832
- 409: 'Resource conflict - rule is being modified by another process'
2829
+ 400: 'Cannot unmatch - not in COMPLETED status',
2830
+ 404: 'Expected transaction not found'
2833
2831
  }
2834
2832
  });
2835
2833
  }
2836
2834
 
2837
2835
  /**
2838
- * Test rule matching
2836
+ * Enter Now
2837
+ * Creates an actual transaction for an expected transaction (YNAB-style Enter Now)
2839
2838
  * @param data The data for the request.
2840
- * @param data.ruleId Rule ID to test
2839
+ * @param data.id Expected transaction ID
2841
2840
  * @param data.region Region code for tenant context
2842
2841
  * @param data.requestBody
2843
- * @returns TestRuleResponseDto Test result
2842
+ * @returns unknown Transaction created successfully
2844
2843
  * @throws ApiError
2845
2844
  */
2846
- public static transactionRuleControllerTest(
2847
- data: TransactionRuleControllerTestData
2848
- ): CancelablePromise<TransactionRuleControllerTestResponse> {
2845
+ public static expectedTransactionControllerEnterNow(
2846
+ data: ExpectedTransactionControllerEnterNowData
2847
+ ): CancelablePromise<ExpectedTransactionControllerEnterNowResponse> {
2849
2848
  return __request(OpenAPI, {
2850
2849
  method: 'POST',
2851
- url: '/api/v1/{region}/bean/transaction-rules/{ruleId}/test',
2850
+ url: '/api/v1/{region}/bean/expected-transactions/{id}/enter',
2852
2851
  path: {
2853
- ruleId: data.ruleId,
2852
+ id: data.id,
2854
2853
  region: data.region
2855
2854
  },
2856
2855
  body: data.requestBody,
2857
2856
  mediaType: 'application/json',
2858
2857
  errors: {
2859
- 401: 'Unauthorized',
2860
- 403: 'Forbidden - not owner of rule',
2861
- 404: 'Rule not found'
2858
+ 400: 'Cannot enter - not in PENDING status or missing accounts',
2859
+ 404: 'Expected transaction or accounts not found'
2860
+ }
2861
+ });
2862
+ }
2863
+ }
2864
+
2865
+ export class RecurringForecastService {
2866
+ /**
2867
+ * Get cash flow forecast
2868
+ * Returns predicted outflows for the next N months based on active recurring rules
2869
+ * @param data The data for the request.
2870
+ * @param data.region Region code for tenant context
2871
+ * @param data.months Number of months to forecast (1-12, default 3)
2872
+ * @returns ForecastResponseDto Forecast retrieved successfully
2873
+ * @throws ApiError
2874
+ */
2875
+ public static forecastControllerGetForecast(
2876
+ data: ForecastControllerGetForecastData
2877
+ ): CancelablePromise<ForecastControllerGetForecastResponse> {
2878
+ return __request(OpenAPI, {
2879
+ method: 'GET',
2880
+ url: '/api/v1/{region}/bean/recurring/forecast',
2881
+ path: {
2882
+ region: data.region
2883
+ },
2884
+ query: {
2885
+ months: data.months
2862
2886
  }
2863
2887
  });
2864
2888
  }
@@ -3204,13 +3228,20 @@ export class BeanExportService {
3204
3228
  /**
3205
3229
  * Export Beancount ledger as ZIP
3206
3230
  * Export all user Beancount data as a ZIP file containing ledger.beancount and yearly files in community format.
3231
+ * @param data The data for the request.
3232
+ * @param data.region Region code for tenant context
3207
3233
  * @returns binary ZIP archive (application/zip) streamed as an attachment
3208
3234
  * @throws ApiError
3209
3235
  */
3210
- public static exportControllerExportBeancount(): CancelablePromise<ExportControllerExportBeancountResponse> {
3236
+ public static exportControllerExportBeancount(
3237
+ data: ExportControllerExportBeancountData
3238
+ ): CancelablePromise<ExportControllerExportBeancountResponse> {
3211
3239
  return __request(OpenAPI, {
3212
3240
  method: 'GET',
3213
- url: '/api/v1/{region}/bean/export/beancount'
3241
+ url: '/api/v1/{region}/bean/export/beancount',
3242
+ path: {
3243
+ region: data.region
3244
+ }
3214
3245
  });
3215
3246
  }
3216
3247
  }
@@ -3247,7 +3278,7 @@ export class BeanImportService {
3247
3278
 
3248
3279
  /**
3249
3280
  * Identify file type
3250
- * Upload a file to check if it can be processed by any registered importer. Does not perform actual import - useful for pre-validation. Uses user-specific importer configuration.
3281
+ * Server-side importer identification has been removed (ADR-0101); file matching is handled client-side via the community parser pipeline. Always returns identified=false with an explanatory message; kept for backward compatibility. Does not perform actual import.
3251
3282
  * @param data The data for the request.
3252
3283
  * @param data.region Region code for tenant context
3253
3284
  * @param data.formData File to identify
@@ -3996,6 +4027,34 @@ export class DashboardService {
3996
4027
  }
3997
4028
  });
3998
4029
  }
4030
+
4031
+ /**
4032
+ * Get the composite P8 advisor context
4033
+ * Assembles the P8 data context in one call: net worth (verbatim GET /dashboard/net-worth shape, user base currency semantics per ADR-0070), trailing-12m flow totals over the 12 calendar months including the as-of month, and top-3 expense categories by account-path leaf key — both flow blocks priced in CNY per the P8 contract. The P8 snake_case field spellings (as_of, net_worth, trailing_12m) are mapped by the consumer; the wire keeps the family camelCase
4034
+ * @param data The data for the request.
4035
+ * @param data.region Region code for tenant context
4036
+ * @param data.date As-of date for the snapshot and the trailing-12m window anchor (ISO 8601 format)
4037
+ * @returns AdvisorContextResponseDto Advisor context retrieved successfully
4038
+ * @throws ApiError
4039
+ */
4040
+ public static dashboardControllerGetAdvisorContext(
4041
+ data: DashboardControllerGetAdvisorContextData
4042
+ ): CancelablePromise<DashboardControllerGetAdvisorContextResponse> {
4043
+ return __request(OpenAPI, {
4044
+ method: 'GET',
4045
+ url: '/api/v1/{region}/dashboard/advisor-context',
4046
+ path: {
4047
+ region: data.region
4048
+ },
4049
+ query: {
4050
+ date: data.date
4051
+ },
4052
+ errors: {
4053
+ 400: 'Invalid date format',
4054
+ 401: 'User not authenticated, or the token is not advisor-scoped (exchange via POST /auth/sessions/advisor, #1512)'
4055
+ }
4056
+ });
4057
+ }
3999
4058
  }
4000
4059
 
4001
4060
  export class InvestmentService {
@@ -4071,6 +4130,27 @@ export class AuthService {
4071
4130
  }
4072
4131
  });
4073
4132
  }
4133
+
4134
+ /**
4135
+ * Exchange an access token for an advisor-scoped, short-TTL JWT (#1512)
4136
+ * @param data The data for the request.
4137
+ * @param data.requestBody
4138
+ * @returns AdvisorLoginResponseDto Advisor-scope login successful — the token is valid only on advisor tool-face endpoints (e.g. GET /:region/dashboard/advisor-context)
4139
+ * @throws ApiError
4140
+ */
4141
+ public static authControllerAdvisorTokenLogin(
4142
+ data: AuthControllerAdvisorTokenLoginData
4143
+ ): CancelablePromise<AuthControllerAdvisorTokenLoginResponse> {
4144
+ return __request(OpenAPI, {
4145
+ method: 'POST',
4146
+ url: '/api/v1/auth/sessions/advisor',
4147
+ body: data.requestBody,
4148
+ mediaType: 'application/json',
4149
+ errors: {
4150
+ 401: 'Invalid access token'
4151
+ }
4152
+ });
4153
+ }
4074
4154
  }
4075
4155
 
4076
4156
  export class CommunityService {
@@ -4287,7 +4367,7 @@ export class MarketDataService {
4287
4367
  * @param data The data for the request.
4288
4368
  * @param data.q Search term — matched against symbol and instrument name. Empty string returns [].
4289
4369
  * @param data.limit Maximum number of results (clamped 1..50)
4290
- * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ)
4370
+ * @param data.exchange Filter by exchange code (e.g. US, HK, SS, SZ). A-share codes also match symbol notations and venue-code aliases (exchange=SS matches SH/SHH column values and bare 6-digit Shanghai symbols; SZ likewise)
4291
4371
  * @param data.assetType Filter by OpenBB asset_type (e.g. stock, etf)
4292
4372
  * @returns SymbolSearchResultDto Ranked search results
4293
4373
  * @throws ApiError