/** * 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 Connects { 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 Connects { protected readonly _options: Connects.Options; constructor(_options?: Connects.Options); /** * Get an existing connect or create a new connect for an existing nonprofit organization. * * The returned Connect can be used to integrate the client-side Chariot Connect component using the `id` property (CID) and also query for data generated from the Chariot Connect instance from the Chariot API using the `x-chariot-api-key` header parameter. * * * Only one Connect object can be created per Nonprofit. * If one already exists, this will return a `200 OK` status with the existing object. * * * @param {Chariot.ConnectsCreateRequest} request * @param {Connects.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.connects.create({ * nonprofit: "6af3f58e-7a80-4997-8259-770c033d7d3a", * suborganization: "c00d1aa2-09ab-4e76-8461-7ac34578a70c" * }) */ create(request: Chariot.ConnectsCreateRequest, requestOptions?: Connects.RequestOptions): Promise; /** * Retrieve a connect with the given ID. * * @param {string} id - the unique id of the connect * @param {Connects.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.connects.get("live_xJd0lUrvpDkzeGBWZbuI2wbvEdM") */ get(id: string, requestOptions?: Connects.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }