(core) Small fixes in plugin API docs

Summary:
While adding `FetchSelectedOptions` in 4e67c679b2, I accidentally made `viewApi` become an undocumented variable, which is fixed here.

While I was at it, I also fixed other errors emitted by `./build-plugin-api.sh`.

Test Plan: Built changes in https://github.com/gristlabs/grist-help/pull/297

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D4155
This commit is contained in:
Alex Hall 2024-01-04 12:29:26 +02:00
parent 15a73fdaf0
commit eea9f47e50
3 changed files with 10 additions and 2 deletions

View File

@ -34,6 +34,10 @@ export interface ColumnToMap {
strictType?: boolean,
}
/**
* Tells Grist what columns a Custom Widget expects and allows users to map between existing column names
* and those requested by the Custom Widget.
*/
export type ColumnsToMap = (string|ColumnToMap)[];
/**
@ -78,6 +82,9 @@ export interface WidgetColumnMap {
[key: string]: string|string[]|null
}
/**
* Interface for the mapping of a custom widget.
*/
export interface CustomSectionAPI {
/**
* Initial request from a Custom Widget that wants to declare its requirements.

View File

@ -113,7 +113,7 @@ export interface GristDocAPI {
listTables(): Promise<string[]>;
/**
* Returns a complete table of data as [[RowRecords]], including the
* Returns a complete table of data as [[GristData.RowRecords]], including the
* 'id' column. Do not modify the returned arrays in-place, especially if used
* directly (not over RPC).
*/

View File

@ -52,10 +52,11 @@ export const rpc: Rpc = new Rpc({logger: createRpcLogger()});
export const api = rpc.getStub<GristAPI>(RPC_GRISTAPI_INTERFACE, checkers.GristAPI);
export const coreDocApi = rpc.getStub<GristDocAPI>('GristDocAPI@grist', checkers.GristDocAPI);
const viewApiStub = rpc.getStub<GristView>('GristView', checkers.GristView);
/**
* Interface for the records backing a custom widget.
*/
const viewApiStub = rpc.getStub<GristView>('GristView', checkers.GristView);
export const viewApi: GristView = {
...viewApiStub,
// Decoded objects aren't fully preserved over the RPC channel, so decoding has to happen on this side.