Update datastore specs

This commit is contained in:
Joshua Sangmeister 2020-11-13 13:04:20 +01:00
parent 989a5789ef
commit c811926478
1 changed files with 16 additions and 2 deletions

View File

@ -84,14 +84,28 @@ Interface CreateEvent {
} }
} }
// Note: For deleting keys, they must be set to `None`. These keys // Note: For deleting keys, they must be set to `None`. These keys will be removed from
// will be removed from the model. // the model.
// list_fields can be used to partially update list fields: the values in `add` will be
// appended to the given field, the values in `remove` will be removed from the field.
// The case of double adding or removing something invalid will be silently ignored.
// All given list_fields must be flat arrays of strings or ints, else an error is
// thrown.
// Either fields or list_fields must be given or an error will be thrown.
Interface UpdateEvent { Interface UpdateEvent {
type: 'update'; type: 'update';
fqid: Fqid; fqid: Fqid;
fields: { fields: {
<field>: Value; <field>: Value;
} }
list_fields: {
add: {
<field>: Value[];
}
remove: {
<field>: Value[];
}
}
} }
Interface RestoreEvent { Interface RestoreEvent {