Код: Выделить всё
{
foo?: {
bar?: string;
}
}
{
document: 'users/{uid}',
eventFilters: {
'oldValue.fields.foo.bar': 'null',
'value.fields.foo.bar.stringValue': '*'
},
< /code>
export const onBarAdded = onDocumentUpdated(
{
document: "users/{uid}",
eventFilters: {
"data.before.foo.bar": "== null",
"data.after.foo.bar": "!= null",
},
},
< /code>
I can't find good documentation either. I find the online documentation sparse and the documentation in the code is a TODO:
// firebase-functions/lib/v2/options.d.ts
// ...
/**
* Additional fields that can be set on any event-handling function.
*/
export interface EventHandlerOptions extends Omit {
/** Type of the event. Valid values are TODO */
eventType?: string;
/** TODO */
eventFilters?: Record;
// ...
< /code>
Feel free to tell me it's not possible or, maybe, what industry standard is.
Подробнее здесь: https://stackoverflow.com/questions/796 ... -functions