refactor: update AS entry handling in API and database to support ASN-only entries. Remove prefix field from AS entry structure and adjust related functions and tests. Enhance OpenAPI specifications and documentation to reflect changes in AS entry representation.
This commit is contained in:
@@ -36,13 +36,15 @@ export type ModulePatch = Partial<Omit<ModuleCreate, 'type'>>;
|
||||
// ---- AS Entries ----
|
||||
export type AsEntry = {
|
||||
id: string;
|
||||
asn: number | null;
|
||||
prefix: string | null;
|
||||
asn: number;
|
||||
community_id: string | null;
|
||||
};
|
||||
export type AsEntryCreate = {
|
||||
asn: number;
|
||||
community_id?: string | null;
|
||||
};
|
||||
export type AsEntryPatch = {
|
||||
asn?: number;
|
||||
prefix?: string;
|
||||
community_id?: string | null;
|
||||
};
|
||||
export type AsEntriesResponse = Page<AsEntry>;
|
||||
@@ -158,6 +160,7 @@ export type RevisionRow = {
|
||||
export type RevisionsResponse = Page<RevisionRow>;
|
||||
|
||||
export type RevisionPrefix = {
|
||||
/** Обычно CIDR; для AS-модуля в снимке ревизии — строка вида `as:<номер_asn>`. */
|
||||
prefix: string;
|
||||
community_id?: string | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user