mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add /records endpoint to DocApi with GET, POST, and PATCH
Summary: Applies simple data transformations to the existing /data API. Mimics the Airtable API. Designed in https://grist.quip.com/RZh9AEbPaj8x/Doc-API#FZfACAAZ9a0 Haven't done deletion because it seems like less of a priority and also not fully designed. Test Plan: Added basic server tests similar to the /data tests. Haven't tested edge cases like bad input. Reviewers: paulfitz Reviewed By: paulfitz Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D2974
This commit is contained in:
@@ -117,6 +117,18 @@ export interface TableColValues {
|
||||
[colId: string]: CellValue[];
|
||||
}
|
||||
|
||||
// Multiple records in record-oriented format
|
||||
export interface TableRecordValues {
|
||||
records: TableRecordValue[];
|
||||
}
|
||||
|
||||
export interface TableRecordValue {
|
||||
id: number;
|
||||
fields: {
|
||||
[colId: string]: CellValue
|
||||
};
|
||||
}
|
||||
|
||||
// Both UserActions and DocActions are represented as [ActionName, ...actionArgs].
|
||||
// TODO I think it's better to represent DocAction as a Buffer containing the marshalled action.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user