import { IEnhancementConfig, IEnhancementHostConfig } from '../enhancements'; import { IRequestMetadata, ISerializedRequest, ISerializedResponse } from '../request'; /** * RPC Methods that can be called from the main StaffBar application to the * injected script. * * A few rules about RPC methods: * 1. All methods must return promises! * 2. All methods must accept one argument which is * 3. Never remove or rename parameters, only add optionals * * */ export interface IRPCMethods { /** * Sets the height of the iframe * */ setFrameHeight({ height, lockScroll }: { height: string; lockScroll?: boolean; }): Promise; /** * Sets the focus back to the document so you can continue where you left off */ setFocusToDocument({}: {}): Promise; /** * Tells the client in the origin of the target app, to set a global key binding * for activating the staffbar */ setGlobalKeyBinding({ hotKey }: { hotKey: string; }): Promise; getRequests({}: {}): Promise; makeRequest({ request, useRawFetch, requestId, enhancementHostConfig, }: { request: ISerializedRequest; useRawFetch?: boolean; requestId?: string; enhancementHostConfig?: IEnhancementHostConfig; }): Promise; /** * Sets the configuration that tells the inject which requests we're going to ping with * which enchancements and provides a token to use. * * For example, if we wanted to collect `console.log` statements, we would set the `console` enhancement. * */ setEnhancementConfig({ enchancementConfig }: { enchancementConfig: IEnhancementConfig; }): Promise; } //# sourceMappingURL=methods.d.ts.map