@firela/api-types 0.0.0-canary.4f9bd799 → 0.0.0-canary.510ca9d

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