/** * 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 Snapshots { 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 Snapshots { protected readonly _options: Snapshots.Options; constructor(_options?: Snapshots.Options); /** * Creates a snapshot of a sheet * * @param {Flatfile.CreateSnapshotRequest} request * @param {Snapshots.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.snapshots.createSnapshot({ * sheetId: "us_sh_YOUR_ID", * label: "My snapshot" * }) */ createSnapshot(request: Flatfile.CreateSnapshotRequest, requestOptions?: Snapshots.RequestOptions): core.HttpResponsePromise; private __createSnapshot; /** * List all snapshots of a sheet * * @param {Flatfile.ListSnapshotRequest} request * @param {Snapshots.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.snapshots.listSnapshots({ * sheetId: "us_sh_YOUR_ID" * }) */ listSnapshots(request: Flatfile.ListSnapshotRequest, requestOptions?: Snapshots.RequestOptions): core.HttpResponsePromise; private __listSnapshots; /** * Gets a snapshot of a sheet * * @param {Flatfile.SnapshotId} snapshotId - ID of snapshot * @param {Flatfile.GetSnapshotRequest} request * @param {Snapshots.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.snapshots.getSnapshot("us_ss_YOUR_ID", { * includeSummary: true * }) */ getSnapshot(snapshotId: Flatfile.SnapshotId, request: Flatfile.GetSnapshotRequest, requestOptions?: Snapshots.RequestOptions): core.HttpResponsePromise; private __getSnapshot; /** * Deletes a snapshot of a sheet * * @param {Flatfile.SnapshotId} snapshotId - ID of snapshot * @param {Snapshots.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.snapshots.deleteSnapshot("us_ss_YOUR_ID") */ deleteSnapshot(snapshotId: Flatfile.SnapshotId, requestOptions?: Snapshots.RequestOptions): core.HttpResponsePromise; private __deleteSnapshot; /** * Restores a snapshot of a sheet * * @param {Flatfile.SnapshotId} snapshotId - ID of snapshot * @param {Flatfile.RestoreOptions} request * @param {Snapshots.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.snapshots.restoreSnapshot("us_ss_YOUR_ID", { * created: true, * updated: true, * deleted: true * }) */ restoreSnapshot(snapshotId: Flatfile.SnapshotId, request?: Flatfile.RestoreOptions, requestOptions?: Snapshots.RequestOptions): core.HttpResponsePromise; private __restoreSnapshot; /** * Gets records from a snapshot of a sheet * * @param {Flatfile.SnapshotId} snapshotId - ID of snapshot * @param {Flatfile.GetSnapshotRecordsRequest} request * @param {Snapshots.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.snapshots.getSnapshotRecords("us_ss_YOUR_ID", { * pageSize: 10, * pageNumber: 1, * changeType: "createdSince" * }) */ getSnapshotRecords(snapshotId: Flatfile.SnapshotId, request?: Flatfile.GetSnapshotRecordsRequest, requestOptions?: Snapshots.RequestOptions): core.HttpResponsePromise; private __getSnapshotRecords; protected _getAuthorizationHeader(): Promise; }