/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { statsEventsGet } from "../funcs/statsEventsGet.js"; import { statsEventsList } from "../funcs/statsEventsList.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class StatsEvents extends ClientSDK { /** * List Events * * @remarks * Retrieve a list of events. Please note that due to our data retention policy, * only events from the last 2 years are available. * * * ## Requires api token with one of the following permissions * ``` * Read detailed stats * ``` * */ async list( request?: operations.GetStatsEventsRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapAsync(statsEventsList( this, request, options, )); } /** * Show Event * * @remarks * Retrieve information for a single event. Please note that due to our data retention policy, * only events from the last 2 years are available. * * * ## Requires api token with one of the following permissions * ``` * Read detailed stats * ``` * */ async get( request: operations.GetStatsEventsEventKeyRequest, options?: RequestOptions, ): Promise { return unwrapAsync(statsEventsGet( this, request, options, )); } }