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

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
@@ -720,6 +720,35 @@ var BeanTransactionsService = class {
720
720
  }
721
721
  });
722
722
  }
723
+ /**
724
+ * Suggest transaction tags
725
+ * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
726
+ * @param data The data for the request.
727
+ * @param data.region Region code for tenant context
728
+ * @param data.q Prefix match, case-insensitive (max 50 chars)
729
+ * @param data.sort usage (default) or name
730
+ * @param data.limit Max suggestions (1-100, default 10)
731
+ * @returns TagSuggestionsResponseDto Tag suggestions
732
+ * @throws ApiError
733
+ */
734
+ static transactionControllerSuggestTags(data) {
735
+ return request(OpenAPI, {
736
+ method: "GET",
737
+ url: "/api/v1/{region}/bean/transactions/tags",
738
+ path: {
739
+ region: data.region
740
+ },
741
+ query: {
742
+ q: data.q,
743
+ sort: data.sort,
744
+ limit: data.limit
745
+ },
746
+ errors: {
747
+ 400: "Validation failed",
748
+ 401: "Authentication required"
749
+ }
750
+ });
751
+ }
723
752
  /**
724
753
  * Get transaction detail
725
754
  * Returns transaction details including all postings
package/dist/index.mjs CHANGED
@@ -688,6 +688,35 @@ var BeanTransactionsService = class {
688
688
  }
689
689
  });
690
690
  }
691
+ /**
692
+ * Suggest transaction tags
693
+ * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
694
+ * @param data The data for the request.
695
+ * @param data.region Region code for tenant context
696
+ * @param data.q Prefix match, case-insensitive (max 50 chars)
697
+ * @param data.sort usage (default) or name
698
+ * @param data.limit Max suggestions (1-100, default 10)
699
+ * @returns TagSuggestionsResponseDto Tag suggestions
700
+ * @throws ApiError
701
+ */
702
+ static transactionControllerSuggestTags(data) {
703
+ return request(OpenAPI, {
704
+ method: "GET",
705
+ url: "/api/v1/{region}/bean/transactions/tags",
706
+ path: {
707
+ region: data.region
708
+ },
709
+ query: {
710
+ q: data.q,
711
+ sort: data.sort,
712
+ limit: data.limit
713
+ },
714
+ errors: {
715
+ 400: "Validation failed",
716
+ 401: "Authentication required"
717
+ }
718
+ });
719
+ }
691
720
  /**
692
721
  * Get transaction detail
693
722
  * Returns transaction details including all postings
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firela/api-types",
3
- "version": "0.0.0-canary.ba0a88d9",
3
+ "version": "0.0.0-canary.da5984a1",
4
4
  "description": "TypeScript types generated from IGN OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "author": "FireLa Team",
@@ -329,9 +329,14 @@ export const $AccountStandardResponseDto = {
329
329
  description: 'i18n key for localized display name',
330
330
  example: 'account.assets.cn.bank.icbc.checking'
331
331
  },
332
+ name: {
333
+ type: 'string',
334
+ description: 'Short localized display name',
335
+ example: 'Housing Fund'
336
+ },
332
337
  description: {
333
338
  type: 'string',
334
- description: 'Account description',
339
+ description: 'Account description (stable semantics only)',
335
340
  example: 'ICBC checking account for daily transactions'
336
341
  },
337
342
  tags: {
@@ -348,7 +353,7 @@ export const $AccountStandardResponseDto = {
348
353
  example: 'bank-icbc'
349
354
  }
350
355
  },
351
- required: ['path', 'type']
356
+ required: ['path', 'type', 'i18nKey', 'description', 'tags', 'icon']
352
357
  } as const;
353
358
 
354
359
  export const $AccountStandardListResponseDto = {
@@ -432,11 +437,10 @@ export const $RegionInfoDto = {
432
437
  example: 'Germany'
433
438
  },
434
439
  parent: {
435
- type: 'string',
436
- example: 'eu-core'
440
+ type: 'string'
437
441
  },
438
442
  chain: {
439
- example: ['eu-core', 'de'],
443
+ example: ['de'],
440
444
  type: 'array',
441
445
  items: {
442
446
  type: 'string'
@@ -579,7 +583,8 @@ export const $PostingResponseDto = {
579
583
  },
580
584
  units: {
581
585
  type: 'string',
582
- description: 'Amount (may be null if interpolated)',
586
+ description:
587
+ 'Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.',
583
588
  example: '100.50'
584
589
  },
585
590
  currency: {
@@ -805,6 +810,11 @@ export const $BatchTransactionErrorDto = {
805
810
  type: 'string',
806
811
  description: 'Error message describing the failure',
807
812
  example: 'Transaction does not balance'
813
+ },
814
+ errorCode: {
815
+ type: 'string',
816
+ description: 'Structured error code for programmatic handling',
817
+ example: 'INSUFFICIENT_QUANTITY'
808
818
  }
809
819
  },
810
820
  required: ['index', 'error']
@@ -851,7 +861,8 @@ export const $PostingDetailDto = {
851
861
  },
852
862
  units: {
853
863
  type: 'string',
854
- description: 'Amount (may be null if interpolated)',
864
+ description:
865
+ 'Amount as decimal string. Typed optional but always present in responses: interpolation fills any MISSING posting before it is persisted or returned.',
855
866
  example: '100.50'
856
867
  },
857
868
  currency: {
@@ -1043,6 +1054,37 @@ export const $TransactionListResponseDto = {
1043
1054
  required: ['data', 'total', 'limit', 'offset']
1044
1055
  } as const;
1045
1056
 
1057
+ export const $TagSuggestionDto = {
1058
+ type: 'object',
1059
+ properties: {
1060
+ tag: {
1061
+ type: 'string',
1062
+ description: 'Tag name',
1063
+ example: 'Monthly'
1064
+ },
1065
+ count: {
1066
+ type: 'number',
1067
+ description: 'Usage count across ACTIVE transactions',
1068
+ example: 12
1069
+ }
1070
+ },
1071
+ required: ['tag', 'count']
1072
+ } as const;
1073
+
1074
+ export const $TagSuggestionsResponseDto = {
1075
+ type: 'object',
1076
+ properties: {
1077
+ data: {
1078
+ description: 'Tag suggestions sorted as requested',
1079
+ type: 'array',
1080
+ items: {
1081
+ $ref: '#/components/schemas/TagSuggestionDto'
1082
+ }
1083
+ }
1084
+ },
1085
+ required: ['data']
1086
+ } as const;
1087
+
1046
1088
  export const $UpdateTransactionDto = {
1047
1089
  type: 'object',
1048
1090
  properties: {
@@ -1234,8 +1276,10 @@ export const $ReviewSummaryDto = {
1234
1276
  },
1235
1277
  confidenceLevel: {
1236
1278
  type: 'string',
1237
- description: 'Confidence level derived from score',
1238
- enum: ['HIGH', 'MEDIUM', 'LOW']
1279
+ description:
1280
+ 'Confidence level derived from score. Null for error-type reviews (ACCOUNT_VALIDATION/PIPELINE_ERROR) which carry no confidence.',
1281
+ enum: ['HIGH', 'MEDIUM', 'LOW'],
1282
+ nullable: true
1239
1283
  },
1240
1284
  summaryKey: {
1241
1285
  type: 'string',
@@ -1417,8 +1461,10 @@ export const $ReviewDetailDto = {
1417
1461
  },
1418
1462
  confidenceLevel: {
1419
1463
  type: 'string',
1420
- description: 'Confidence level derived from score',
1421
- enum: ['HIGH', 'MEDIUM', 'LOW']
1464
+ description:
1465
+ 'Confidence level derived from score. Null for error-type reviews (ACCOUNT_VALIDATION/PIPELINE_ERROR) which carry no confidence.',
1466
+ enum: ['HIGH', 'MEDIUM', 'LOW'],
1467
+ nullable: true
1422
1468
  },
1423
1469
  summaryKey: {
1424
1470
  type: 'string',
@@ -4688,6 +4734,16 @@ export const $ProcessNlpDto = {
4688
4734
  description:
4689
4735
  'Session ID for multi-turn conversation (auto-generated if not provided)',
4690
4736
  example: 'session_abc123'
4737
+ },
4738
+ parsedData: {
4739
+ type: 'object',
4740
+ description:
4741
+ 'Parsed data from previous NLP response for session recovery. Send back the parsedData received in confirm_payee/confirm responses.',
4742
+ example: {
4743
+ amount: 35,
4744
+ currency: 'CNY',
4745
+ payee: 'Starbucks'
4746
+ }
4691
4747
  }
4692
4748
  },
4693
4749
  required: ['message']
@@ -29,6 +29,8 @@ import type {
29
29
  TransactionControllerListResponse,
30
30
  TransactionControllerCreateBatchData,
31
31
  TransactionControllerCreateBatchResponse,
32
+ TransactionControllerSuggestTagsData,
33
+ TransactionControllerSuggestTagsResponse,
32
34
  TransactionControllerGetDetailData,
33
35
  TransactionControllerGetDetailResponse,
34
36
  TransactionControllerUpdateData,
@@ -603,6 +605,38 @@ export class BeanTransactionsService {
603
605
  });
604
606
  }
605
607
 
608
+ /**
609
+ * Suggest transaction tags
610
+ * Returns distinct tags from the user ACTIVE transactions, sorted by usage, for autocomplete. Optional q performs a case-insensitive prefix match.
611
+ * @param data The data for the request.
612
+ * @param data.region Region code for tenant context
613
+ * @param data.q Prefix match, case-insensitive (max 50 chars)
614
+ * @param data.sort usage (default) or name
615
+ * @param data.limit Max suggestions (1-100, default 10)
616
+ * @returns TagSuggestionsResponseDto Tag suggestions
617
+ * @throws ApiError
618
+ */
619
+ public static transactionControllerSuggestTags(
620
+ data: TransactionControllerSuggestTagsData
621
+ ): CancelablePromise<TransactionControllerSuggestTagsResponse> {
622
+ return __request(OpenAPI, {
623
+ method: 'GET',
624
+ url: '/api/v1/{region}/bean/transactions/tags',
625
+ path: {
626
+ region: data.region
627
+ },
628
+ query: {
629
+ q: data.q,
630
+ sort: data.sort,
631
+ limit: data.limit
632
+ },
633
+ errors: {
634
+ 400: 'Validation failed',
635
+ 401: 'Authentication required'
636
+ }
637
+ });
638
+ }
639
+
606
640
  /**
607
641
  * Get transaction detail
608
642
  * Returns transaction details including all postings