@firela/api-types 0.0.0-canary.32edff08 → 0.0.0-canary.614ff760

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -513,6 +513,54 @@ type BatchTransactionResponseDto = {
513
513
  */
514
514
  failed: Array<BatchTransactionErrorDto>;
515
515
  };
516
+ type CorrectTransactionDto = {
517
+ /**
518
+ * Transaction date (ISO 8601 format)
519
+ */
520
+ date: string;
521
+ /**
522
+ * Transaction flag: * (cleared), ! (pending)
523
+ */
524
+ flag?: '*' | '!';
525
+ /**
526
+ * Payee name
527
+ */
528
+ payee?: string;
529
+ /**
530
+ * Transaction narration/description
531
+ */
532
+ narration: string;
533
+ /**
534
+ * Transaction tags (without # prefix)
535
+ */
536
+ tags?: Array<string>;
537
+ /**
538
+ * Transaction links (without ^ prefix)
539
+ */
540
+ links?: Array<string>;
541
+ /**
542
+ * Transaction postings (minimum 1, typically 2 for double-entry)
543
+ */
544
+ postings: Array<CreatePostingDto>;
545
+ /**
546
+ * Transaction-level metadata
547
+ */
548
+ meta?: {
549
+ [key: string]: unknown;
550
+ };
551
+ /**
552
+ * Unique key for idempotent transaction creation. If provided, duplicate requests with the same key will return the existing transaction.
553
+ */
554
+ idempotencyKey?: string;
555
+ /**
556
+ * Auto-create accounts if not found. When true, missing accounts will be automatically created. When false (default for API), missing accounts will cause a validation error. Set to true for quick entry scenarios where you want to create accounts on-the-fly.
557
+ */
558
+ autoCreateAccounts?: boolean;
559
+ /**
560
+ * Reason for correcting/superseding the original transaction
561
+ */
562
+ correctionReason?: string;
563
+ };
516
564
  type PostingDetailDto = {
517
565
  /**
518
566
  * Posting ID
@@ -636,6 +684,14 @@ type TransactionDetailDto = {
636
684
  * Correction reason (if voided or superseded)
637
685
  */
638
686
  correctionReason?: string;
687
+ /**
688
+ * ID of the transaction that supersedes this one (set when status=SUPERSEDED)
689
+ */
690
+ supersededBy?: string;
691
+ /**
692
+ * ID of the transaction this one corrected/replaced (back-link on the replacement)
693
+ */
694
+ originalTxn?: string;
639
695
  };
640
696
  /**
641
697
  * Transaction flag
@@ -4101,6 +4157,18 @@ type TransactionControllerCreateBatchData = {
4101
4157
  requestBody: BatchCreateTransactionDto;
4102
4158
  };
4103
4159
  type TransactionControllerCreateBatchResponse = BatchTransactionResponseDto;
4160
+ type TransactionControllerCorrectData = {
4161
+ /**
4162
+ * Original transaction ID to correct
4163
+ */
4164
+ id: string;
4165
+ /**
4166
+ * Region code for tenant context
4167
+ */
4168
+ region: 'cn' | 'us' | 'de' | 'gb';
4169
+ requestBody: CorrectTransactionDto;
4170
+ };
4171
+ type TransactionControllerCorrectResponse = TransactionDetailDto;
4104
4172
  type TransactionControllerSuggestTagsData = {
4105
4173
  /**
4106
4174
  * Max suggestions (1-100, default 10)
@@ -5336,6 +5404,29 @@ type $OpenApiTs = {
5336
5404
  };
5337
5405
  };
5338
5406
  };
5407
+ '/api/v1/{region}/bean/transactions/{id}/correct': {
5408
+ post: {
5409
+ req: TransactionControllerCorrectData;
5410
+ res: {
5411
+ /**
5412
+ * Corrected transaction created
5413
+ */
5414
+ 201: TransactionDetailDto;
5415
+ /**
5416
+ * Original transaction not found
5417
+ */
5418
+ 404: ApiProblemResponseDto;
5419
+ /**
5420
+ * Original no longer ACTIVE (concurrent modification)
5421
+ */
5422
+ 409: ApiProblemResponseDto;
5423
+ /**
5424
+ * Pipeline validation failed (does not balance, invalid accounts)
5425
+ */
5426
+ 422: ApiProblemResponseDto;
5427
+ };
5428
+ };
5429
+ };
5339
5430
  '/api/v1/{region}/bean/transactions/tags': {
5340
5431
  get: {
5341
5432
  req: TransactionControllerSuggestTagsData;
@@ -7201,6 +7292,17 @@ declare class BeanTransactionsService {
7201
7292
  * @throws ApiError
7202
7293
  */
7203
7294
  static transactionControllerCreateBatch(data: TransactionControllerCreateBatchData): CancelablePromise<TransactionControllerCreateBatchResponse>;
7295
+ /**
7296
+ * Correct (supersede) a transaction
7297
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
7298
+ * @param data The data for the request.
7299
+ * @param data.id Original transaction ID to correct
7300
+ * @param data.region Region code for tenant context
7301
+ * @param data.requestBody
7302
+ * @returns TransactionDetailDto Corrected transaction created
7303
+ * @throws ApiError
7304
+ */
7305
+ static transactionControllerCorrect(data: TransactionControllerCorrectData): CancelablePromise<TransactionControllerCorrectResponse>;
7204
7306
  /**
7205
7307
  * Suggest transaction tags
7206
7308
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -7480,4 +7582,4 @@ type OpenAPIConfig = {
7480
7582
  };
7481
7583
  declare const OpenAPI: OpenAPIConfig;
7482
7584
 
7483
- export { type $OpenApiTs, type AccountControllerCloseData, type AccountControllerCloseResponse, type AccountControllerCreateData, type AccountControllerCreateResponse, type AccountControllerDeleteData, type AccountControllerDeleteResponse, type AccountControllerFindAllData, type AccountControllerFindAllResponse, type AccountControllerFindOneData, type AccountControllerFindOneResponse, type AccountControllerReopenData, type AccountControllerReopenResponse, type AccountControllerUpdateData, type AccountControllerUpdateResponse, type AccountExchangeRateWarningDto, type AccountItemDto, type AccountItemWithAssetClassDto, type AccountListResponseDto, type AccountResponseDto, type AccountStandardListResponseDto, type AccountStandardResponseDto, type AccountStandardsControllerGetRegionsData, type AccountStandardsControllerGetRegionsResponse, type AccountStandardsControllerGetTemplateMetadataData, type AccountStandardsControllerGetTemplateMetadataResponse, type AccountStandardsControllerGetTemplatesData, type AccountStandardsControllerGetTemplatesResponse, type AccountsResponseDto, type AccountsSummaryDto, type AmountRangeDto, type AnonymousLoginDto, type ApiKeysControllerCreateApiKeyResponse, type ApiProblemResponseDto, type AssetClassAccountsResponseDto, type AssetClassGroupDto, type AssetClassSummaryDto, type AuthControllerAccessTokenLoginData, type AuthControllerAccessTokenLoginResponse, type BackfillSnapshotsBody, type BackfillSnapshotsResponse, type BalanceByCurrencyDto, type BalanceControllerGetBalanceData, type BalanceControllerGetBalanceResponse, type BalanceControllerGetMultiCurrencyBalanceData, type BalanceControllerGetMultiCurrencyBalanceResponse, type BalanceResponseDto, type BatchCreateTransactionDto, type BatchResolveDto, type BatchResolveResultDto, type BatchTransactionErrorDto, type BatchTransactionResponseDto, BeanAccountsService, BeanBalancesService, BeanCommoditiesService, BeanTransactionsService, type BulkCreateRulesDto, type BulkCreateRulesResponseDto, type CacheControllerFlushCacheResponse, type CashFlowByCurrencyDto, type CashFlowResponseDto, type CloseAccountDto, type CommodityControllerBulkCreateData, type CommodityControllerBulkCreateResponse, type CommodityControllerCreateData, type CommodityControllerCreateResponse, type CommodityControllerDeleteData, type CommodityControllerDeleteResponse, type CommodityControllerFindAllData, type CommodityControllerFindAllResponse, type CommodityControllerFindOneData, type CommodityControllerFindOneResponse, type CommodityControllerGetOrCreateData, type CommodityControllerGetOrCreateResponse, type CommodityControllerUpdateData, type CommodityControllerUpdateResponse, type CommodityListResponseDto, type CommodityResponseDto, type ConfirmMatchDto, type ConvertedCashFlowDto, type ConvertedNetWorthDto, type CreateAccountDto, type CreateCommodityDto, type CreatePayeeDto, type CreatePayeeProfileDto, type CreatePlatformDto, type CreatePostingDto, type CreateRecurringRuleDto, type CreateRuleFromTransactionDto, type CreateTransactionDto, type CreateTransactionRuleDto, type CurrencyBalanceDto, type DashboardControllerGetAccountsData, type DashboardControllerGetAccountsResponse, type DashboardControllerGetCashFlowData, type DashboardControllerGetCashFlowResponse, type DashboardControllerGetNetWorthData, type DashboardControllerGetNetWorthResponse, type DecisionOptionDto, type DeleteOwnUserDto, type EnterNowDto, type ExchangeRateControllerGetExchangeRateData, type ExchangeRateControllerGetExchangeRateResponse, type ExchangeRateWarningDto, type ExpectedTransactionControllerConfirmMatchData, type ExpectedTransactionControllerConfirmMatchResponse, type ExpectedTransactionControllerEnterNowData, type ExpectedTransactionControllerEnterNowResponse, type ExpectedTransactionControllerFindAllData, type ExpectedTransactionControllerFindAllResponse, type ExpectedTransactionControllerFindOneData, type ExpectedTransactionControllerFindOneResponse, type ExpectedTransactionControllerFindOverdueData, type ExpectedTransactionControllerFindOverdueResponse, type ExpectedTransactionControllerSkipData, type ExpectedTransactionControllerSkipResponse, type ExpectedTransactionControllerUndoSkipData, type ExpectedTransactionControllerUndoSkipResponse, type ExpectedTransactionControllerUnmatchData, type ExpectedTransactionControllerUnmatchResponse, type ExpectedTransactionListResponseDto, type ExpectedTransactionResponseDto, type ExpectedTransactionRuleDto, type ExportControllerExportBeancountResponse, type ExportRulesResponseDto, type FileImportControllerIdentifyFileData, type FileImportControllerIdentifyFileResponse, type FileImportControllerImportBeancountData, type FileImportControllerImportBeancountResponse, type FileImportControllerImportFileData, type FileImportControllerImportFileResponse, type FileImportDto, type ForecastControllerGetForecastData, type ForecastControllerGetForecastResponse, type ForecastItemDto, type ForecastResponseDto, type GenerateSnapshotBody, type GenerateSnapshotResponse, type HealthControllerCheckDatabaseResponse, type HealthControllerCheckOpenBbResponse, type HealthControllerCheckRedisResponse, type HealthControllerGetCircuitBreakersHealthResponse, type HealthControllerGetHealthResponse, type HealthControllerGetMetricsResponse, type HealthControllerResetCircuitBreakerData, type HealthControllerResetCircuitBreakerResponse, HealthService, type IdentifyResultDto, type ImportErrorDto, type ImportResultDto, type ImporterConfigControllerGetConfigData, type ImporterConfigControllerGetConfigResponse, type ImporterConfigControllerResetConfigData, type ImporterConfigControllerResetConfigResponse, type ImporterConfigControllerUpdateConfigData, type ImporterConfigControllerUpdateConfigResponse, type ImporterConfigDataDto, type ImporterConfigDto, type InfoControllerGetInfoResponse, type MapperDefaultsDto, type MonthlyForecastDto, type MultiCurrencyBalanceResponseDto, type MultiCurrencyPointDto, type NetWorthByCurrencyDto, type NetWorthResponseDto, type NlpAccountConfirmationDataDto, type NlpAlternativePayeeDto, type NlpControllerClearSessionData, type NlpControllerClearSessionResponse, type NlpControllerGetSessionData, type NlpControllerGetSessionResponse, type NlpControllerProcessNaturalLanguageData, type NlpControllerProcessNaturalLanguageResponse, type NlpDefaultAccountsDto, type NlpDuplicateConfirmationDataDto, type NlpParsedDataDto, type NlpPayeeConfirmationDataDto, type NlpResponseDto, type NlpRuleConfirmationDataDto, type NlpSimilarityDto, type NlpSourceTransactionDto, type NlpSuggestedAccountDto, type NlpSuggestedAccountsDto, type NlpSuggestedPayeeDto, type NlpTargetTransactionDto, type NlpTransactionInfoDto, OpenAPI, type OpenAPIConfig, type ParserTelemetryReportDto, type PayeeAutocompleteResponseDto, type PayeeControllerAutocompleteData, type PayeeControllerAutocompleteResponse, type PayeeControllerCreateData, type PayeeControllerCreateResponse, type PayeeControllerDeleteData, type PayeeControllerDeleteResponse, type PayeeControllerFindAllData, type PayeeControllerFindAllResponse, type PayeeControllerFindOneData, type PayeeControllerFindOneResponse, type PayeeControllerGetTopPayeesData, type PayeeControllerGetTopPayeesResponse, type PayeeControllerUpdateData, type PayeeControllerUpdateResponse, type PayeeListResponseDto, type PayeeProfileAdminControllerCreateData, type PayeeProfileAdminControllerCreateResponse, type PayeeProfileAdminControllerDeleteData, type PayeeProfileAdminControllerDeleteResponse, type PayeeProfileAdminControllerFindAllData, type PayeeProfileAdminControllerFindAllResponse, type PayeeProfileAdminControllerFindOneData, type PayeeProfileAdminControllerFindOneResponse, type PayeeProfileAdminControllerUnverifyData, type PayeeProfileAdminControllerUnverifyResponse, type PayeeProfileAdminControllerUpdateData, type PayeeProfileAdminControllerUpdateResponse, type PayeeProfileAdminControllerVerifyData, type PayeeProfileAdminControllerVerifyResponse, type PayeeProfileListResponseDto, type PayeeProfileResponseDto, type PayeeResponseDto, type PayeeStatsResponseDto, type PlatformControllerCreateData, type PlatformControllerCreateResponse, type PlatformControllerDeleteData, type PlatformControllerDeleteResponse, type PlatformControllerFindAllResponse, type PlatformControllerGetPlatformListResponse, type PlatformControllerMatchPlatformsData, type PlatformControllerMatchPlatformsResponse, type PlatformControllerUpdateData, type PlatformControllerUpdateResponse, type PlatformGroupDto, type PortfolioTrendsResponseDto, type PostingDetailDto, type PostingResponseDto, type ProcessNlpDto, type PropertyControllerDeleteData, type PropertyControllerDeleteResponse, type PropertyControllerGetAllResponse, type PropertyControllerGetByKeyData, type PropertyControllerGetByKeyResponse, type PropertyControllerUpdateData, type PropertyControllerUpdateResponse, type ProviderSyncConfigDto, type ProviderSyncControllerGetSupportedProvidersData, type ProviderSyncControllerGetSupportedProvidersResponse, type ProviderSyncControllerIsProviderSupportedData, type ProviderSyncControllerIsProviderSupportedResponse, type ProviderSyncControllerSyncData, type ProviderSyncControllerSyncResponse, type ProviderSyncDto, type ProviderSyncResponseDto, ProviderSyncService, type RecurringMatchInfoDto, type RecurringRuleControllerCreateData, type RecurringRuleControllerCreateFromTransactionData, type RecurringRuleControllerCreateFromTransactionResponse, type RecurringRuleControllerCreateResponse, type RecurringRuleControllerDeleteData, type RecurringRuleControllerDeleteResponse, type RecurringRuleControllerFindAllData, type RecurringRuleControllerFindAllResponse, type RecurringRuleControllerFindOneData, type RecurringRuleControllerFindOneResponse, type RecurringRuleControllerGetWithStatsData, type RecurringRuleControllerGetWithStatsResponse, type RecurringRuleControllerUpdateData, type RecurringRuleControllerUpdateResponse, type RecurringRuleResponseDto, type RecurringRuleWithStatsResponseDto, type RecurringSuggestionDto, type RegionConfigDto, type RegionInfoDto, type RegionsMetadataResponseDto, type ReopenAccountDto, type ReportingControllerBackfillSnapshotsData, type ReportingControllerBackfillSnapshotsResponse, type ReportingControllerGenerateSnapshotData, type ReportingControllerGenerateSnapshotResponse, type ReportingControllerGetPortfolioTrendsData, type ReportingControllerGetPortfolioTrendsResponse, type ResolveResultDto, type ResolveReviewDto, type ReviewControllerBatchResolveData, type ReviewControllerBatchResolveResponse, type ReviewControllerFindAllData, type ReviewControllerFindAllResponse, type ReviewControllerFindOneData, type ReviewControllerFindOneResponse, type ReviewControllerGetStatsData, type ReviewControllerGetStatsResponse, type ReviewControllerResolveData, type ReviewControllerResolveResponse, type ReviewControllerUndoData, type ReviewControllerUndoResponse, type ReviewDetailDto, type ReviewItemPreviewDto, type ReviewListResponseDto, type ReviewStatsDto, type ReviewSummaryDto, type RuleStatisticsResponseDto, type SignupDto, type SupportedProvidersResponseDto, type TagSuggestionDto, type TagSuggestionsResponseDto, type TelemetryControllerReportTelemetryData, type TelemetryControllerReportTelemetryResponse, type TemplateMetadataDto, type TemplateMetadataResponseDto, type TestRuleDto, type TestRuleResponseDto, type TimeSeriesPointDto, type TransactionControllerCreateBatchData, type TransactionControllerCreateBatchResponse, type TransactionControllerCreateData, type TransactionControllerCreateResponse, type TransactionControllerDeleteData, type TransactionControllerDeleteResponse, type TransactionControllerGetDetailData, type TransactionControllerGetDetailResponse, type TransactionControllerListData, type TransactionControllerListResponse, type TransactionControllerSuggestTagsData, type TransactionControllerSuggestTagsResponse, type TransactionControllerUpdateData, type TransactionControllerUpdateResponse, type TransactionDetailDto, type TransactionListResponseDto, type TransactionResponseDto, type TransactionRuleControllerBulkCreateData, type TransactionRuleControllerBulkCreateResponse, type TransactionRuleControllerCreateData, type TransactionRuleControllerCreateResponse, type TransactionRuleControllerDeleteData, type TransactionRuleControllerDeleteResponse, type TransactionRuleControllerExportData, type TransactionRuleControllerExportResponse, type TransactionRuleControllerGetDetailData, type TransactionRuleControllerGetDetailResponse, type TransactionRuleControllerGetStatisticsData, type TransactionRuleControllerGetStatisticsResponse, type TransactionRuleControllerListData, type TransactionRuleControllerListResponse, type TransactionRuleControllerTestData, type TransactionRuleControllerTestResponse, type TransactionRuleControllerUpdateData, type TransactionRuleControllerUpdateResponse, type TransactionRuleControllerValidateData, type TransactionRuleControllerValidateResponse, type TransactionRuleListResponseDto, type TransactionRuleResponseDto, type TransactionSummaryDto, type TrendSummaryDto, type UndoResultDto, type UpdateAccountDto, type UpdateCommodityDto, type UpdateConfigDataDto, type UpdateImporterConfigDto, type UpdateMapperDefaultsDto, type UpdatePayeeDto, type UpdatePayeeProfileDto, type UpdatePlatformDto, type UpdatePropertyDto, type UpdateRecurringRuleDto, type UpdateTransactionDto, type UpdateTransactionRuleDto, type UpdateUserSettingDto, type UserControllerDeleteOwnUserData, type UserControllerDeleteOwnUserResponse, type UserControllerDeleteUserData, type UserControllerDeleteUserResponse, type UserControllerGetAllUserSettingsByPageData, type UserControllerGetAllUserSettingsByPageResponse, type UserControllerGetAssetLiabilitySummaryResponse, type UserControllerGetUserData, type UserControllerGetUserInfoData, type UserControllerGetUserInfoResponse, type UserControllerGetUserResponse, type UserControllerSignupUserData, type UserControllerSignupUserResponse, type UserControllerUpdateUserSettingData, type UserControllerUpdateUserSettingResponse, type ValidateRuleDto, type ValidateRuleResponseDto, type VersionedConfigDto, type action, type action2, type assetClass, type assetSubType, type bookingMethod, type branchType, type category, type colorScheme, type confidenceLevel, type conflictStrategy, type dataSource, type equitySubType, type flag, type flag2, type frequency, type importerId, type intent, type investmentAction, type learningSource, type liabilitySubType, type matchLogic, type paymentSource, type period, type source, type status, type status2, type status3, type status4, type suggestedFrequency, type type, type type2, type type3, type value, type viewMode };
7585
+ export { type $OpenApiTs, type AccountControllerCloseData, type AccountControllerCloseResponse, type AccountControllerCreateData, type AccountControllerCreateResponse, type AccountControllerDeleteData, type AccountControllerDeleteResponse, type AccountControllerFindAllData, type AccountControllerFindAllResponse, type AccountControllerFindOneData, type AccountControllerFindOneResponse, type AccountControllerReopenData, type AccountControllerReopenResponse, type AccountControllerUpdateData, type AccountControllerUpdateResponse, type AccountExchangeRateWarningDto, type AccountItemDto, type AccountItemWithAssetClassDto, type AccountListResponseDto, type AccountResponseDto, type AccountStandardListResponseDto, type AccountStandardResponseDto, type AccountStandardsControllerGetRegionsData, type AccountStandardsControllerGetRegionsResponse, type AccountStandardsControllerGetTemplateMetadataData, type AccountStandardsControllerGetTemplateMetadataResponse, type AccountStandardsControllerGetTemplatesData, type AccountStandardsControllerGetTemplatesResponse, type AccountsResponseDto, type AccountsSummaryDto, type AmountRangeDto, type AnonymousLoginDto, type ApiKeysControllerCreateApiKeyResponse, type ApiProblemResponseDto, type AssetClassAccountsResponseDto, type AssetClassGroupDto, type AssetClassSummaryDto, type AuthControllerAccessTokenLoginData, type AuthControllerAccessTokenLoginResponse, type BackfillSnapshotsBody, type BackfillSnapshotsResponse, type BalanceByCurrencyDto, type BalanceControllerGetBalanceData, type BalanceControllerGetBalanceResponse, type BalanceControllerGetMultiCurrencyBalanceData, type BalanceControllerGetMultiCurrencyBalanceResponse, type BalanceResponseDto, type BatchCreateTransactionDto, type BatchResolveDto, type BatchResolveResultDto, type BatchTransactionErrorDto, type BatchTransactionResponseDto, BeanAccountsService, BeanBalancesService, BeanCommoditiesService, BeanTransactionsService, type BulkCreateRulesDto, type BulkCreateRulesResponseDto, type CacheControllerFlushCacheResponse, type CashFlowByCurrencyDto, type CashFlowResponseDto, type CloseAccountDto, type CommodityControllerBulkCreateData, type CommodityControllerBulkCreateResponse, type CommodityControllerCreateData, type CommodityControllerCreateResponse, type CommodityControllerDeleteData, type CommodityControllerDeleteResponse, type CommodityControllerFindAllData, type CommodityControllerFindAllResponse, type CommodityControllerFindOneData, type CommodityControllerFindOneResponse, type CommodityControllerGetOrCreateData, type CommodityControllerGetOrCreateResponse, type CommodityControllerUpdateData, type CommodityControllerUpdateResponse, type CommodityListResponseDto, type CommodityResponseDto, type ConfirmMatchDto, type ConvertedCashFlowDto, type ConvertedNetWorthDto, type CorrectTransactionDto, type CreateAccountDto, type CreateCommodityDto, type CreatePayeeDto, type CreatePayeeProfileDto, type CreatePlatformDto, type CreatePostingDto, type CreateRecurringRuleDto, type CreateRuleFromTransactionDto, type CreateTransactionDto, type CreateTransactionRuleDto, type CurrencyBalanceDto, type DashboardControllerGetAccountsData, type DashboardControllerGetAccountsResponse, type DashboardControllerGetCashFlowData, type DashboardControllerGetCashFlowResponse, type DashboardControllerGetNetWorthData, type DashboardControllerGetNetWorthResponse, type DecisionOptionDto, type DeleteOwnUserDto, type EnterNowDto, type ExchangeRateControllerGetExchangeRateData, type ExchangeRateControllerGetExchangeRateResponse, type ExchangeRateWarningDto, type ExpectedTransactionControllerConfirmMatchData, type ExpectedTransactionControllerConfirmMatchResponse, type ExpectedTransactionControllerEnterNowData, type ExpectedTransactionControllerEnterNowResponse, type ExpectedTransactionControllerFindAllData, type ExpectedTransactionControllerFindAllResponse, type ExpectedTransactionControllerFindOneData, type ExpectedTransactionControllerFindOneResponse, type ExpectedTransactionControllerFindOverdueData, type ExpectedTransactionControllerFindOverdueResponse, type ExpectedTransactionControllerSkipData, type ExpectedTransactionControllerSkipResponse, type ExpectedTransactionControllerUndoSkipData, type ExpectedTransactionControllerUndoSkipResponse, type ExpectedTransactionControllerUnmatchData, type ExpectedTransactionControllerUnmatchResponse, type ExpectedTransactionListResponseDto, type ExpectedTransactionResponseDto, type ExpectedTransactionRuleDto, type ExportControllerExportBeancountResponse, type ExportRulesResponseDto, type FileImportControllerIdentifyFileData, type FileImportControllerIdentifyFileResponse, type FileImportControllerImportBeancountData, type FileImportControllerImportBeancountResponse, type FileImportControllerImportFileData, type FileImportControllerImportFileResponse, type FileImportDto, type ForecastControllerGetForecastData, type ForecastControllerGetForecastResponse, type ForecastItemDto, type ForecastResponseDto, type GenerateSnapshotBody, type GenerateSnapshotResponse, type HealthControllerCheckDatabaseResponse, type HealthControllerCheckOpenBbResponse, type HealthControllerCheckRedisResponse, type HealthControllerGetCircuitBreakersHealthResponse, type HealthControllerGetHealthResponse, type HealthControllerGetMetricsResponse, type HealthControllerResetCircuitBreakerData, type HealthControllerResetCircuitBreakerResponse, HealthService, type IdentifyResultDto, type ImportErrorDto, type ImportResultDto, type ImporterConfigControllerGetConfigData, type ImporterConfigControllerGetConfigResponse, type ImporterConfigControllerResetConfigData, type ImporterConfigControllerResetConfigResponse, type ImporterConfigControllerUpdateConfigData, type ImporterConfigControllerUpdateConfigResponse, type ImporterConfigDataDto, type ImporterConfigDto, type InfoControllerGetInfoResponse, type MapperDefaultsDto, type MonthlyForecastDto, type MultiCurrencyBalanceResponseDto, type MultiCurrencyPointDto, type NetWorthByCurrencyDto, type NetWorthResponseDto, type NlpAccountConfirmationDataDto, type NlpAlternativePayeeDto, type NlpControllerClearSessionData, type NlpControllerClearSessionResponse, type NlpControllerGetSessionData, type NlpControllerGetSessionResponse, type NlpControllerProcessNaturalLanguageData, type NlpControllerProcessNaturalLanguageResponse, type NlpDefaultAccountsDto, type NlpDuplicateConfirmationDataDto, type NlpParsedDataDto, type NlpPayeeConfirmationDataDto, type NlpResponseDto, type NlpRuleConfirmationDataDto, type NlpSimilarityDto, type NlpSourceTransactionDto, type NlpSuggestedAccountDto, type NlpSuggestedAccountsDto, type NlpSuggestedPayeeDto, type NlpTargetTransactionDto, type NlpTransactionInfoDto, OpenAPI, type OpenAPIConfig, type ParserTelemetryReportDto, type PayeeAutocompleteResponseDto, type PayeeControllerAutocompleteData, type PayeeControllerAutocompleteResponse, type PayeeControllerCreateData, type PayeeControllerCreateResponse, type PayeeControllerDeleteData, type PayeeControllerDeleteResponse, type PayeeControllerFindAllData, type PayeeControllerFindAllResponse, type PayeeControllerFindOneData, type PayeeControllerFindOneResponse, type PayeeControllerGetTopPayeesData, type PayeeControllerGetTopPayeesResponse, type PayeeControllerUpdateData, type PayeeControllerUpdateResponse, type PayeeListResponseDto, type PayeeProfileAdminControllerCreateData, type PayeeProfileAdminControllerCreateResponse, type PayeeProfileAdminControllerDeleteData, type PayeeProfileAdminControllerDeleteResponse, type PayeeProfileAdminControllerFindAllData, type PayeeProfileAdminControllerFindAllResponse, type PayeeProfileAdminControllerFindOneData, type PayeeProfileAdminControllerFindOneResponse, type PayeeProfileAdminControllerUnverifyData, type PayeeProfileAdminControllerUnverifyResponse, type PayeeProfileAdminControllerUpdateData, type PayeeProfileAdminControllerUpdateResponse, type PayeeProfileAdminControllerVerifyData, type PayeeProfileAdminControllerVerifyResponse, type PayeeProfileListResponseDto, type PayeeProfileResponseDto, type PayeeResponseDto, type PayeeStatsResponseDto, type PlatformControllerCreateData, type PlatformControllerCreateResponse, type PlatformControllerDeleteData, type PlatformControllerDeleteResponse, type PlatformControllerFindAllResponse, type PlatformControllerGetPlatformListResponse, type PlatformControllerMatchPlatformsData, type PlatformControllerMatchPlatformsResponse, type PlatformControllerUpdateData, type PlatformControllerUpdateResponse, type PlatformGroupDto, type PortfolioTrendsResponseDto, type PostingDetailDto, type PostingResponseDto, type ProcessNlpDto, type PropertyControllerDeleteData, type PropertyControllerDeleteResponse, type PropertyControllerGetAllResponse, type PropertyControllerGetByKeyData, type PropertyControllerGetByKeyResponse, type PropertyControllerUpdateData, type PropertyControllerUpdateResponse, type ProviderSyncConfigDto, type ProviderSyncControllerGetSupportedProvidersData, type ProviderSyncControllerGetSupportedProvidersResponse, type ProviderSyncControllerIsProviderSupportedData, type ProviderSyncControllerIsProviderSupportedResponse, type ProviderSyncControllerSyncData, type ProviderSyncControllerSyncResponse, type ProviderSyncDto, type ProviderSyncResponseDto, ProviderSyncService, type RecurringMatchInfoDto, type RecurringRuleControllerCreateData, type RecurringRuleControllerCreateFromTransactionData, type RecurringRuleControllerCreateFromTransactionResponse, type RecurringRuleControllerCreateResponse, type RecurringRuleControllerDeleteData, type RecurringRuleControllerDeleteResponse, type RecurringRuleControllerFindAllData, type RecurringRuleControllerFindAllResponse, type RecurringRuleControllerFindOneData, type RecurringRuleControllerFindOneResponse, type RecurringRuleControllerGetWithStatsData, type RecurringRuleControllerGetWithStatsResponse, type RecurringRuleControllerUpdateData, type RecurringRuleControllerUpdateResponse, type RecurringRuleResponseDto, type RecurringRuleWithStatsResponseDto, type RecurringSuggestionDto, type RegionConfigDto, type RegionInfoDto, type RegionsMetadataResponseDto, type ReopenAccountDto, type ReportingControllerBackfillSnapshotsData, type ReportingControllerBackfillSnapshotsResponse, type ReportingControllerGenerateSnapshotData, type ReportingControllerGenerateSnapshotResponse, type ReportingControllerGetPortfolioTrendsData, type ReportingControllerGetPortfolioTrendsResponse, type ResolveResultDto, type ResolveReviewDto, type ReviewControllerBatchResolveData, type ReviewControllerBatchResolveResponse, type ReviewControllerFindAllData, type ReviewControllerFindAllResponse, type ReviewControllerFindOneData, type ReviewControllerFindOneResponse, type ReviewControllerGetStatsData, type ReviewControllerGetStatsResponse, type ReviewControllerResolveData, type ReviewControllerResolveResponse, type ReviewControllerUndoData, type ReviewControllerUndoResponse, type ReviewDetailDto, type ReviewItemPreviewDto, type ReviewListResponseDto, type ReviewStatsDto, type ReviewSummaryDto, type RuleStatisticsResponseDto, type SignupDto, type SupportedProvidersResponseDto, type TagSuggestionDto, type TagSuggestionsResponseDto, type TelemetryControllerReportTelemetryData, type TelemetryControllerReportTelemetryResponse, type TemplateMetadataDto, type TemplateMetadataResponseDto, type TestRuleDto, type TestRuleResponseDto, type TimeSeriesPointDto, type TransactionControllerCorrectData, type TransactionControllerCorrectResponse, type TransactionControllerCreateBatchData, type TransactionControllerCreateBatchResponse, type TransactionControllerCreateData, type TransactionControllerCreateResponse, type TransactionControllerDeleteData, type TransactionControllerDeleteResponse, type TransactionControllerGetDetailData, type TransactionControllerGetDetailResponse, type TransactionControllerListData, type TransactionControllerListResponse, type TransactionControllerSuggestTagsData, type TransactionControllerSuggestTagsResponse, type TransactionControllerUpdateData, type TransactionControllerUpdateResponse, type TransactionDetailDto, type TransactionListResponseDto, type TransactionResponseDto, type TransactionRuleControllerBulkCreateData, type TransactionRuleControllerBulkCreateResponse, type TransactionRuleControllerCreateData, type TransactionRuleControllerCreateResponse, type TransactionRuleControllerDeleteData, type TransactionRuleControllerDeleteResponse, type TransactionRuleControllerExportData, type TransactionRuleControllerExportResponse, type TransactionRuleControllerGetDetailData, type TransactionRuleControllerGetDetailResponse, type TransactionRuleControllerGetStatisticsData, type TransactionRuleControllerGetStatisticsResponse, type TransactionRuleControllerListData, type TransactionRuleControllerListResponse, type TransactionRuleControllerTestData, type TransactionRuleControllerTestResponse, type TransactionRuleControllerUpdateData, type TransactionRuleControllerUpdateResponse, type TransactionRuleControllerValidateData, type TransactionRuleControllerValidateResponse, type TransactionRuleListResponseDto, type TransactionRuleResponseDto, type TransactionSummaryDto, type TrendSummaryDto, type UndoResultDto, type UpdateAccountDto, type UpdateCommodityDto, type UpdateConfigDataDto, type UpdateImporterConfigDto, type UpdateMapperDefaultsDto, type UpdatePayeeDto, type UpdatePayeeProfileDto, type UpdatePlatformDto, type UpdatePropertyDto, type UpdateRecurringRuleDto, type UpdateTransactionDto, type UpdateTransactionRuleDto, type UpdateUserSettingDto, type UserControllerDeleteOwnUserData, type UserControllerDeleteOwnUserResponse, type UserControllerDeleteUserData, type UserControllerDeleteUserResponse, type UserControllerGetAllUserSettingsByPageData, type UserControllerGetAllUserSettingsByPageResponse, type UserControllerGetAssetLiabilitySummaryResponse, type UserControllerGetUserData, type UserControllerGetUserInfoData, type UserControllerGetUserInfoResponse, type UserControllerGetUserResponse, type UserControllerSignupUserData, type UserControllerSignupUserResponse, type UserControllerUpdateUserSettingData, type UserControllerUpdateUserSettingResponse, type ValidateRuleDto, type ValidateRuleResponseDto, type VersionedConfigDto, type action, type action2, type assetClass, type assetSubType, type bookingMethod, type branchType, type category, type colorScheme, type confidenceLevel, type conflictStrategy, type dataSource, type equitySubType, type flag, type flag2, type frequency, type importerId, type intent, type investmentAction, type learningSource, type liabilitySubType, type matchLogic, type paymentSource, type period, type source, type status, type status2, type status3, type status4, type suggestedFrequency, type type, type type2, type type3, type value, type viewMode };
package/dist/index.d.ts CHANGED
@@ -513,6 +513,54 @@ type BatchTransactionResponseDto = {
513
513
  */
514
514
  failed: Array<BatchTransactionErrorDto>;
515
515
  };
516
+ type CorrectTransactionDto = {
517
+ /**
518
+ * Transaction date (ISO 8601 format)
519
+ */
520
+ date: string;
521
+ /**
522
+ * Transaction flag: * (cleared), ! (pending)
523
+ */
524
+ flag?: '*' | '!';
525
+ /**
526
+ * Payee name
527
+ */
528
+ payee?: string;
529
+ /**
530
+ * Transaction narration/description
531
+ */
532
+ narration: string;
533
+ /**
534
+ * Transaction tags (without # prefix)
535
+ */
536
+ tags?: Array<string>;
537
+ /**
538
+ * Transaction links (without ^ prefix)
539
+ */
540
+ links?: Array<string>;
541
+ /**
542
+ * Transaction postings (minimum 1, typically 2 for double-entry)
543
+ */
544
+ postings: Array<CreatePostingDto>;
545
+ /**
546
+ * Transaction-level metadata
547
+ */
548
+ meta?: {
549
+ [key: string]: unknown;
550
+ };
551
+ /**
552
+ * Unique key for idempotent transaction creation. If provided, duplicate requests with the same key will return the existing transaction.
553
+ */
554
+ idempotencyKey?: string;
555
+ /**
556
+ * Auto-create accounts if not found. When true, missing accounts will be automatically created. When false (default for API), missing accounts will cause a validation error. Set to true for quick entry scenarios where you want to create accounts on-the-fly.
557
+ */
558
+ autoCreateAccounts?: boolean;
559
+ /**
560
+ * Reason for correcting/superseding the original transaction
561
+ */
562
+ correctionReason?: string;
563
+ };
516
564
  type PostingDetailDto = {
517
565
  /**
518
566
  * Posting ID
@@ -636,6 +684,14 @@ type TransactionDetailDto = {
636
684
  * Correction reason (if voided or superseded)
637
685
  */
638
686
  correctionReason?: string;
687
+ /**
688
+ * ID of the transaction that supersedes this one (set when status=SUPERSEDED)
689
+ */
690
+ supersededBy?: string;
691
+ /**
692
+ * ID of the transaction this one corrected/replaced (back-link on the replacement)
693
+ */
694
+ originalTxn?: string;
639
695
  };
640
696
  /**
641
697
  * Transaction flag
@@ -4101,6 +4157,18 @@ type TransactionControllerCreateBatchData = {
4101
4157
  requestBody: BatchCreateTransactionDto;
4102
4158
  };
4103
4159
  type TransactionControllerCreateBatchResponse = BatchTransactionResponseDto;
4160
+ type TransactionControllerCorrectData = {
4161
+ /**
4162
+ * Original transaction ID to correct
4163
+ */
4164
+ id: string;
4165
+ /**
4166
+ * Region code for tenant context
4167
+ */
4168
+ region: 'cn' | 'us' | 'de' | 'gb';
4169
+ requestBody: CorrectTransactionDto;
4170
+ };
4171
+ type TransactionControllerCorrectResponse = TransactionDetailDto;
4104
4172
  type TransactionControllerSuggestTagsData = {
4105
4173
  /**
4106
4174
  * Max suggestions (1-100, default 10)
@@ -5336,6 +5404,29 @@ type $OpenApiTs = {
5336
5404
  };
5337
5405
  };
5338
5406
  };
5407
+ '/api/v1/{region}/bean/transactions/{id}/correct': {
5408
+ post: {
5409
+ req: TransactionControllerCorrectData;
5410
+ res: {
5411
+ /**
5412
+ * Corrected transaction created
5413
+ */
5414
+ 201: TransactionDetailDto;
5415
+ /**
5416
+ * Original transaction not found
5417
+ */
5418
+ 404: ApiProblemResponseDto;
5419
+ /**
5420
+ * Original no longer ACTIVE (concurrent modification)
5421
+ */
5422
+ 409: ApiProblemResponseDto;
5423
+ /**
5424
+ * Pipeline validation failed (does not balance, invalid accounts)
5425
+ */
5426
+ 422: ApiProblemResponseDto;
5427
+ };
5428
+ };
5429
+ };
5339
5430
  '/api/v1/{region}/bean/transactions/tags': {
5340
5431
  get: {
5341
5432
  req: TransactionControllerSuggestTagsData;
@@ -7201,6 +7292,17 @@ declare class BeanTransactionsService {
7201
7292
  * @throws ApiError
7202
7293
  */
7203
7294
  static transactionControllerCreateBatch(data: TransactionControllerCreateBatchData): CancelablePromise<TransactionControllerCreateBatchResponse>;
7295
+ /**
7296
+ * Correct (supersede) a transaction
7297
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
7298
+ * @param data The data for the request.
7299
+ * @param data.id Original transaction ID to correct
7300
+ * @param data.region Region code for tenant context
7301
+ * @param data.requestBody
7302
+ * @returns TransactionDetailDto Corrected transaction created
7303
+ * @throws ApiError
7304
+ */
7305
+ static transactionControllerCorrect(data: TransactionControllerCorrectData): CancelablePromise<TransactionControllerCorrectResponse>;
7204
7306
  /**
7205
7307
  * Suggest transaction tags
7206
7308
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -7480,4 +7582,4 @@ type OpenAPIConfig = {
7480
7582
  };
7481
7583
  declare const OpenAPI: OpenAPIConfig;
7482
7584
 
7483
- export { type $OpenApiTs, type AccountControllerCloseData, type AccountControllerCloseResponse, type AccountControllerCreateData, type AccountControllerCreateResponse, type AccountControllerDeleteData, type AccountControllerDeleteResponse, type AccountControllerFindAllData, type AccountControllerFindAllResponse, type AccountControllerFindOneData, type AccountControllerFindOneResponse, type AccountControllerReopenData, type AccountControllerReopenResponse, type AccountControllerUpdateData, type AccountControllerUpdateResponse, type AccountExchangeRateWarningDto, type AccountItemDto, type AccountItemWithAssetClassDto, type AccountListResponseDto, type AccountResponseDto, type AccountStandardListResponseDto, type AccountStandardResponseDto, type AccountStandardsControllerGetRegionsData, type AccountStandardsControllerGetRegionsResponse, type AccountStandardsControllerGetTemplateMetadataData, type AccountStandardsControllerGetTemplateMetadataResponse, type AccountStandardsControllerGetTemplatesData, type AccountStandardsControllerGetTemplatesResponse, type AccountsResponseDto, type AccountsSummaryDto, type AmountRangeDto, type AnonymousLoginDto, type ApiKeysControllerCreateApiKeyResponse, type ApiProblemResponseDto, type AssetClassAccountsResponseDto, type AssetClassGroupDto, type AssetClassSummaryDto, type AuthControllerAccessTokenLoginData, type AuthControllerAccessTokenLoginResponse, type BackfillSnapshotsBody, type BackfillSnapshotsResponse, type BalanceByCurrencyDto, type BalanceControllerGetBalanceData, type BalanceControllerGetBalanceResponse, type BalanceControllerGetMultiCurrencyBalanceData, type BalanceControllerGetMultiCurrencyBalanceResponse, type BalanceResponseDto, type BatchCreateTransactionDto, type BatchResolveDto, type BatchResolveResultDto, type BatchTransactionErrorDto, type BatchTransactionResponseDto, BeanAccountsService, BeanBalancesService, BeanCommoditiesService, BeanTransactionsService, type BulkCreateRulesDto, type BulkCreateRulesResponseDto, type CacheControllerFlushCacheResponse, type CashFlowByCurrencyDto, type CashFlowResponseDto, type CloseAccountDto, type CommodityControllerBulkCreateData, type CommodityControllerBulkCreateResponse, type CommodityControllerCreateData, type CommodityControllerCreateResponse, type CommodityControllerDeleteData, type CommodityControllerDeleteResponse, type CommodityControllerFindAllData, type CommodityControllerFindAllResponse, type CommodityControllerFindOneData, type CommodityControllerFindOneResponse, type CommodityControllerGetOrCreateData, type CommodityControllerGetOrCreateResponse, type CommodityControllerUpdateData, type CommodityControllerUpdateResponse, type CommodityListResponseDto, type CommodityResponseDto, type ConfirmMatchDto, type ConvertedCashFlowDto, type ConvertedNetWorthDto, type CreateAccountDto, type CreateCommodityDto, type CreatePayeeDto, type CreatePayeeProfileDto, type CreatePlatformDto, type CreatePostingDto, type CreateRecurringRuleDto, type CreateRuleFromTransactionDto, type CreateTransactionDto, type CreateTransactionRuleDto, type CurrencyBalanceDto, type DashboardControllerGetAccountsData, type DashboardControllerGetAccountsResponse, type DashboardControllerGetCashFlowData, type DashboardControllerGetCashFlowResponse, type DashboardControllerGetNetWorthData, type DashboardControllerGetNetWorthResponse, type DecisionOptionDto, type DeleteOwnUserDto, type EnterNowDto, type ExchangeRateControllerGetExchangeRateData, type ExchangeRateControllerGetExchangeRateResponse, type ExchangeRateWarningDto, type ExpectedTransactionControllerConfirmMatchData, type ExpectedTransactionControllerConfirmMatchResponse, type ExpectedTransactionControllerEnterNowData, type ExpectedTransactionControllerEnterNowResponse, type ExpectedTransactionControllerFindAllData, type ExpectedTransactionControllerFindAllResponse, type ExpectedTransactionControllerFindOneData, type ExpectedTransactionControllerFindOneResponse, type ExpectedTransactionControllerFindOverdueData, type ExpectedTransactionControllerFindOverdueResponse, type ExpectedTransactionControllerSkipData, type ExpectedTransactionControllerSkipResponse, type ExpectedTransactionControllerUndoSkipData, type ExpectedTransactionControllerUndoSkipResponse, type ExpectedTransactionControllerUnmatchData, type ExpectedTransactionControllerUnmatchResponse, type ExpectedTransactionListResponseDto, type ExpectedTransactionResponseDto, type ExpectedTransactionRuleDto, type ExportControllerExportBeancountResponse, type ExportRulesResponseDto, type FileImportControllerIdentifyFileData, type FileImportControllerIdentifyFileResponse, type FileImportControllerImportBeancountData, type FileImportControllerImportBeancountResponse, type FileImportControllerImportFileData, type FileImportControllerImportFileResponse, type FileImportDto, type ForecastControllerGetForecastData, type ForecastControllerGetForecastResponse, type ForecastItemDto, type ForecastResponseDto, type GenerateSnapshotBody, type GenerateSnapshotResponse, type HealthControllerCheckDatabaseResponse, type HealthControllerCheckOpenBbResponse, type HealthControllerCheckRedisResponse, type HealthControllerGetCircuitBreakersHealthResponse, type HealthControllerGetHealthResponse, type HealthControllerGetMetricsResponse, type HealthControllerResetCircuitBreakerData, type HealthControllerResetCircuitBreakerResponse, HealthService, type IdentifyResultDto, type ImportErrorDto, type ImportResultDto, type ImporterConfigControllerGetConfigData, type ImporterConfigControllerGetConfigResponse, type ImporterConfigControllerResetConfigData, type ImporterConfigControllerResetConfigResponse, type ImporterConfigControllerUpdateConfigData, type ImporterConfigControllerUpdateConfigResponse, type ImporterConfigDataDto, type ImporterConfigDto, type InfoControllerGetInfoResponse, type MapperDefaultsDto, type MonthlyForecastDto, type MultiCurrencyBalanceResponseDto, type MultiCurrencyPointDto, type NetWorthByCurrencyDto, type NetWorthResponseDto, type NlpAccountConfirmationDataDto, type NlpAlternativePayeeDto, type NlpControllerClearSessionData, type NlpControllerClearSessionResponse, type NlpControllerGetSessionData, type NlpControllerGetSessionResponse, type NlpControllerProcessNaturalLanguageData, type NlpControllerProcessNaturalLanguageResponse, type NlpDefaultAccountsDto, type NlpDuplicateConfirmationDataDto, type NlpParsedDataDto, type NlpPayeeConfirmationDataDto, type NlpResponseDto, type NlpRuleConfirmationDataDto, type NlpSimilarityDto, type NlpSourceTransactionDto, type NlpSuggestedAccountDto, type NlpSuggestedAccountsDto, type NlpSuggestedPayeeDto, type NlpTargetTransactionDto, type NlpTransactionInfoDto, OpenAPI, type OpenAPIConfig, type ParserTelemetryReportDto, type PayeeAutocompleteResponseDto, type PayeeControllerAutocompleteData, type PayeeControllerAutocompleteResponse, type PayeeControllerCreateData, type PayeeControllerCreateResponse, type PayeeControllerDeleteData, type PayeeControllerDeleteResponse, type PayeeControllerFindAllData, type PayeeControllerFindAllResponse, type PayeeControllerFindOneData, type PayeeControllerFindOneResponse, type PayeeControllerGetTopPayeesData, type PayeeControllerGetTopPayeesResponse, type PayeeControllerUpdateData, type PayeeControllerUpdateResponse, type PayeeListResponseDto, type PayeeProfileAdminControllerCreateData, type PayeeProfileAdminControllerCreateResponse, type PayeeProfileAdminControllerDeleteData, type PayeeProfileAdminControllerDeleteResponse, type PayeeProfileAdminControllerFindAllData, type PayeeProfileAdminControllerFindAllResponse, type PayeeProfileAdminControllerFindOneData, type PayeeProfileAdminControllerFindOneResponse, type PayeeProfileAdminControllerUnverifyData, type PayeeProfileAdminControllerUnverifyResponse, type PayeeProfileAdminControllerUpdateData, type PayeeProfileAdminControllerUpdateResponse, type PayeeProfileAdminControllerVerifyData, type PayeeProfileAdminControllerVerifyResponse, type PayeeProfileListResponseDto, type PayeeProfileResponseDto, type PayeeResponseDto, type PayeeStatsResponseDto, type PlatformControllerCreateData, type PlatformControllerCreateResponse, type PlatformControllerDeleteData, type PlatformControllerDeleteResponse, type PlatformControllerFindAllResponse, type PlatformControllerGetPlatformListResponse, type PlatformControllerMatchPlatformsData, type PlatformControllerMatchPlatformsResponse, type PlatformControllerUpdateData, type PlatformControllerUpdateResponse, type PlatformGroupDto, type PortfolioTrendsResponseDto, type PostingDetailDto, type PostingResponseDto, type ProcessNlpDto, type PropertyControllerDeleteData, type PropertyControllerDeleteResponse, type PropertyControllerGetAllResponse, type PropertyControllerGetByKeyData, type PropertyControllerGetByKeyResponse, type PropertyControllerUpdateData, type PropertyControllerUpdateResponse, type ProviderSyncConfigDto, type ProviderSyncControllerGetSupportedProvidersData, type ProviderSyncControllerGetSupportedProvidersResponse, type ProviderSyncControllerIsProviderSupportedData, type ProviderSyncControllerIsProviderSupportedResponse, type ProviderSyncControllerSyncData, type ProviderSyncControllerSyncResponse, type ProviderSyncDto, type ProviderSyncResponseDto, ProviderSyncService, type RecurringMatchInfoDto, type RecurringRuleControllerCreateData, type RecurringRuleControllerCreateFromTransactionData, type RecurringRuleControllerCreateFromTransactionResponse, type RecurringRuleControllerCreateResponse, type RecurringRuleControllerDeleteData, type RecurringRuleControllerDeleteResponse, type RecurringRuleControllerFindAllData, type RecurringRuleControllerFindAllResponse, type RecurringRuleControllerFindOneData, type RecurringRuleControllerFindOneResponse, type RecurringRuleControllerGetWithStatsData, type RecurringRuleControllerGetWithStatsResponse, type RecurringRuleControllerUpdateData, type RecurringRuleControllerUpdateResponse, type RecurringRuleResponseDto, type RecurringRuleWithStatsResponseDto, type RecurringSuggestionDto, type RegionConfigDto, type RegionInfoDto, type RegionsMetadataResponseDto, type ReopenAccountDto, type ReportingControllerBackfillSnapshotsData, type ReportingControllerBackfillSnapshotsResponse, type ReportingControllerGenerateSnapshotData, type ReportingControllerGenerateSnapshotResponse, type ReportingControllerGetPortfolioTrendsData, type ReportingControllerGetPortfolioTrendsResponse, type ResolveResultDto, type ResolveReviewDto, type ReviewControllerBatchResolveData, type ReviewControllerBatchResolveResponse, type ReviewControllerFindAllData, type ReviewControllerFindAllResponse, type ReviewControllerFindOneData, type ReviewControllerFindOneResponse, type ReviewControllerGetStatsData, type ReviewControllerGetStatsResponse, type ReviewControllerResolveData, type ReviewControllerResolveResponse, type ReviewControllerUndoData, type ReviewControllerUndoResponse, type ReviewDetailDto, type ReviewItemPreviewDto, type ReviewListResponseDto, type ReviewStatsDto, type ReviewSummaryDto, type RuleStatisticsResponseDto, type SignupDto, type SupportedProvidersResponseDto, type TagSuggestionDto, type TagSuggestionsResponseDto, type TelemetryControllerReportTelemetryData, type TelemetryControllerReportTelemetryResponse, type TemplateMetadataDto, type TemplateMetadataResponseDto, type TestRuleDto, type TestRuleResponseDto, type TimeSeriesPointDto, type TransactionControllerCreateBatchData, type TransactionControllerCreateBatchResponse, type TransactionControllerCreateData, type TransactionControllerCreateResponse, type TransactionControllerDeleteData, type TransactionControllerDeleteResponse, type TransactionControllerGetDetailData, type TransactionControllerGetDetailResponse, type TransactionControllerListData, type TransactionControllerListResponse, type TransactionControllerSuggestTagsData, type TransactionControllerSuggestTagsResponse, type TransactionControllerUpdateData, type TransactionControllerUpdateResponse, type TransactionDetailDto, type TransactionListResponseDto, type TransactionResponseDto, type TransactionRuleControllerBulkCreateData, type TransactionRuleControllerBulkCreateResponse, type TransactionRuleControllerCreateData, type TransactionRuleControllerCreateResponse, type TransactionRuleControllerDeleteData, type TransactionRuleControllerDeleteResponse, type TransactionRuleControllerExportData, type TransactionRuleControllerExportResponse, type TransactionRuleControllerGetDetailData, type TransactionRuleControllerGetDetailResponse, type TransactionRuleControllerGetStatisticsData, type TransactionRuleControllerGetStatisticsResponse, type TransactionRuleControllerListData, type TransactionRuleControllerListResponse, type TransactionRuleControllerTestData, type TransactionRuleControllerTestResponse, type TransactionRuleControllerUpdateData, type TransactionRuleControllerUpdateResponse, type TransactionRuleControllerValidateData, type TransactionRuleControllerValidateResponse, type TransactionRuleListResponseDto, type TransactionRuleResponseDto, type TransactionSummaryDto, type TrendSummaryDto, type UndoResultDto, type UpdateAccountDto, type UpdateCommodityDto, type UpdateConfigDataDto, type UpdateImporterConfigDto, type UpdateMapperDefaultsDto, type UpdatePayeeDto, type UpdatePayeeProfileDto, type UpdatePlatformDto, type UpdatePropertyDto, type UpdateRecurringRuleDto, type UpdateTransactionDto, type UpdateTransactionRuleDto, type UpdateUserSettingDto, type UserControllerDeleteOwnUserData, type UserControllerDeleteOwnUserResponse, type UserControllerDeleteUserData, type UserControllerDeleteUserResponse, type UserControllerGetAllUserSettingsByPageData, type UserControllerGetAllUserSettingsByPageResponse, type UserControllerGetAssetLiabilitySummaryResponse, type UserControllerGetUserData, type UserControllerGetUserInfoData, type UserControllerGetUserInfoResponse, type UserControllerGetUserResponse, type UserControllerSignupUserData, type UserControllerSignupUserResponse, type UserControllerUpdateUserSettingData, type UserControllerUpdateUserSettingResponse, type ValidateRuleDto, type ValidateRuleResponseDto, type VersionedConfigDto, type action, type action2, type assetClass, type assetSubType, type bookingMethod, type branchType, type category, type colorScheme, type confidenceLevel, type conflictStrategy, type dataSource, type equitySubType, type flag, type flag2, type frequency, type importerId, type intent, type investmentAction, type learningSource, type liabilitySubType, type matchLogic, type paymentSource, type period, type source, type status, type status2, type status3, type status4, type suggestedFrequency, type type, type type2, type type3, type value, type viewMode };
7585
+ export { type $OpenApiTs, type AccountControllerCloseData, type AccountControllerCloseResponse, type AccountControllerCreateData, type AccountControllerCreateResponse, type AccountControllerDeleteData, type AccountControllerDeleteResponse, type AccountControllerFindAllData, type AccountControllerFindAllResponse, type AccountControllerFindOneData, type AccountControllerFindOneResponse, type AccountControllerReopenData, type AccountControllerReopenResponse, type AccountControllerUpdateData, type AccountControllerUpdateResponse, type AccountExchangeRateWarningDto, type AccountItemDto, type AccountItemWithAssetClassDto, type AccountListResponseDto, type AccountResponseDto, type AccountStandardListResponseDto, type AccountStandardResponseDto, type AccountStandardsControllerGetRegionsData, type AccountStandardsControllerGetRegionsResponse, type AccountStandardsControllerGetTemplateMetadataData, type AccountStandardsControllerGetTemplateMetadataResponse, type AccountStandardsControllerGetTemplatesData, type AccountStandardsControllerGetTemplatesResponse, type AccountsResponseDto, type AccountsSummaryDto, type AmountRangeDto, type AnonymousLoginDto, type ApiKeysControllerCreateApiKeyResponse, type ApiProblemResponseDto, type AssetClassAccountsResponseDto, type AssetClassGroupDto, type AssetClassSummaryDto, type AuthControllerAccessTokenLoginData, type AuthControllerAccessTokenLoginResponse, type BackfillSnapshotsBody, type BackfillSnapshotsResponse, type BalanceByCurrencyDto, type BalanceControllerGetBalanceData, type BalanceControllerGetBalanceResponse, type BalanceControllerGetMultiCurrencyBalanceData, type BalanceControllerGetMultiCurrencyBalanceResponse, type BalanceResponseDto, type BatchCreateTransactionDto, type BatchResolveDto, type BatchResolveResultDto, type BatchTransactionErrorDto, type BatchTransactionResponseDto, BeanAccountsService, BeanBalancesService, BeanCommoditiesService, BeanTransactionsService, type BulkCreateRulesDto, type BulkCreateRulesResponseDto, type CacheControllerFlushCacheResponse, type CashFlowByCurrencyDto, type CashFlowResponseDto, type CloseAccountDto, type CommodityControllerBulkCreateData, type CommodityControllerBulkCreateResponse, type CommodityControllerCreateData, type CommodityControllerCreateResponse, type CommodityControllerDeleteData, type CommodityControllerDeleteResponse, type CommodityControllerFindAllData, type CommodityControllerFindAllResponse, type CommodityControllerFindOneData, type CommodityControllerFindOneResponse, type CommodityControllerGetOrCreateData, type CommodityControllerGetOrCreateResponse, type CommodityControllerUpdateData, type CommodityControllerUpdateResponse, type CommodityListResponseDto, type CommodityResponseDto, type ConfirmMatchDto, type ConvertedCashFlowDto, type ConvertedNetWorthDto, type CorrectTransactionDto, type CreateAccountDto, type CreateCommodityDto, type CreatePayeeDto, type CreatePayeeProfileDto, type CreatePlatformDto, type CreatePostingDto, type CreateRecurringRuleDto, type CreateRuleFromTransactionDto, type CreateTransactionDto, type CreateTransactionRuleDto, type CurrencyBalanceDto, type DashboardControllerGetAccountsData, type DashboardControllerGetAccountsResponse, type DashboardControllerGetCashFlowData, type DashboardControllerGetCashFlowResponse, type DashboardControllerGetNetWorthData, type DashboardControllerGetNetWorthResponse, type DecisionOptionDto, type DeleteOwnUserDto, type EnterNowDto, type ExchangeRateControllerGetExchangeRateData, type ExchangeRateControllerGetExchangeRateResponse, type ExchangeRateWarningDto, type ExpectedTransactionControllerConfirmMatchData, type ExpectedTransactionControllerConfirmMatchResponse, type ExpectedTransactionControllerEnterNowData, type ExpectedTransactionControllerEnterNowResponse, type ExpectedTransactionControllerFindAllData, type ExpectedTransactionControllerFindAllResponse, type ExpectedTransactionControllerFindOneData, type ExpectedTransactionControllerFindOneResponse, type ExpectedTransactionControllerFindOverdueData, type ExpectedTransactionControllerFindOverdueResponse, type ExpectedTransactionControllerSkipData, type ExpectedTransactionControllerSkipResponse, type ExpectedTransactionControllerUndoSkipData, type ExpectedTransactionControllerUndoSkipResponse, type ExpectedTransactionControllerUnmatchData, type ExpectedTransactionControllerUnmatchResponse, type ExpectedTransactionListResponseDto, type ExpectedTransactionResponseDto, type ExpectedTransactionRuleDto, type ExportControllerExportBeancountResponse, type ExportRulesResponseDto, type FileImportControllerIdentifyFileData, type FileImportControllerIdentifyFileResponse, type FileImportControllerImportBeancountData, type FileImportControllerImportBeancountResponse, type FileImportControllerImportFileData, type FileImportControllerImportFileResponse, type FileImportDto, type ForecastControllerGetForecastData, type ForecastControllerGetForecastResponse, type ForecastItemDto, type ForecastResponseDto, type GenerateSnapshotBody, type GenerateSnapshotResponse, type HealthControllerCheckDatabaseResponse, type HealthControllerCheckOpenBbResponse, type HealthControllerCheckRedisResponse, type HealthControllerGetCircuitBreakersHealthResponse, type HealthControllerGetHealthResponse, type HealthControllerGetMetricsResponse, type HealthControllerResetCircuitBreakerData, type HealthControllerResetCircuitBreakerResponse, HealthService, type IdentifyResultDto, type ImportErrorDto, type ImportResultDto, type ImporterConfigControllerGetConfigData, type ImporterConfigControllerGetConfigResponse, type ImporterConfigControllerResetConfigData, type ImporterConfigControllerResetConfigResponse, type ImporterConfigControllerUpdateConfigData, type ImporterConfigControllerUpdateConfigResponse, type ImporterConfigDataDto, type ImporterConfigDto, type InfoControllerGetInfoResponse, type MapperDefaultsDto, type MonthlyForecastDto, type MultiCurrencyBalanceResponseDto, type MultiCurrencyPointDto, type NetWorthByCurrencyDto, type NetWorthResponseDto, type NlpAccountConfirmationDataDto, type NlpAlternativePayeeDto, type NlpControllerClearSessionData, type NlpControllerClearSessionResponse, type NlpControllerGetSessionData, type NlpControllerGetSessionResponse, type NlpControllerProcessNaturalLanguageData, type NlpControllerProcessNaturalLanguageResponse, type NlpDefaultAccountsDto, type NlpDuplicateConfirmationDataDto, type NlpParsedDataDto, type NlpPayeeConfirmationDataDto, type NlpResponseDto, type NlpRuleConfirmationDataDto, type NlpSimilarityDto, type NlpSourceTransactionDto, type NlpSuggestedAccountDto, type NlpSuggestedAccountsDto, type NlpSuggestedPayeeDto, type NlpTargetTransactionDto, type NlpTransactionInfoDto, OpenAPI, type OpenAPIConfig, type ParserTelemetryReportDto, type PayeeAutocompleteResponseDto, type PayeeControllerAutocompleteData, type PayeeControllerAutocompleteResponse, type PayeeControllerCreateData, type PayeeControllerCreateResponse, type PayeeControllerDeleteData, type PayeeControllerDeleteResponse, type PayeeControllerFindAllData, type PayeeControllerFindAllResponse, type PayeeControllerFindOneData, type PayeeControllerFindOneResponse, type PayeeControllerGetTopPayeesData, type PayeeControllerGetTopPayeesResponse, type PayeeControllerUpdateData, type PayeeControllerUpdateResponse, type PayeeListResponseDto, type PayeeProfileAdminControllerCreateData, type PayeeProfileAdminControllerCreateResponse, type PayeeProfileAdminControllerDeleteData, type PayeeProfileAdminControllerDeleteResponse, type PayeeProfileAdminControllerFindAllData, type PayeeProfileAdminControllerFindAllResponse, type PayeeProfileAdminControllerFindOneData, type PayeeProfileAdminControllerFindOneResponse, type PayeeProfileAdminControllerUnverifyData, type PayeeProfileAdminControllerUnverifyResponse, type PayeeProfileAdminControllerUpdateData, type PayeeProfileAdminControllerUpdateResponse, type PayeeProfileAdminControllerVerifyData, type PayeeProfileAdminControllerVerifyResponse, type PayeeProfileListResponseDto, type PayeeProfileResponseDto, type PayeeResponseDto, type PayeeStatsResponseDto, type PlatformControllerCreateData, type PlatformControllerCreateResponse, type PlatformControllerDeleteData, type PlatformControllerDeleteResponse, type PlatformControllerFindAllResponse, type PlatformControllerGetPlatformListResponse, type PlatformControllerMatchPlatformsData, type PlatformControllerMatchPlatformsResponse, type PlatformControllerUpdateData, type PlatformControllerUpdateResponse, type PlatformGroupDto, type PortfolioTrendsResponseDto, type PostingDetailDto, type PostingResponseDto, type ProcessNlpDto, type PropertyControllerDeleteData, type PropertyControllerDeleteResponse, type PropertyControllerGetAllResponse, type PropertyControllerGetByKeyData, type PropertyControllerGetByKeyResponse, type PropertyControllerUpdateData, type PropertyControllerUpdateResponse, type ProviderSyncConfigDto, type ProviderSyncControllerGetSupportedProvidersData, type ProviderSyncControllerGetSupportedProvidersResponse, type ProviderSyncControllerIsProviderSupportedData, type ProviderSyncControllerIsProviderSupportedResponse, type ProviderSyncControllerSyncData, type ProviderSyncControllerSyncResponse, type ProviderSyncDto, type ProviderSyncResponseDto, ProviderSyncService, type RecurringMatchInfoDto, type RecurringRuleControllerCreateData, type RecurringRuleControllerCreateFromTransactionData, type RecurringRuleControllerCreateFromTransactionResponse, type RecurringRuleControllerCreateResponse, type RecurringRuleControllerDeleteData, type RecurringRuleControllerDeleteResponse, type RecurringRuleControllerFindAllData, type RecurringRuleControllerFindAllResponse, type RecurringRuleControllerFindOneData, type RecurringRuleControllerFindOneResponse, type RecurringRuleControllerGetWithStatsData, type RecurringRuleControllerGetWithStatsResponse, type RecurringRuleControllerUpdateData, type RecurringRuleControllerUpdateResponse, type RecurringRuleResponseDto, type RecurringRuleWithStatsResponseDto, type RecurringSuggestionDto, type RegionConfigDto, type RegionInfoDto, type RegionsMetadataResponseDto, type ReopenAccountDto, type ReportingControllerBackfillSnapshotsData, type ReportingControllerBackfillSnapshotsResponse, type ReportingControllerGenerateSnapshotData, type ReportingControllerGenerateSnapshotResponse, type ReportingControllerGetPortfolioTrendsData, type ReportingControllerGetPortfolioTrendsResponse, type ResolveResultDto, type ResolveReviewDto, type ReviewControllerBatchResolveData, type ReviewControllerBatchResolveResponse, type ReviewControllerFindAllData, type ReviewControllerFindAllResponse, type ReviewControllerFindOneData, type ReviewControllerFindOneResponse, type ReviewControllerGetStatsData, type ReviewControllerGetStatsResponse, type ReviewControllerResolveData, type ReviewControllerResolveResponse, type ReviewControllerUndoData, type ReviewControllerUndoResponse, type ReviewDetailDto, type ReviewItemPreviewDto, type ReviewListResponseDto, type ReviewStatsDto, type ReviewSummaryDto, type RuleStatisticsResponseDto, type SignupDto, type SupportedProvidersResponseDto, type TagSuggestionDto, type TagSuggestionsResponseDto, type TelemetryControllerReportTelemetryData, type TelemetryControllerReportTelemetryResponse, type TemplateMetadataDto, type TemplateMetadataResponseDto, type TestRuleDto, type TestRuleResponseDto, type TimeSeriesPointDto, type TransactionControllerCorrectData, type TransactionControllerCorrectResponse, type TransactionControllerCreateBatchData, type TransactionControllerCreateBatchResponse, type TransactionControllerCreateData, type TransactionControllerCreateResponse, type TransactionControllerDeleteData, type TransactionControllerDeleteResponse, type TransactionControllerGetDetailData, type TransactionControllerGetDetailResponse, type TransactionControllerListData, type TransactionControllerListResponse, type TransactionControllerSuggestTagsData, type TransactionControllerSuggestTagsResponse, type TransactionControllerUpdateData, type TransactionControllerUpdateResponse, type TransactionDetailDto, type TransactionListResponseDto, type TransactionResponseDto, type TransactionRuleControllerBulkCreateData, type TransactionRuleControllerBulkCreateResponse, type TransactionRuleControllerCreateData, type TransactionRuleControllerCreateResponse, type TransactionRuleControllerDeleteData, type TransactionRuleControllerDeleteResponse, type TransactionRuleControllerExportData, type TransactionRuleControllerExportResponse, type TransactionRuleControllerGetDetailData, type TransactionRuleControllerGetDetailResponse, type TransactionRuleControllerGetStatisticsData, type TransactionRuleControllerGetStatisticsResponse, type TransactionRuleControllerListData, type TransactionRuleControllerListResponse, type TransactionRuleControllerTestData, type TransactionRuleControllerTestResponse, type TransactionRuleControllerUpdateData, type TransactionRuleControllerUpdateResponse, type TransactionRuleControllerValidateData, type TransactionRuleControllerValidateResponse, type TransactionRuleListResponseDto, type TransactionRuleResponseDto, type TransactionSummaryDto, type TrendSummaryDto, type UndoResultDto, type UpdateAccountDto, type UpdateCommodityDto, type UpdateConfigDataDto, type UpdateImporterConfigDto, type UpdateMapperDefaultsDto, type UpdatePayeeDto, type UpdatePayeeProfileDto, type UpdatePlatformDto, type UpdatePropertyDto, type UpdateRecurringRuleDto, type UpdateTransactionDto, type UpdateTransactionRuleDto, type UpdateUserSettingDto, type UserControllerDeleteOwnUserData, type UserControllerDeleteOwnUserResponse, type UserControllerDeleteUserData, type UserControllerDeleteUserResponse, type UserControllerGetAllUserSettingsByPageData, type UserControllerGetAllUserSettingsByPageResponse, type UserControllerGetAssetLiabilitySummaryResponse, type UserControllerGetUserData, type UserControllerGetUserInfoData, type UserControllerGetUserInfoResponse, type UserControllerGetUserResponse, type UserControllerSignupUserData, type UserControllerSignupUserResponse, type UserControllerUpdateUserSettingData, type UserControllerUpdateUserSettingResponse, type ValidateRuleDto, type ValidateRuleResponseDto, type VersionedConfigDto, type action, type action2, type assetClass, type assetSubType, type bookingMethod, type branchType, type category, type colorScheme, type confidenceLevel, type conflictStrategy, type dataSource, type equitySubType, type flag, type flag2, type frequency, type importerId, type intent, type investmentAction, type learningSource, type liabilitySubType, type matchLogic, type paymentSource, type period, type source, type status, type status2, type status3, type status4, type suggestedFrequency, type type, type type2, type type3, type value, type viewMode };
package/dist/index.js CHANGED
@@ -720,6 +720,33 @@ var BeanTransactionsService = class {
720
720
  }
721
721
  });
722
722
  }
723
+ /**
724
+ * Correct (supersede) a transaction
725
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
726
+ * @param data The data for the request.
727
+ * @param data.id Original transaction ID to correct
728
+ * @param data.region Region code for tenant context
729
+ * @param data.requestBody
730
+ * @returns TransactionDetailDto Corrected transaction created
731
+ * @throws ApiError
732
+ */
733
+ static transactionControllerCorrect(data) {
734
+ return request(OpenAPI, {
735
+ method: "POST",
736
+ url: "/api/v1/{region}/bean/transactions/{id}/correct",
737
+ path: {
738
+ id: data.id,
739
+ region: data.region
740
+ },
741
+ body: data.requestBody,
742
+ mediaType: "application/json",
743
+ errors: {
744
+ 404: "Original transaction not found",
745
+ 409: "Original no longer ACTIVE (concurrent modification)",
746
+ 422: "Pipeline validation failed (does not balance, invalid accounts)"
747
+ }
748
+ });
749
+ }
723
750
  /**
724
751
  * Suggest transaction tags
725
752
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
package/dist/index.mjs CHANGED
@@ -688,6 +688,33 @@ var BeanTransactionsService = class {
688
688
  }
689
689
  });
690
690
  }
691
+ /**
692
+ * Correct (supersede) a transaction
693
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
694
+ * @param data The data for the request.
695
+ * @param data.id Original transaction ID to correct
696
+ * @param data.region Region code for tenant context
697
+ * @param data.requestBody
698
+ * @returns TransactionDetailDto Corrected transaction created
699
+ * @throws ApiError
700
+ */
701
+ static transactionControllerCorrect(data) {
702
+ return request(OpenAPI, {
703
+ method: "POST",
704
+ url: "/api/v1/{region}/bean/transactions/{id}/correct",
705
+ path: {
706
+ id: data.id,
707
+ region: data.region
708
+ },
709
+ body: data.requestBody,
710
+ mediaType: "application/json",
711
+ errors: {
712
+ 404: "Original transaction not found",
713
+ 409: "Original no longer ACTIVE (concurrent modification)",
714
+ 422: "Pipeline validation failed (does not balance, invalid accounts)"
715
+ }
716
+ });
717
+ }
691
718
  /**
692
719
  * Suggest transaction tags
693
720
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firela/api-types",
3
- "version": "0.0.0-canary.32edff08",
3
+ "version": "0.0.0-canary.614ff760",
4
4
  "description": "TypeScript types generated from IGN OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "author": "FireLa Team",
@@ -841,6 +841,85 @@ export const $BatchTransactionResponseDto = {
841
841
  required: ['succeeded', 'failed']
842
842
  } as const;
843
843
 
844
+ export const $CorrectTransactionDto = {
845
+ type: 'object',
846
+ properties: {
847
+ date: {
848
+ type: 'string',
849
+ description: 'Transaction date (ISO 8601 format)',
850
+ example: '2024-11-28'
851
+ },
852
+ flag: {
853
+ type: 'string',
854
+ description: 'Transaction flag: * (cleared), ! (pending)',
855
+ enum: ['*', '!'],
856
+ example: '*'
857
+ },
858
+ payee: {
859
+ type: 'string',
860
+ description: 'Payee name',
861
+ example: 'Whole Foods Market'
862
+ },
863
+ narration: {
864
+ type: 'string',
865
+ description: 'Transaction narration/description',
866
+ example: 'Grocery shopping'
867
+ },
868
+ tags: {
869
+ description: 'Transaction tags (without # prefix)',
870
+ example: ['vacation', 'personal'],
871
+ type: 'array',
872
+ items: {
873
+ type: 'string'
874
+ }
875
+ },
876
+ links: {
877
+ description: 'Transaction links (without ^ prefix)',
878
+ example: ['invoice-123'],
879
+ type: 'array',
880
+ items: {
881
+ type: 'string'
882
+ }
883
+ },
884
+ postings: {
885
+ description:
886
+ 'Transaction postings (minimum 1, typically 2 for double-entry)',
887
+ type: 'array',
888
+ items: {
889
+ $ref: '#/components/schemas/CreatePostingDto'
890
+ }
891
+ },
892
+ meta: {
893
+ type: 'object',
894
+ description: 'Transaction-level metadata',
895
+ example: {
896
+ invoice: '12345'
897
+ }
898
+ },
899
+ idempotencyKey: {
900
+ type: 'string',
901
+ description:
902
+ 'Unique key for idempotent transaction creation. If provided, duplicate requests with the same key will return the existing transaction.',
903
+ example: 'import-2024-01-15-batch-001',
904
+ maxLength: 128
905
+ },
906
+ autoCreateAccounts: {
907
+ type: 'boolean',
908
+ description:
909
+ 'Auto-create accounts if not found. When true, missing accounts will be automatically created. When false (default for API), missing accounts will cause a validation error. Set to true for quick entry scenarios where you want to create accounts on-the-fly.',
910
+ default: true,
911
+ example: true
912
+ },
913
+ correctionReason: {
914
+ type: 'string',
915
+ description: 'Reason for correcting/superseding the original transaction',
916
+ example: 'Wrong amount — corrected from receipt',
917
+ maxLength: 500
918
+ }
919
+ },
920
+ required: ['date', 'narration', 'postings']
921
+ } as const;
922
+
844
923
  export const $PostingDetailDto = {
845
924
  type: 'object',
846
925
  properties: {
@@ -1011,6 +1090,18 @@ export const $TransactionDetailDto = {
1011
1090
  type: 'string',
1012
1091
  description: 'Correction reason (if voided or superseded)',
1013
1092
  example: 'Duplicate entry'
1093
+ },
1094
+ supersededBy: {
1095
+ type: 'string',
1096
+ description:
1097
+ 'ID of the transaction that supersedes this one (set when status=SUPERSEDED)',
1098
+ example: 'clh1234567890abcdef'
1099
+ },
1100
+ originalTxn: {
1101
+ type: 'string',
1102
+ description:
1103
+ 'ID of the transaction this one corrected/replaced (back-link on the replacement)',
1104
+ example: 'clh1234567890abcdef'
1014
1105
  }
1015
1106
  },
1016
1107
  required: [
@@ -29,6 +29,8 @@ import type {
29
29
  TransactionControllerListResponse,
30
30
  TransactionControllerCreateBatchData,
31
31
  TransactionControllerCreateBatchResponse,
32
+ TransactionControllerCorrectData,
33
+ TransactionControllerCorrectResponse,
32
34
  TransactionControllerSuggestTagsData,
33
35
  TransactionControllerSuggestTagsResponse,
34
36
  TransactionControllerGetDetailData,
@@ -605,6 +607,36 @@ export class BeanTransactionsService {
605
607
  });
606
608
  }
607
609
 
610
+ /**
611
+ * Correct (supersede) a transaction
612
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
613
+ * @param data The data for the request.
614
+ * @param data.id Original transaction ID to correct
615
+ * @param data.region Region code for tenant context
616
+ * @param data.requestBody
617
+ * @returns TransactionDetailDto Corrected transaction created
618
+ * @throws ApiError
619
+ */
620
+ public static transactionControllerCorrect(
621
+ data: TransactionControllerCorrectData
622
+ ): CancelablePromise<TransactionControllerCorrectResponse> {
623
+ return __request(OpenAPI, {
624
+ method: 'POST',
625
+ url: '/api/v1/{region}/bean/transactions/{id}/correct',
626
+ path: {
627
+ id: data.id,
628
+ region: data.region
629
+ },
630
+ body: data.requestBody,
631
+ mediaType: 'application/json',
632
+ errors: {
633
+ 404: 'Original transaction not found',
634
+ 409: 'Original no longer ACTIVE (concurrent modification)',
635
+ 422: 'Pipeline validation failed (does not balance, invalid accounts)'
636
+ }
637
+ });
638
+ }
639
+
608
640
  /**
609
641
  * Suggest transaction tags
610
642
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -561,6 +561,55 @@ export type BatchTransactionResponseDto = {
561
561
  failed: Array<BatchTransactionErrorDto>;
562
562
  };
563
563
 
564
+ export type CorrectTransactionDto = {
565
+ /**
566
+ * Transaction date (ISO 8601 format)
567
+ */
568
+ date: string;
569
+ /**
570
+ * Transaction flag: * (cleared), ! (pending)
571
+ */
572
+ flag?: '*' | '!';
573
+ /**
574
+ * Payee name
575
+ */
576
+ payee?: string;
577
+ /**
578
+ * Transaction narration/description
579
+ */
580
+ narration: string;
581
+ /**
582
+ * Transaction tags (without # prefix)
583
+ */
584
+ tags?: Array<string>;
585
+ /**
586
+ * Transaction links (without ^ prefix)
587
+ */
588
+ links?: Array<string>;
589
+ /**
590
+ * Transaction postings (minimum 1, typically 2 for double-entry)
591
+ */
592
+ postings: Array<CreatePostingDto>;
593
+ /**
594
+ * Transaction-level metadata
595
+ */
596
+ meta?: {
597
+ [key: string]: unknown;
598
+ };
599
+ /**
600
+ * Unique key for idempotent transaction creation. If provided, duplicate requests with the same key will return the existing transaction.
601
+ */
602
+ idempotencyKey?: string;
603
+ /**
604
+ * Auto-create accounts if not found. When true, missing accounts will be automatically created. When false (default for API), missing accounts will cause a validation error. Set to true for quick entry scenarios where you want to create accounts on-the-fly.
605
+ */
606
+ autoCreateAccounts?: boolean;
607
+ /**
608
+ * Reason for correcting/superseding the original transaction
609
+ */
610
+ correctionReason?: string;
611
+ };
612
+
564
613
  export type PostingDetailDto = {
565
614
  /**
566
615
  * Posting ID
@@ -691,6 +740,14 @@ export type TransactionDetailDto = {
691
740
  * Correction reason (if voided or superseded)
692
741
  */
693
742
  correctionReason?: string;
743
+ /**
744
+ * ID of the transaction that supersedes this one (set when status=SUPERSEDED)
745
+ */
746
+ supersededBy?: string;
747
+ /**
748
+ * ID of the transaction this one corrected/replaced (back-link on the replacement)
749
+ */
750
+ originalTxn?: string;
694
751
  };
695
752
 
696
753
  /**
@@ -4641,6 +4698,20 @@ export type TransactionControllerCreateBatchData = {
4641
4698
  export type TransactionControllerCreateBatchResponse =
4642
4699
  BatchTransactionResponseDto;
4643
4700
 
4701
+ export type TransactionControllerCorrectData = {
4702
+ /**
4703
+ * Original transaction ID to correct
4704
+ */
4705
+ id: string;
4706
+ /**
4707
+ * Region code for tenant context
4708
+ */
4709
+ region: 'cn' | 'us' | 'de' | 'gb';
4710
+ requestBody: CorrectTransactionDto;
4711
+ };
4712
+
4713
+ export type TransactionControllerCorrectResponse = TransactionDetailDto;
4714
+
4644
4715
  export type TransactionControllerSuggestTagsData = {
4645
4716
  /**
4646
4717
  * Max suggestions (1-100, default 10)
@@ -6141,6 +6212,29 @@ export type $OpenApiTs = {
6141
6212
  };
6142
6213
  };
6143
6214
  };
6215
+ '/api/v1/{region}/bean/transactions/{id}/correct': {
6216
+ post: {
6217
+ req: TransactionControllerCorrectData;
6218
+ res: {
6219
+ /**
6220
+ * Corrected transaction created
6221
+ */
6222
+ 201: TransactionDetailDto;
6223
+ /**
6224
+ * Original transaction not found
6225
+ */
6226
+ 404: ApiProblemResponseDto;
6227
+ /**
6228
+ * Original no longer ACTIVE (concurrent modification)
6229
+ */
6230
+ 409: ApiProblemResponseDto;
6231
+ /**
6232
+ * Pipeline validation failed (does not balance, invalid accounts)
6233
+ */
6234
+ 422: ApiProblemResponseDto;
6235
+ };
6236
+ };
6237
+ };
6144
6238
  '/api/v1/{region}/bean/transactions/tags': {
6145
6239
  get: {
6146
6240
  req: TransactionControllerSuggestTagsData;