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.
This commit is contained in:
@@ -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?: {
|
||||
|
||||
Reference in New Issue
Block a user