/** * This file was auto-generated by Fern from our API Definition. */ import * as environments from "../../../../environments"; import * as core from "../../../../core"; import * as Chariot from "../../../index"; export declare namespace EventSubscriptions { interface Options { environment?: core.Supplier; token?: core.Supplier; 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; } } export declare class EventSubscriptions { protected readonly _options: EventSubscriptions.Options; constructor(_options?: EventSubscriptions.Options); /** * List all event subscriptions corresponding to your Chariot account. * * @param {Chariot.EventSubscriptionsListRequest} request * @param {EventSubscriptions.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Chariot.BadRequestError} * @throws {@link Chariot.UnauthorizedError} * @throws {@link Chariot.ForbiddenError} * @throws {@link Chariot.InternalServerError} * * @example * await client.eventSubscriptions.list() */ list(request?: Chariot.EventSubscriptionsListRequest, requestOptions?: EventSubscriptions.RequestOptions): Promise>; /** * Create an event subscription corresponding to your Chariot account. * * @param {Chariot.EventSubscriptionsCreateRequest} request * @param {EventSubscriptions.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Chariot.BadRequestError} * @throws {@link Chariot.UnauthorizedError} * @throws {@link Chariot.ForbiddenError} * @throws {@link Chariot.NotFoundError} * @throws {@link Chariot.InternalServerError} * * @example * await client.eventSubscriptions.create({ * url: "https://example.com/webhook", * category: Chariot.EventCategory.GrantCreated * }) */ create(request: Chariot.EventSubscriptionsCreateRequest, requestOptions?: EventSubscriptions.RequestOptions): Promise; /** * Retrieve an event subscription with the given ID. * * @param {string} id - The unique identifier for the event subscription * @param {EventSubscriptions.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Chariot.BadRequestError} * @throws {@link Chariot.UnauthorizedError} * @throws {@link Chariot.ForbiddenError} * @throws {@link Chariot.NotFoundError} * @throws {@link Chariot.InternalServerError} * * @example * await client.eventSubscriptions.get("id") */ get(id: string, requestOptions?: EventSubscriptions.RequestOptions): Promise; /** * Update an event subscription with the given ID. * * @param {string} id - The unique identifier for the event subscription * @param {Chariot.EventSubscriptionsUpdateRequest} request * @param {EventSubscriptions.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Chariot.BadRequestError} * @throws {@link Chariot.UnauthorizedError} * @throws {@link Chariot.ForbiddenError} * @throws {@link Chariot.NotFoundError} * @throws {@link Chariot.InternalServerError} * * @example * await client.eventSubscriptions.update("id") */ update(id: string, request?: Chariot.EventSubscriptionsUpdateRequest, requestOptions?: EventSubscriptions.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }