Index

Properties

Private options

Private triggerResource

triggerResource: function

Type declaration

    • (): string
    • Returns string

Methods

onCreate

  • Respond only to document creations.

    Parameters

    • handler: function
        • (snapshot: DocumentSnapshot, context: EventContext): PromiseLike<any> | any
        • Parameters

          Returns PromiseLike<any> | any

    Returns CloudFunction<DocumentSnapshot>

onDelete

  • Respond only to document deletions.

    Parameters

    • handler: function
        • (snapshot: DocumentSnapshot, context: EventContext): PromiseLike<any> | any
        • Parameters

          Returns PromiseLike<any> | any

    Returns CloudFunction<DocumentSnapshot>

Private onOperation

  • onOperation<T>(handler: function, eventType: string, dataConstructor: function): CloudFunction<T>
  • Type parameters

    • T

    Parameters

    • handler: function
        • Parameters

          Returns PromiseLike<any> | any

    • eventType: string
    • dataConstructor: function
        • (raw: Event): any
        • Parameters

          • raw: Event

          Returns any

    Returns CloudFunction<T>

onUpdate

  • Respond only to document updates.

    Parameters

    • handler: function
        • Parameters

          Returns PromiseLike<any> | any

    Returns CloudFunction<Change<DocumentSnapshot>>

onWrite

  • Respond to all document writes (creates, updates, or deletes).

    Parameters

    • handler: function
        • Parameters

          Returns PromiseLike<any> | any

    Returns CloudFunction<Change<DocumentSnapshot>>