/** * 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 Secrets { 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 Secrets { protected readonly _options: Secrets.Options; constructor(_options?: Secrets.Options); /** * Fetch all secrets for a given environmentId and optionally apply space overrides * * @param {Flatfile.ListSecrets} request * @param {Secrets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.secrets.list({ * environmentId: "us_env_YOUR_ID" * }) */ list(request?: Flatfile.ListSecrets, requestOptions?: Secrets.RequestOptions): core.HttpResponsePromise; private __list; /** * Insert or Update a Secret by name for environment or space * * @param {Flatfile.WriteSecret} request * @param {Secrets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.secrets.upsert({ * name: "My Secret", * value: "Sup3r$ecret\\/alue!", * environmentId: "us_env_YOUR_ID", * spaceId: "us_sp_YOUR_ID", * actorId: "us_usr_YOUR_ID" * }) */ upsert(request: Flatfile.WriteSecret, requestOptions?: Secrets.RequestOptions): core.HttpResponsePromise; private __upsert; /** * Deletes a specific Secret from the Environment or Space as is the case * * @param {Flatfile.SecretId} secretId - The ID of the secret. * @param {Secrets.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Flatfile.BadRequestError} * @throws {@link Flatfile.NotFoundError} * * @example * await client.secrets.delete("us_sec_YOUR_ID") */ delete(secretId: Flatfile.SecretId, requestOptions?: Secrets.RequestOptions): core.HttpResponsePromise; private __delete; protected _getAuthorizationHeader(): Promise; }