import { FetchRepositoryBase } from "../../../shared/index.js"; import type { CreateNavigationMenuParams, NavigationMenu, SaveMenuTreeParams } from "./NavigationTypes.js"; /** * Repository for managing site navigation menus * * A menu is saved as a whole: `PUT /sites/{id}/menus/{id}` requires the full * item tree in `menus` (nested in `children`), and deletes the items that are * not sent. Every write here returns the menu as read afterwards. */ export declare class NavigationRepository extends FetchRepositoryBase { /** * Lists every menu of the site, archived included, across all pages. * Without `states[]` the platform returns all editable menus. */ listAllMenus(siteId: number, filters?: { query?: string | undefined; uuid?: string | undefined; }): Promise; /** * Finds a menu by UUID, archived included. */ findMenuByUuid(siteId: number, uuid: string): Promise; /** * Retrieves a specific navigation menu with its full item tree * (`menus`, children nested in `children`). */ getMenu(siteId: number, menuId: number): Promise; /** * Creates a menu and returns it as read afterwards. The platform adds a * first item that links to the site home page. */ createMenu(siteId: number, data: CreateNavigationMenuParams): Promise; /** * Saves the menu name and its full item tree, and returns the menu as read * afterwards. Items not present in `menus` are deleted by the platform. */ saveMenuTree(siteId: number, menuId: number, data: SaveMenuTreeParams): Promise; /** * Unpublishes a menu (`POST /sites/{id}/menus/{id}/unpublish`, which * requires a `menu` object) and returns it as read afterwards. */ unpublishMenu(siteId: number, menuId: number): Promise; /** * Permanently deletes a navigation menu and all its items. The platform * only deletes an archived menu that was never published or is no longer * published (`menu.rb#can_delete?`). */ deleteMenu(siteId: number, menuId: number): Promise; } //# sourceMappingURL=NavigationRepository.d.ts.map