import { Future, IExtendApiManifestWithConfiguration } from "@omnia/fx/models"; import { ControlledDocument } from "../../data"; import { DocumentLibraryViewType, ICommandButton } from "./DocumentLibraryCommandButtonApi"; export interface IContextMenuButton extends ICommandButton { onSelectionChanged?: (document: ControlledDocument) => Future; } export interface IContextMenuButtonComponent { button: T; } export interface IDocumentLibraryContextMenuButtonApi { addContextMenuButton: (viewType: DocumentLibraryViewType, items: IContextMenuButton) => void; getContextMenuButtonsByType: (viewType: DocumentLibraryViewType) => Future>; } declare module "../../../apis/index" { interface IMSApi { documentLibraryContextMenuButton: { registration: Promise; }; } interface IMSExtendApiManifest { documentLibraryContextMenuButton: { registration: IExtendApiManifestWithConfiguration; }; } }