From f67ddf50b4e32a0728c25e04841b6d0e7077df31 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 6efdc79b27..fbce0ea9d1 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -183032,7 +183032,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": { @@ -183053,9 +183053,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 380d4f34f1..3cbd479c40 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -17177,6 +17177,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 }