mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
3d3a5e334a
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
36 lines
724 B
TypeScript
36 lines
724 B
TypeScript
/**
|
|
* Common definitions for Grist plugin APIs.
|
|
*/
|
|
|
|
/**
|
|
* Metadata and data for a table.
|
|
*/
|
|
export interface GristTable {
|
|
// This is documenting what is currently returned by the core plugins. Capitalization
|
|
// is python-style.
|
|
//
|
|
// TODO: could be worth reconciling with: https://phab.getgrist.com/w/grist_data_format/.
|
|
table_name: string | null; // currently allow names to be null
|
|
column_metadata: GristColumn[];
|
|
table_data: any[][];
|
|
}
|
|
|
|
export interface GristTables {
|
|
tables: GristTable[];
|
|
}
|
|
|
|
/**
|
|
* Metadata about a single column.
|
|
*/
|
|
export interface GristColumn {
|
|
id: string;
|
|
type: string;
|
|
}
|
|
|
|
export enum APIType {
|
|
ImportSourceAPI,
|
|
ImportProcessorAPI,
|
|
ParseOptionsAPI,
|
|
ParseFileAPI,
|
|
}
|