2020-07-21 13:20:51 +00:00
|
|
|
/**
|
|
|
|
* API definitions for CustomSection plugins.
|
|
|
|
*/
|
|
|
|
|
2022-01-12 13:30:51 +00:00
|
|
|
/**
|
|
|
|
* Initial message sent by the CustomWidget with initial requirements.
|
|
|
|
*/
|
|
|
|
export interface InteractionOptionsRequest {
|
|
|
|
/**
|
|
|
|
* Required access level. If it wasn't granted already, Grist will prompt user to change the current access
|
|
|
|
* level.
|
|
|
|
*/
|
|
|
|
requiredAccess?: string,
|
|
|
|
/**
|
|
|
|
* Instructs Grist to show additional menu options that will trigger onEditOptions callback, that Widget
|
|
|
|
* can use to show custom options screen.
|
|
|
|
*/
|
|
|
|
hasCustomOptions?: boolean,
|
|
|
|
}
|
2020-07-21 13:20:51 +00:00
|
|
|
|
2022-01-12 13:30:51 +00:00
|
|
|
/**
|
|
|
|
* Widget configuration set and approved by Grist, sent as part of ready message.
|
|
|
|
*/
|
|
|
|
export interface InteractionOptions {
|
|
|
|
/**
|
|
|
|
* Granted access level.
|
|
|
|
*/
|
|
|
|
accessLevel: string
|
|
|
|
}
|
2020-07-21 13:20:51 +00:00
|
|
|
|
|
|
|
export interface CustomSectionAPI {
|
2022-01-12 13:30:51 +00:00
|
|
|
configure(customOptions: InteractionOptionsRequest): Promise<void>;
|
2020-07-21 13:20:51 +00:00
|
|
|
}
|