@firela/api-types 0.0.0-canary.d484b9ac → 0.0.0-canary.d7b4245a

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
@@ -3157,6 +3157,10 @@ type CategoryCatalogEntryDto = {
3157
3157
  * Applicable regions ('*' = all, 'cn' = CN-only)
3158
3158
  */
3159
3159
  regions: Array<string>;
3160
+ /**
3161
+ * Beancount account paths (categoryAccount) of the region-enabled system rules whose categoryKeywords include this slug (#816). System rules only (public endpoint — user rules excluded); one-to-many by design (e.g. 'utilities' → Electricity/Water/Internet/Gas), sorted, [] when no rule maps the slug.
3162
+ */
3163
+ categoryAccounts: Array<string>;
3160
3164
  };
3161
3165
  /**
3162
3166
  * Display scenario group (maps to frontend picker _scenario)
@@ -3789,7 +3793,7 @@ type ClientParsedDataDto = {
3789
3793
  */
3790
3794
  narration?: string;
3791
3795
  /**
3792
- * Category slug
3796
+ * Category in canonical form (catalog slug or Stage-2 rule keyword token, ADR-0116) — echo back verbatim from parsedData.category. Foreign forms (locale display names, account paths) are rejected with nlp.category.invalid.
3793
3797
  */
3794
3798
  category?: string;
3795
3799
  /**
@@ -3931,7 +3935,7 @@ type NlpParsedDataDto = {
3931
3935
  */
3932
3936
  narration?: string;
3933
3937
  /**
3934
- * Category
3938
+ * Category in canonical form: a CATEGORY_CATALOG slug (GET /{region}/bean/categories) or a Stage-2 rule categoryKeywords token (ADR-0116 D2). Never a locale display name or a beancount account path. Echo back verbatim on confirm.
3935
3939
  */
3936
3940
  category?: string;
3937
3941
  /**
package/dist/index.d.ts CHANGED
@@ -3157,6 +3157,10 @@ type CategoryCatalogEntryDto = {
3157
3157
  * Applicable regions ('*' = all, 'cn' = CN-only)
3158
3158
  */
3159
3159
  regions: Array<string>;
3160
+ /**
3161
+ * Beancount account paths (categoryAccount) of the region-enabled system rules whose categoryKeywords include this slug (#816). System rules only (public endpoint — user rules excluded); one-to-many by design (e.g. 'utilities' → Electricity/Water/Internet/Gas), sorted, [] when no rule maps the slug.
3162
+ */
3163
+ categoryAccounts: Array<string>;
3160
3164
  };
3161
3165
  /**
3162
3166
  * Display scenario group (maps to frontend picker _scenario)
@@ -3789,7 +3793,7 @@ type ClientParsedDataDto = {
3789
3793
  */
3790
3794
  narration?: string;
3791
3795
  /**
3792
- * Category slug
3796
+ * Category in canonical form (catalog slug or Stage-2 rule keyword token, ADR-0116) — echo back verbatim from parsedData.category. Foreign forms (locale display names, account paths) are rejected with nlp.category.invalid.
3793
3797
  */
3794
3798
  category?: string;
3795
3799
  /**
@@ -3931,7 +3935,7 @@ type NlpParsedDataDto = {
3931
3935
  */
3932
3936
  narration?: string;
3933
3937
  /**
3934
- * Category
3938
+ * Category in canonical form: a CATEGORY_CATALOG slug (GET /{region}/bean/categories) or a Stage-2 rule categoryKeywords token (ADR-0116 D2). Never a locale display name or a beancount account path. Echo back verbatim on confirm.
3935
3939
  */
3936
3940
  category?: string;
3937
3941
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firela/api-types",
3
- "version": "0.0.0-canary.d484b9ac",
3
+ "version": "0.0.0-canary.d7b4245a",
4
4
  "description": "TypeScript types generated from IGN OpenAPI specification",
5
5
  "license": "MIT",
6
6
  "author": "FireLa Team",
@@ -5230,9 +5230,23 @@ export const $CategoryCatalogEntryDto = {
5230
5230
  items: {
5231
5231
  type: 'string'
5232
5232
  }
5233
+ },
5234
+ categoryAccounts: {
5235
+ description:
5236
+ "Beancount account paths (categoryAccount) of the region-enabled system rules whose categoryKeywords include this slug (#816). System rules only (public endpoint — user rules excluded); one-to-many by design (e.g. 'utilities' → Electricity/Water/Internet/Gas), sorted, [] when no rule maps the slug.",
5237
+ example: [
5238
+ 'Expenses:Utilities:Electricity',
5239
+ 'Expenses:Utilities:Gas',
5240
+ 'Expenses:Utilities:Internet',
5241
+ 'Expenses:Utilities:Water'
5242
+ ],
5243
+ type: 'array',
5244
+ items: {
5245
+ type: 'string'
5246
+ }
5233
5247
  }
5234
5248
  },
5235
- required: ['slug', 'scenario', 'icon', 'regions']
5249
+ required: ['slug', 'scenario', 'icon', 'regions', 'categoryAccounts']
5236
5250
  } as const;
5237
5251
 
5238
5252
  export const $CategoryCatalogListResponseDto = {
@@ -6351,8 +6365,9 @@ export const $ClientParsedDataDto = {
6351
6365
  },
6352
6366
  category: {
6353
6367
  type: 'string',
6354
- description: 'Category slug',
6355
- example: 'food_restaurant'
6368
+ description:
6369
+ 'Category in canonical form (catalog slug or Stage-2 rule keyword token, ADR-0116) — echo back verbatim from parsedData.category. Foreign forms (locale display names, account paths) are rejected with nlp.category.invalid.',
6370
+ example: 'food'
6356
6371
  },
6357
6372
  incomeType: {
6358
6373
  type: 'string',
@@ -6538,7 +6553,9 @@ export const $NlpParsedDataDto = {
6538
6553
  },
6539
6554
  category: {
6540
6555
  type: 'string',
6541
- description: 'Category'
6556
+ description:
6557
+ 'Category in canonical form: a CATEGORY_CATALOG slug (GET /{region}/bean/categories) or a Stage-2 rule categoryKeywords token (ADR-0116 D2). Never a locale display name or a beancount account path. Echo back verbatim on confirm.',
6558
+ example: 'food'
6542
6559
  },
6543
6560
  incomeType: {
6544
6561
  type: 'string',
@@ -2867,7 +2867,7 @@ export class BeanTransactionRulesService {
2867
2867
  export class BeanCategoryCatalogService {
2868
2868
  /**
2869
2869
  * List category catalog for a region
2870
- * Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker. CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2870
+ * Returns the region-scoped category slugs (expense/income/investment/banking/transfer/payment) for the NLP result picker, each with the categoryAccount paths the region-enabled system rules map it to (#816). CN-exclusive payment instruments (huabei/baitiao) appear only under /cn.
2871
2871
  * @param data The data for the request.
2872
2872
  * @param data.region Region code for tenant context
2873
2873
  * @param data.scenario Filter by scenario
@@ -3644,6 +3644,10 @@ export type CategoryCatalogEntryDto = {
3644
3644
  * Applicable regions ('*' = all, 'cn' = CN-only)
3645
3645
  */
3646
3646
  regions: Array<string>;
3647
+ /**
3648
+ * Beancount account paths (categoryAccount) of the region-enabled system rules whose categoryKeywords include this slug (#816). System rules only (public endpoint — user rules excluded); one-to-many by design (e.g. 'utilities' → Electricity/Water/Internet/Gas), sorted, [] when no rule maps the slug.
3649
+ */
3650
+ categoryAccounts: Array<string>;
3647
3651
  };
3648
3652
 
3649
3653
  /**
@@ -4379,7 +4383,7 @@ export type ClientParsedDataDto = {
4379
4383
  */
4380
4384
  narration?: string;
4381
4385
  /**
4382
- * Category slug
4386
+ * Category in canonical form (catalog slug or Stage-2 rule keyword token, ADR-0116) — echo back verbatim from parsedData.category. Foreign forms (locale display names, account paths) are rejected with nlp.category.invalid.
4383
4387
  */
4384
4388
  category?: string;
4385
4389
  /**
@@ -4527,7 +4531,7 @@ export type NlpParsedDataDto = {
4527
4531
  */
4528
4532
  narration?: string;
4529
4533
  /**
4530
- * Category
4534
+ * Category in canonical form: a CATEGORY_CATALOG slug (GET /{region}/bean/categories) or a Stage-2 rule categoryKeywords token (ADR-0116 D2). Never a locale display name or a beancount account path. Echo back verbatim on confirm.
4531
4535
  */
4532
4536
  category?: string;
4533
4537
  /**