@redocly/graphql-docs
Version:
Redocly GraphQL docs
34 lines (33 loc) • 940 B
TypeScript
import type { TypeGroup } from '../../schema/index.js';
import type { TranslationKey } from '@redocly/theme';
export declare const DEFAULT_MENU_GROUP_ID = "other";
export interface MenuGroup {
id: string;
name: string;
typeGroups: MenuTypeGroup[];
}
export type IndexedMenuGroup = Omit<MenuGroup, 'typeGroups'> & {
typeGroups: Map<TypeGroup, MenuTypeGroup>;
};
export interface MenuTypeGroup {
id: string;
name: string;
items: string[];
typeGroupId: TypeGroup;
labelTranslationKey: TranslationKey;
}
export type SidebarItem = {
type: 'link' | 'group' | 'separator';
label: string;
slug: string;
routeSlug?: string;
link?: string;
items?: SidebarItem[];
labelTranslationKey?: TranslationKey;
deprecated?: boolean;
};
export type SidebarItemWithState = Omit<SidebarItem, 'items'> & {
active: boolean;
hasActiveSubItem: boolean;
items: SidebarItemWithState[];
};