@redocly/graphql-docs
Version:
Redocly GraphQL docs
33 lines (32 loc) • 890 B
TypeScript
import type { TypeGroup } from '../../schema';
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';
label: string;
slug: string;
routeSlug?: string;
link?: string;
items: SidebarItem[];
labelTranslationKey?: TranslationKey;
};
export type SidebarItemWithState = Omit<SidebarItem, 'items'> & {
active: boolean;
hasActiveSubItem: boolean;
items: SidebarItemWithState[];
};