import {BasketClientAPI} from 'app/common/BasketClientAPI'; import {DocListAPI} from 'app/common/DocListAPI'; import {LoginSessionAPI} from 'app/common/LoginSessionAPI'; import {EmailResult, Invite} from 'app/common/sharing'; import {UserConfig} from 'app/common/UserConfig'; export interface GristServerAPI extends DocListAPI, LoginSessionAPI, BasketClientAPI, UserAPI, SharingAPI, MiscAPI {} interface UserAPI { /** * Gets the Grist configuration from the server. */ getConfig(): Promise; /** * Updates the user configuration and saves it to the server. * @param {Object} config - Configuration object to save. * @returns {Promise:Object} Configuration object as persisted by the server. You can use it to * validate the configuration. */ updateConfig(config: UserConfig): Promise; /** * Re-load plugins. */ reloadPlugins(): Promise; } interface SharingAPI { /** * Looks up a user account by email, return an object with basic user profile information. */ lookupEmail(email: string): Promise; /** * Fetches and saves invites from the hub which are not already present locally. * Returns the new invites from the hub only. */ getNewInvites(): Promise; /** * Fetches local invites and marks them all as read. */ getLocalInvites(): Promise; /** * Marks the stored local invite belonging to the calling instance as ignored. * Called when the user declines an invite. */ ignoreLocalInvite(docId: string): Promise; } interface MiscAPI { showItemInFolder(docName: string): Promise; }