SDK Events

Use the following events to customise your application’s behaviour

enum Event {
  SessionStarted,
  SessionEnded,
  SessionAuthenticated,
  ViewMembershipInfo,
  PlaidEvent ,
  LinkedAccountCreated,
  UserGenerativeResults,
}

Base Event

interface BaseEvent {
  id: string
  version: string
  ended: boolean
  developerId: string
  lastEventName: string
  type: string
}

SessionStarted

interface SessionStartedEvent extends BaseEvent {
    ended: false
    type: "SessionStarted"
}

SessionEnded

interface SessionStartedEvent extends BaseEvent {
    ended: true
    type: "SessionEnded"
}

SessionAuthenticated

interface SessionAuthenticatedEvent extends BaseEvent {
    ended: false
    type: "SessionAuthenticated"
    userId: string
}

LinkedAccountCreated

interface LinkedAccountCreatedEvent extends BaseEvent {
    ended: false
    type: "LinkedAccountCreated"
    userId: string
}

ViewMembershipInfo

interface ViewMembershipInfoEvent extends BaseEvent {
    ended: false
    type: "ViewMembershipInfo"
    userId: string
}

PlaidEvent

interface PlaidEvent extends BaseEvent {
    ended: false
    type: "PlaidEvent"
    userId: string
    eventName: string
    metadata: any
}

UserGenerativeResults

interface UserGenerativeResults extends BaseEvent {
    ended: false
    type: "PlaidEvent"
    userId: string
    eventName: string
    categories: string[]
    context: string
}