/** * 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 RecurringGrants { 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 RecurringGrants { protected readonly _options: RecurringGrants.Options; constructor(_options?: RecurringGrants.Options); /** * Returns a list of all recurring grants for a given Connect. This API allows for paginating over many results. * * @param {Chariot.RecurringGrantsListRequest} request * @param {RecurringGrants.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Chariot.BadRequestError} * @throws {@link Chariot.UnauthorizedError} * @throws {@link Chariot.ForbiddenError} * @throws {@link Chariot.InternalServerError} * * @example * await client.recurringGrants.list({ * chariotApiKey: "live_xJd0lUrvpDkzeGBWZbuI2wbvEdM" * }) */ list(request: Chariot.RecurringGrantsListRequest, requestOptions?: RecurringGrants.RequestOptions): Promise>; /** * Create and submit a new recurring grant. This should be used to capture a recurring grant intent from an authorized DAFpay workflow session and submit the recurring grant request to the DAF sponsor. * * * Error handling: * - The recurring grant must be captured within 15 minutes of authorization otherwise the request will return status `410 Gone`. * - A recurring grant can only be captured once from any given workflow session so any duplicate requests will return status `409 Conflict`. * - The amount must be in whole dollar increments (rounded to the nearest hundred) as currently DAFs only accept whole dollar grants otherwise the request will return status `400 Bad Request`. * - The amount must be greater than or equal to the minimum grant amount for the DAF otherwise the request will return status `400 Bad Request`. * - The amount must be less than or equal to the user's DAF account balance otherwise the request will return status `400 Bad Request`. * - Any inputs exceeding the maximum allowed length will be automatically truncated unless otherwise stated. * * * @param {Chariot.RecurringGrantsCreateRequest} request * @param {RecurringGrants.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Chariot.BadRequestError} * @throws {@link Chariot.UnauthorizedError} * @throws {@link Chariot.ForbiddenError} * @throws {@link Chariot.NotFoundError} * @throws {@link Chariot.ConflictError} * @throws {@link Chariot.GoneError} * @throws {@link Chariot.InternalServerError} * * @example * await client.recurringGrants.create({ * workflowSessionId: "workflowSessionId", * amount: 1.1 * }) */ create(request: Chariot.RecurringGrantsCreateRequest, requestOptions?: RecurringGrants.RequestOptions): Promise; /** * Retrieve a recurring grant with a given ID. * * @param {string} id - The unique id of the recurring grant. * The format should be a v4 UUID according to RFC 4122. * @param {RecurringGrants.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.recurringGrants.get("10229488-08d2-4629-b70c-a2f4f4d25344") */ get(id: string, requestOptions?: RecurringGrants.RequestOptions): Promise; protected _getAuthorizationHeader(): Promise; }