Events.ts overview
The WorkOS Events API: the same events as the webhooks, read in order, for an app that polls rather than receives (GET /events).
Since v0.1.0
Exports Grouped by Category
models
ListOptions (interface)
Options for list.
Signature
export interface ListOptions {
/** The event names to read (`["session.revoked", "user.deleted"]`). */
readonly events: ReadonlyArray<string>
/** The cursor the previous page answered, to read on from it. */
readonly after?: string
readonly organizationId?: string
readonly limit?: number
}
Since v0.1.0
reading
list
One page of events and the cursor to read the next from (None when there is none yet: poll again later with the same cursor).
Signature
declare const list: (
options: ListOptions
) => Effect.Effect<
{ readonly events: ReadonlyArray<WorkOSEvent>; readonly after: Option.Option<string> },
WorkOSError,
WorkOSClient
>
Since v0.1.0