/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Flatfile from "../../../index"; export declare namespace Events { interface Options { environment?: core.Supplier; /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; token?: core.Supplier; /** Override the X-Disable-Hooks header */ xDisableHooks?: "true"; fetcher?: core.FetchFunction; } interface RequestOptions { /** The maximum time to wait for a response in seconds. */ timeoutInSeconds?: number; /** The number of times to retry the request. Defaults to 2. */ maxRetries?: number; /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the X-Disable-Hooks header */ xDisableHooks?: "true"; /** Additional headers to include in the request. */ headers?: Record; } } export declare class Events { protected readonly _options: Events.Options; constructor(_options?: Events.Options); /** * Event topics that the Flatfile Platform emits. * * @param {Flatfile.ListEventsRequest} request * @param {Events.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.events.list() */ list(request?: Flatfile.ListEventsRequest, requestOptions?: Events.RequestOptions): core.HttpResponsePromise; private __list; /** * @param {Flatfile.CreateEventConfig} request * @param {Events.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.events.create({ * topic: "workbook:updated", * payload: { * "recordsAdded": 100 * }, * domain: "workbook", * context: { * accountId: "us_acc_YOUR_ID", * actorId: "us_key_SOME_KEY", * environmentId: "us_env_YOUR_ID", * spaceId: "us_sp_YOUR_ID", * workbookId: "us_wb_YOUR_ID" * } * }) */ create(request: Flatfile.CreateEventConfig, requestOptions?: Events.RequestOptions): core.HttpResponsePromise; private __create; /** * @param {Flatfile.EventId} eventId - The event id * @param {Events.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.events.get("us_evt_YOUR_ID") */ get(eventId: Flatfile.EventId, requestOptions?: Events.RequestOptions): core.HttpResponsePromise; private __get; /** * @param {Flatfile.EventId} eventId - The event id * @param {Events.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.events.ack("eventId") */ ack(eventId: Flatfile.EventId, requestOptions?: Events.RequestOptions): core.HttpResponsePromise; private __ack; /** * Get a token which can be used to subscribe to events for this space * * @param {Flatfile.GetEventTokenRequest} request * @param {Events.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.events.getEventToken() */ getEventToken(request?: Flatfile.GetEventTokenRequest, requestOptions?: Events.RequestOptions): core.HttpResponsePromise; private __getEventToken; protected _getAuthorizationHeader(): Promise; }