From d7c9412d152ba7eee58470ad5a0bb5e6c7a6522d Mon Sep 17 00:00:00 2001 From: Kathleen DeRusso Date: Tue, 19 Nov 2024 09:44:07 -0500 Subject: [PATCH] Add rule_type_counts to QueryRulesetListResponse spec (#3150) * Add rule_type_counts to QueryRulesetListResponse spec * Generate schema (cherry picked from commit b74dd77e2c80826615f97878284b8e29aab2c27e) --- output/schema/schema.json | 27 +++++++++++++++++-- output/typescript/types.ts | 1 + .../query_rules/list_rulesets/types.ts | 7 ++++- 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 9961b5f933..c7bf91a7e5 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -183132,7 +183132,7 @@ } }, { - "description": "A map of criteria type to the number of rules of that type", + "description": "A map of criteria type (e.g. exact) to the number of rules of that type", "name": "rule_criteria_types_counts", "required": true, "type": { @@ -183153,9 +183153,32 @@ } } } + }, + { + "description": "A map of rule type (e.g. pinned) to the number of rules of that type", + "name": "rule_type_counts", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } } ], - "specLocation": "query_rules/list_rulesets/types.ts#L23-L37" + "specLocation": "query_rules/list_rulesets/types.ts#L23-L42" }, { "kind": "request", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 2c1abf3356..5d6480562a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17186,6 +17186,7 @@ export interface QueryRulesListRulesetsQueryRulesetListItem { ruleset_id: Id rule_total_count: integer rule_criteria_types_counts: Record + rule_type_counts: Record } export interface QueryRulesListRulesetsRequest extends RequestBase { diff --git a/specification/query_rules/list_rulesets/types.ts b/specification/query_rules/list_rulesets/types.ts index fd50af5c33..1441eb6af6 100644 --- a/specification/query_rules/list_rulesets/types.ts +++ b/specification/query_rules/list_rulesets/types.ts @@ -31,7 +31,12 @@ export class QueryRulesetListItem { rule_total_count: integer /** - * A map of criteria type to the number of rules of that type + * A map of criteria type (e.g. exact) to the number of rules of that type */ rule_criteria_types_counts: Dictionary + + /** + * A map of rule type (e.g. pinned) to the number of rules of that type + */ + rule_type_counts: Dictionary }