Skip to main content

Class: EventsQueryService

Gala Launchpad SDK 9.0.0-rc.5


Gala Launchpad SDK 9.0.0-rc.5 / index / EventsQueryService

Class: EventsQueryService

Defined in: packages/launchpad-sdk/dist/services/EventsQueryService.d.ts:25

Reads stored events and their statistics (Admin API key or Overseer JWT).

Example​

const events = new EventsQueryService(httpClient, undefined, jwtAuth);
const stats = await events.getEventStats();
const page = await events.queryEvents({ eventTypes: ['token_buy'], page: 1, limit: 50 });

Extends​

  • StreamTokenServiceBase

Constructors​

Constructor​

new EventsQueryService(http, adminApiKey?, jwtAuth?, debugMode?, userApiKey?): EventsQueryService

Defined in: packages/launchpad-sdk/dist/services/EventsQueryService.d.ts:26

Parameters​

http​

HttpClient

adminApiKey?​

string

jwtAuth?​

JwtAuth

debugMode?​

boolean

userApiKey?​

string

Returns​

EventsQueryService

Overrides​

StreamTokenServiceBase.constructor

Methods​

getEventStats()​

getEventStats(): Promise<EventStats>

Defined in: packages/launchpad-sdk/dist/services/EventsQueryService.d.ts:34

Aggregate event statistics for the dashboard cards.

Returns​

Promise<EventStats>

Throws​

ConfigurationError when neither an admin API key nor a JWT is configured

Throws​

NetworkError when the request fails or the body is not the statistics shape

Since​

9.0.0


queryEvents()​

queryEvents(options?): Promise<QueryEventsResult>

Defined in: packages/launchpad-sdk/dist/services/EventsQueryService.d.ts:45

One page of stored events (offset paging: page, limit).

Only the filters given are sent. eventTypes / categories go as repeated array parameters.

Parameters​

options?​

QueryEventsOptions

Returns​

Promise<QueryEventsResult>

Throws​

ValidationError for a limit outside 1..100, a page below 1 or an unknown sort / preset / source

Throws​

ConfigurationError when neither an admin API key nor a JWT is configured

Throws​

NetworkError when the request fails or the body is not the events shape

Since​

9.0.0


setJwtAuth()​

setJwtAuth(jwtAuth): void

Defined in: packages/launchpad-sdk/dist/services/StreamTokenServiceBase.d.ts:83

Set the JWT authentication manager

This allows dynamic configuration of JWT auth after service creation.

Parameters​

jwtAuth​

JwtAuth

JWT auth manager instance

Returns​

void

Inherited from​

StreamTokenServiceBase.setJwtAuth