/** * 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 Commits { 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 Commits { protected readonly _options: Commits.Options; constructor(_options?: Commits.Options); /** * Returns the details of a commit version * * @param {Flatfile.CommitId} commitId - ID of the commit version to return * @param {Commits.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.commits.get("us_vr_YOUR_ID") */ get(commitId: Flatfile.CommitId, requestOptions?: Commits.RequestOptions): core.HttpResponsePromise; private __get; /** * Completes a commit version. This marks the commit as complete and acknowledges that the changes have been applied to the sheet. * * @param {Flatfile.CommitId} commitId - ID of the commit version to complete * @param {Commits.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.commits.complete("commitId") */ complete(commitId: Flatfile.CommitId, requestOptions?: Commits.RequestOptions): core.HttpResponsePromise; private __complete; /** * Replays a commit:created event. * * @param {Flatfile.CommitId} commitId - ID of the commit version to re-emit a commit:created event for * @param {Commits.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.commits.replay("commitId") */ replay(commitId: Flatfile.CommitId, requestOptions?: Commits.RequestOptions): core.HttpResponsePromise; private __replay; protected _getAuthorizationHeader(): Promise; }