(core) Update Plugin API documentation

Summary: Updates to Plugin API documentation.

Test Plan: Tested manually in grist-help.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3447
This commit is contained in:
George Gevoian
2022-05-24 13:22:41 -07:00
parent 3ad2d9212e
commit 3d3a5e334a
6 changed files with 100 additions and 30 deletions

View File

@@ -37,20 +37,22 @@ export interface TableOperations {
/**
* General options for table operations.
* By default, string field values will be parsed based on the column type.
* This can be disabled.
*/
export interface OpOptions {
parseStrings?: boolean; /** whether to parse strings based on the column type. */
/** Whether to parse strings based on the column type. Defaults to true. */
parseStrings?: boolean;
}
/**
* Extra options for upserts. By default, add and update are true,
* onMany is first, and allowEmptyRequire is false.
* Extra options for upserts.
*/
export interface UpsertOptions extends OpOptions {
add?: boolean; /** permit inserting a record */
update?: boolean; /** permit updating a record */
onMany?: 'none' | 'first' | 'all'; /** whether to update none, one, or all matching records */
allowEmptyRequire?: boolean; /** allow "wildcard" operation */
/** Permit inserting a record. Defaults to true. */
add?: boolean;
/** Permit updating a record. Defaults to true. */
update?: boolean;
/** Whether to update none, one, or all matching records. Defaults to "first". */
onMany?: 'none' | 'first' | 'all';
/** Allow "wildcard" operation. Defaults to false. */
allowEmptyRequire?: boolean;
}