firebase-admin.eventarc package

Firebase Eventarc.

Functions

Function Description
getEventarc(app) Gets the Eventarc service for the default app or a given app.getEventarc() can be called with no arguments to access the default app's Eventarc service or as getEventarc(app) to access the Eventarc service associated with specific app.

Classes

Class Description
Channel Eventarc Channel.
Eventarc Eventarc service bound to the provided app.
FirebaseEventarcError Firebase Eventarc error code structure. This extends FirebaseError.

Interfaces

Interface Description
ChannelOptions Channel options interface.
CloudEvent A CloudEvent describes event data.

Variables

Variable Description
EventarcErrorCode The constant mapping for valid Eventarc client error codes.

Type Aliases

Type Alias Description
CloudEventVersion A CloudEvent version.
EventarcErrorCode The type definition for valid Eventarc client error codes.

getEventarc(app)

Gets the Eventarc service for the default app or a given app.

getEventarc() can be called with no arguments to access the default app's Eventarc service or as getEventarc(app) to access the Eventarc service associated with specific app.

Signature:

export declare function getEventarc(app?: App): Eventarc;

Parameters

Parameter Type Description
app App Optional app whose Eventarc service will be returned. If not provided, the default Eventarc service will be returned.

Returns:

Eventarc

The default Eventarc service if no app is provided or the Eventarc service associated with the provided app.

Example 1

// Get the Eventarc service for the default app
const defaultEventarc = getEventarc();

Example 2

// Get the Eventarc service for a given app
const otherEventarc = getEventarc(otherApp);

EventarcErrorCode

The constant mapping for valid Eventarc client error codes.

Signature:

EventarcErrorCode: {
    readonly UNKNOWN_ERROR: "unknown-error";
    readonly INVALID_ARGUMENT: "invalid-argument";
}

CloudEventVersion

A CloudEvent version.

Signature:

export type CloudEventVersion = '1.0';

EventarcErrorCode

The type definition for valid Eventarc client error codes.

Signature:

export type EventarcErrorCode = typeof EventarcErrorCode[keyof typeof EventarcErrorCode];