/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { eventsGet } from "../funcs/eventsGet.js"; import { eventsList } from "../funcs/eventsList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; export class Events extends ClientSDK { /** * List Events * * @remarks * Retrieves a list of events. * * When authenticated with a Tenant JWT, returns only events belonging to that tenant. * When authenticated with Admin API Key, returns events across all tenants. Use `tenant_id` query parameter to filter by tenant. */ async list( request: operations.ListEventsRequest, options?: RequestOptions, ): Promise> { return unwrapResultIterator(eventsList( this, request, options, )); } /** * Get Event * * @remarks * Retrieves details for a specific event. * * When authenticated with a Tenant JWT, only events belonging to that tenant can be accessed. * When authenticated with Admin API Key, events from any tenant can be accessed. */ async get( eventId: string, options?: RequestOptions, ): Promise { return unwrapAsync(eventsGet( this, eventId, options, )); } }