/** * 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 Foreigndb { 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 Foreigndb { protected readonly _options: Foreigndb.Options; constructor(_options?: Foreigndb.Options); /** * Restore a database from a backup * * @param {string} workbookId - the workbook id * @param {Flatfile.RestoreDatabaseRequest} request * @param {Foreigndb.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.foreigndb.restore("workbookId", { * fileId: "fileId" * }) */ restore(workbookId: string, request: Flatfile.RestoreDatabaseRequest, requestOptions?: Foreigndb.RequestOptions): core.HttpResponsePromise; private __restore; /** * Configure the workbook * * @param {string} workbookId - the workbook id * @param {Foreigndb.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.foreigndb.configureWorkbook("workbookId") */ configureWorkbook(workbookId: string, requestOptions?: Foreigndb.RequestOptions): core.HttpResponsePromise; private __configureWorkbook; /** * Get the database information * * @param {string} workbookId - the workbook id * @param {Foreigndb.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.foreigndb.getDatabaseInfo("workbookId") */ getDatabaseInfo(workbookId: string, requestOptions?: Foreigndb.RequestOptions): core.HttpResponsePromise; private __getDatabaseInfo; /** * Delete the database * * @param {string} workbookId - the workbook id * @param {Foreigndb.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.foreigndb.deleteDatabase("workbookId") */ deleteDatabase(workbookId: string, requestOptions?: Foreigndb.RequestOptions): core.HttpResponsePromise; private __deleteDatabase; /** * Persist a file in s3 object storage * * @param {string} workbookId - the workbook id * @param {Flatfile.UploadToObjectStorageRequest} request * @param {Foreigndb.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.foreigndb.upload("workbookId", { * fileId: "fileId" * }) */ upload(workbookId: string, request: Flatfile.UploadToObjectStorageRequest, requestOptions?: Foreigndb.RequestOptions): core.HttpResponsePromise; private __upload; protected _getAuthorizationHeader(): Promise; }