@firela/api-types 0.0.0-canary.da5984a1 → 0.0.0-canary.ebb51de2

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.js CHANGED
@@ -454,12 +454,10 @@ var request = (config, options) => {
454
454
  // src/generated/services.gen.ts
455
455
  var BeanAccountsService = class {
456
456
  /**
457
- * Create a new account
458
- * Creates a new account (Beancount Open directive)
459
457
  * @param data The data for the request.
460
458
  * @param data.region Region code for tenant context
461
459
  * @param data.requestBody
462
- * @returns AccountResponseDto Account created successfully
460
+ * @returns unknown
463
461
  * @throws ApiError
464
462
  */
465
463
  static accountControllerCreate(data) {
@@ -470,10 +468,7 @@ var BeanAccountsService = class {
470
468
  region: data.region
471
469
  },
472
470
  body: data.requestBody,
473
- mediaType: "application/json",
474
- errors: {
475
- 409: "Account already exists"
476
- }
471
+ mediaType: "application/json"
477
472
  });
478
473
  }
479
474
  /**
@@ -530,13 +525,11 @@ var BeanAccountsService = class {
530
525
  });
531
526
  }
532
527
  /**
533
- * Update account
534
- * Updates account metadata (path cannot be changed)
535
528
  * @param data The data for the request.
536
- * @param data.id Account UUID
529
+ * @param data.id
537
530
  * @param data.region Region code for tenant context
538
531
  * @param data.requestBody
539
- * @returns AccountResponseDto Account updated successfully
532
+ * @returns unknown
540
533
  * @throws ApiError
541
534
  */
542
535
  static accountControllerUpdate(data) {
@@ -548,19 +541,14 @@ var BeanAccountsService = class {
548
541
  region: data.region
549
542
  },
550
543
  body: data.requestBody,
551
- mediaType: "application/json",
552
- errors: {
553
- 404: "Account not found"
554
- }
544
+ mediaType: "application/json"
555
545
  });
556
546
  }
557
547
  /**
558
- * Delete account
559
- * Deletes an account (only if no transactions)
560
548
  * @param data The data for the request.
561
- * @param data.id Account UUID
549
+ * @param data.id
562
550
  * @param data.region Region code for tenant context
563
- * @returns void Account deleted successfully
551
+ * @returns unknown
564
552
  * @throws ApiError
565
553
  */
566
554
  static accountControllerDelete(data) {
@@ -570,21 +558,15 @@ var BeanAccountsService = class {
570
558
  path: {
571
559
  id: data.id,
572
560
  region: data.region
573
- },
574
- errors: {
575
- 404: "Account not found",
576
- 409: "Account has transactions and cannot be deleted"
577
561
  }
578
562
  });
579
563
  }
580
564
  /**
581
- * Close account
582
- * Closes an account (Beancount Close directive)
583
565
  * @param data The data for the request.
584
- * @param data.id Account UUID
566
+ * @param data.id
585
567
  * @param data.region Region code for tenant context
586
568
  * @param data.requestBody
587
- * @returns AccountResponseDto Account closed successfully
569
+ * @returns unknown
588
570
  * @throws ApiError
589
571
  */
590
572
  static accountControllerClose(data) {
@@ -596,21 +578,15 @@ var BeanAccountsService = class {
596
578
  region: data.region
597
579
  },
598
580
  body: data.requestBody,
599
- mediaType: "application/json",
600
- errors: {
601
- 400: "Account is already closed",
602
- 404: "Account not found"
603
- }
581
+ mediaType: "application/json"
604
582
  });
605
583
  }
606
584
  /**
607
- * Reopen account
608
- * Reopens a previously closed account
609
585
  * @param data The data for the request.
610
- * @param data.id Account UUID
586
+ * @param data.id
611
587
  * @param data.region Region code for tenant context
612
588
  * @param data.requestBody
613
- * @returns AccountResponseDto Account reopened successfully
589
+ * @returns unknown
614
590
  * @throws ApiError
615
591
  */
616
592
  static accountControllerReopen(data) {
@@ -622,11 +598,7 @@ var BeanAccountsService = class {
622
598
  region: data.region
623
599
  },
624
600
  body: data.requestBody,
625
- mediaType: "application/json",
626
- errors: {
627
- 400: "Account is not closed",
628
- 404: "Account not found"
629
- }
601
+ mediaType: "application/json"
630
602
  });
631
603
  }
632
604
  };
@@ -720,6 +692,33 @@ var BeanTransactionsService = class {
720
692
  }
721
693
  });
722
694
  }
695
+ /**
696
+ * Correct (supersede) a transaction
697
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
698
+ * @param data The data for the request.
699
+ * @param data.id Original transaction ID to correct
700
+ * @param data.region Region code for tenant context
701
+ * @param data.requestBody
702
+ * @returns TransactionDetailDto Corrected transaction created
703
+ * @throws ApiError
704
+ */
705
+ static transactionControllerCorrect(data) {
706
+ return request(OpenAPI, {
707
+ method: "POST",
708
+ url: "/api/v1/{region}/bean/transactions/{id}/correct",
709
+ path: {
710
+ id: data.id,
711
+ region: data.region
712
+ },
713
+ body: data.requestBody,
714
+ mediaType: "application/json",
715
+ errors: {
716
+ 404: "Original transaction not found",
717
+ 409: "Original no longer ACTIVE (concurrent modification)",
718
+ 422: "Pipeline validation failed (does not balance, invalid accounts)"
719
+ }
720
+ });
721
+ }
723
722
  /**
724
723
  * Suggest transaction tags
725
724
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -1033,33 +1032,11 @@ var BeanCommoditiesService = class {
1033
1032
  };
1034
1033
  var ProviderSyncService = class {
1035
1034
  /**
1036
- * Sync transactions from financial data provider
1037
- *
1038
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
1039
- *
1040
- * **Supported Providers:**
1041
- * - **plaid**: Plaid API (US, Canada, Europe)
1042
- * - **teller**: Teller API (US)
1043
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
1044
- * - **gocardless**: GoCardless Bank Account Data (Europe)
1045
- * - **simplefin**: SimpleFIN (Self-hosted)
1046
- * - **yodlee**: Yodlee (Global)
1047
- * - **beancount-direct**: Beancount format transactions
1048
- * - **parsed-bill**: Client-side parsed bill transactions
1049
- *
1050
- * **Processing Flow:**
1051
- * 1. Transform raw data via provider adapter
1052
- * 2. Validate transaction format
1053
- * 3. Deduplicate using originalId
1054
- * 4. Classify using rule engine
1055
- * 5. Route low-confidence to Review Center
1056
- * 6. Persist validated transactions
1057
- *
1058
1035
  * @param data The data for the request.
1059
- * @param data.providerName Provider name
1060
- * @param data.region Region code
1036
+ * @param data.providerName
1037
+ * @param data.region Region code for tenant context
1061
1038
  * @param data.requestBody
1062
- * @returns ProviderSyncResponseDto Sync completed successfully
1039
+ * @returns unknown
1063
1040
  * @throws ApiError
1064
1041
  */
1065
1042
  static providerSyncControllerSync(data) {
@@ -1071,12 +1048,7 @@ var ProviderSyncService = class {
1071
1048
  region: data.region
1072
1049
  },
1073
1050
  body: data.requestBody,
1074
- mediaType: "application/json",
1075
- errors: {
1076
- 400: "Invalid request data",
1077
- 401: "Missing or invalid authentication",
1078
- 404: "Provider not supported"
1079
- }
1051
+ mediaType: "application/json"
1080
1052
  });
1081
1053
  }
1082
1054
  /**
package/dist/index.mjs CHANGED
@@ -422,12 +422,10 @@ var request = (config, options) => {
422
422
  // src/generated/services.gen.ts
423
423
  var BeanAccountsService = class {
424
424
  /**
425
- * Create a new account
426
- * Creates a new account (Beancount Open directive)
427
425
  * @param data The data for the request.
428
426
  * @param data.region Region code for tenant context
429
427
  * @param data.requestBody
430
- * @returns AccountResponseDto Account created successfully
428
+ * @returns unknown
431
429
  * @throws ApiError
432
430
  */
433
431
  static accountControllerCreate(data) {
@@ -438,10 +436,7 @@ var BeanAccountsService = class {
438
436
  region: data.region
439
437
  },
440
438
  body: data.requestBody,
441
- mediaType: "application/json",
442
- errors: {
443
- 409: "Account already exists"
444
- }
439
+ mediaType: "application/json"
445
440
  });
446
441
  }
447
442
  /**
@@ -498,13 +493,11 @@ var BeanAccountsService = class {
498
493
  });
499
494
  }
500
495
  /**
501
- * Update account
502
- * Updates account metadata (path cannot be changed)
503
496
  * @param data The data for the request.
504
- * @param data.id Account UUID
497
+ * @param data.id
505
498
  * @param data.region Region code for tenant context
506
499
  * @param data.requestBody
507
- * @returns AccountResponseDto Account updated successfully
500
+ * @returns unknown
508
501
  * @throws ApiError
509
502
  */
510
503
  static accountControllerUpdate(data) {
@@ -516,19 +509,14 @@ var BeanAccountsService = class {
516
509
  region: data.region
517
510
  },
518
511
  body: data.requestBody,
519
- mediaType: "application/json",
520
- errors: {
521
- 404: "Account not found"
522
- }
512
+ mediaType: "application/json"
523
513
  });
524
514
  }
525
515
  /**
526
- * Delete account
527
- * Deletes an account (only if no transactions)
528
516
  * @param data The data for the request.
529
- * @param data.id Account UUID
517
+ * @param data.id
530
518
  * @param data.region Region code for tenant context
531
- * @returns void Account deleted successfully
519
+ * @returns unknown
532
520
  * @throws ApiError
533
521
  */
534
522
  static accountControllerDelete(data) {
@@ -538,21 +526,15 @@ var BeanAccountsService = class {
538
526
  path: {
539
527
  id: data.id,
540
528
  region: data.region
541
- },
542
- errors: {
543
- 404: "Account not found",
544
- 409: "Account has transactions and cannot be deleted"
545
529
  }
546
530
  });
547
531
  }
548
532
  /**
549
- * Close account
550
- * Closes an account (Beancount Close directive)
551
533
  * @param data The data for the request.
552
- * @param data.id Account UUID
534
+ * @param data.id
553
535
  * @param data.region Region code for tenant context
554
536
  * @param data.requestBody
555
- * @returns AccountResponseDto Account closed successfully
537
+ * @returns unknown
556
538
  * @throws ApiError
557
539
  */
558
540
  static accountControllerClose(data) {
@@ -564,21 +546,15 @@ var BeanAccountsService = class {
564
546
  region: data.region
565
547
  },
566
548
  body: data.requestBody,
567
- mediaType: "application/json",
568
- errors: {
569
- 400: "Account is already closed",
570
- 404: "Account not found"
571
- }
549
+ mediaType: "application/json"
572
550
  });
573
551
  }
574
552
  /**
575
- * Reopen account
576
- * Reopens a previously closed account
577
553
  * @param data The data for the request.
578
- * @param data.id Account UUID
554
+ * @param data.id
579
555
  * @param data.region Region code for tenant context
580
556
  * @param data.requestBody
581
- * @returns AccountResponseDto Account reopened successfully
557
+ * @returns unknown
582
558
  * @throws ApiError
583
559
  */
584
560
  static accountControllerReopen(data) {
@@ -590,11 +566,7 @@ var BeanAccountsService = class {
590
566
  region: data.region
591
567
  },
592
568
  body: data.requestBody,
593
- mediaType: "application/json",
594
- errors: {
595
- 400: "Account is not closed",
596
- 404: "Account not found"
597
- }
569
+ mediaType: "application/json"
598
570
  });
599
571
  }
600
572
  };
@@ -688,6 +660,33 @@ var BeanTransactionsService = class {
688
660
  }
689
661
  });
690
662
  }
663
+ /**
664
+ * Correct (supersede) a transaction
665
+ * Atomically voids the original (SUPERSEDED) and creates a replacement through the full validation pipeline.
666
+ * @param data The data for the request.
667
+ * @param data.id Original transaction ID to correct
668
+ * @param data.region Region code for tenant context
669
+ * @param data.requestBody
670
+ * @returns TransactionDetailDto Corrected transaction created
671
+ * @throws ApiError
672
+ */
673
+ static transactionControllerCorrect(data) {
674
+ return request(OpenAPI, {
675
+ method: "POST",
676
+ url: "/api/v1/{region}/bean/transactions/{id}/correct",
677
+ path: {
678
+ id: data.id,
679
+ region: data.region
680
+ },
681
+ body: data.requestBody,
682
+ mediaType: "application/json",
683
+ errors: {
684
+ 404: "Original transaction not found",
685
+ 409: "Original no longer ACTIVE (concurrent modification)",
686
+ 422: "Pipeline validation failed (does not balance, invalid accounts)"
687
+ }
688
+ });
689
+ }
691
690
  /**
692
691
  * Suggest transaction tags
693
692
  * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
@@ -1001,33 +1000,11 @@ var BeanCommoditiesService = class {
1001
1000
  };
1002
1001
  var ProviderSyncService = class {
1003
1002
  /**
1004
- * Sync transactions from financial data provider
1005
- *
1006
- * Accepts raw transactions from external financial data providers, transforms them to Beancount format, and processes them through the ingestion pipeline.
1007
- *
1008
- * **Supported Providers:**
1009
- * - **plaid**: Plaid API (US, Canada, Europe)
1010
- * - **teller**: Teller API (US)
1011
- * - **truelayer**: TrueLayer Open Banking (UK, Europe)
1012
- * - **gocardless**: GoCardless Bank Account Data (Europe)
1013
- * - **simplefin**: SimpleFIN (Self-hosted)
1014
- * - **yodlee**: Yodlee (Global)
1015
- * - **beancount-direct**: Beancount format transactions
1016
- * - **parsed-bill**: Client-side parsed bill transactions
1017
- *
1018
- * **Processing Flow:**
1019
- * 1. Transform raw data via provider adapter
1020
- * 2. Validate transaction format
1021
- * 3. Deduplicate using originalId
1022
- * 4. Classify using rule engine
1023
- * 5. Route low-confidence to Review Center
1024
- * 6. Persist validated transactions
1025
- *
1026
1003
  * @param data The data for the request.
1027
- * @param data.providerName Provider name
1028
- * @param data.region Region code
1004
+ * @param data.providerName
1005
+ * @param data.region Region code for tenant context
1029
1006
  * @param data.requestBody
1030
- * @returns ProviderSyncResponseDto Sync completed successfully
1007
+ * @returns unknown
1031
1008
  * @throws ApiError
1032
1009
  */
1033
1010
  static providerSyncControllerSync(data) {
@@ -1039,12 +1016,7 @@ var ProviderSyncService = class {
1039
1016
  region: data.region
1040
1017
  },
1041
1018
  body: data.requestBody,
1042
- mediaType: "application/json",
1043
- errors: {
1044
- 400: "Invalid request data",
1045
- 401: "Missing or invalid authentication",
1046
- 404: "Provider not supported"
1047
- }
1019
+ mediaType: "application/json"
1048
1020
  });
1049
1021
  }
1050
1022
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firela/api-types",
3
- "version": "0.0.0-canary.da5984a1",
3
+ "version": "0.0.0-canary.ebb51de2",
4
4
  "description": "TypeScript types generated from IGN OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "author": "FireLa Team",
@@ -24,8 +24,7 @@
24
24
  "src"
25
25
  ],
26
26
  "scripts": {
27
- "sync": "npx ts-node scripts/sync-spec.ts",
28
- "generate": "npm run sync && openapi-ts",
27
+ "generate": "openapi-ts",
29
28
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
30
29
  "lint": "spectral lint openapi.yaml",
31
30
  "prepublishOnly": "npm run generate && npm run build"