From b8dbf152542861bb24ce8c127d63fe53045a2e2e Mon Sep 17 00:00:00 2001 From: Denozordec Date: Fri, 31 Jul 2026 13:24:52 +0700 Subject: [PATCH] feat(api): update types to support CIDR in lookup queries Enhanced the API type definitions to include CIDR support alongside IP and domain in the lookup functionality. Updated relevant comments and descriptions to reflect the new capabilities, ensuring clarity in the API documentation. --- apps/web/src/types/api.gen.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/web/src/types/api.gen.ts b/apps/web/src/types/api.gen.ts index 7f672fb..cebb205 100644 --- a/apps/web/src/types/api.gen.ts +++ b/apps/web/src/types/api.gen.ts @@ -114,11 +114,13 @@ export interface paths { cookie?: never; }; /** - * Проверка IP или домена в списках + * Проверка IP, CIDR или домена в списках * @description Быстрая membership-проверка по tenant: * * - **IP** — слой `entry` (`IP_RANGES`, `CIDR.Contains`) и слой `snapshot` * (все module prefix snapshots, `Prefix.Contains`); + * - **CIDR** — слой `entry` (`IP_RANGES`, равенство masked-префикса или покрытие + * запрошенной сети) и слой `snapshot` (то же правило); * - **Domain** — слой `entry` (нормализованный FQDN в `DOMAINS`) и слой `snapshot` * (префиксы `source=domain` у matched DOMAINS-модулей, если snapshot есть); * затем **live DNS resolve** (A/AAAA через системный резолвер) и проверка @@ -2167,7 +2169,7 @@ export interface components { * @description Определённый тип запроса после нормализации. * @enum {string} */ - LookupQueryKind: "ip" | "domain"; + LookupQueryKind: "ip" | "domain" | "cidr"; /** * @description `entry` — сырые IP_RANGES / DOMAINS entries; * `snapshot` — материализованные префиксы `module_prefix_snapshot`. @@ -2206,7 +2208,7 @@ export interface components { /** @description Исходная строка запроса. */ query: string; query_kind: components["schemas"]["LookupQueryKind"]; - /** @description Нормализованный IP или FQDN. */ + /** @description Нормализованный IP, masked CIDR или FQDN. */ normalized: string; /** @description true, если есть хотя бы одно совпадение. */ matched: boolean; @@ -3033,7 +3035,7 @@ export interface operations { lookupMembership: { parameters: { query: { - /** @description IP-адрес или FQDN для проверки. */ + /** @description IP-адрес, CIDR или FQDN для проверки. */ q: string; }; header?: {