/** * 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 Flags { 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 Flags { protected readonly _options: Flags.Options; constructor(_options?: Flags.Options); /** * Creates a new flag for the workbook * * @param {Flatfile.WorkbookId} workbookId - The workbook ID to manage flags for * @param {Flatfile.CreateFlagRequest} request * @param {Flags.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.flags.create("us_wb_YOUR_ID", { * slug: "important", * label: "Important", * colorHex: "#0090FF" * }) */ create(workbookId: Flatfile.WorkbookId, request: Flatfile.CreateFlagRequest, requestOptions?: Flags.RequestOptions): core.HttpResponsePromise; private __create; /** * Gets all flags for the workbook * * @param {Flatfile.WorkbookId} workbookId - The workbook ID to manage flags for * @param {Flags.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.flags.list("us_wb_YOUR_ID") */ list(workbookId: Flatfile.WorkbookId, requestOptions?: Flags.RequestOptions): core.HttpResponsePromise; private __list; /** * Gets a specific flag by its slug * * @param {Flatfile.WorkbookId} workbookId - The workbook ID to manage flags for * @param {string} slug - The flag slug to retrieve * @param {Flags.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.flags.get("us_wb_YOUR_ID", "important") */ get(workbookId: Flatfile.WorkbookId, slug: string, requestOptions?: Flags.RequestOptions): core.HttpResponsePromise; private __get; /** * Updates an existing flag * * @param {Flatfile.WorkbookId} workbookId - The workbook ID to manage flags for * @param {string} slug - The flag slug to update * @param {Flatfile.UpdateFlagRequest} request * @param {Flags.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.flags.update("us_wb_YOUR_ID", "important", { * label: "Updated Important", * colorHex: "#30A46C" * }) */ update(workbookId: Flatfile.WorkbookId, slug: string, request: Flatfile.UpdateFlagRequest, requestOptions?: Flags.RequestOptions): core.HttpResponsePromise; private __update; /** * Deletes a flag * * @param {Flatfile.WorkbookId} workbookId - The workbook ID to manage flags for * @param {string} slug - The flag slug to delete * @param {Flags.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.flags.delete("us_wb_YOUR_ID", "important") */ delete(workbookId: Flatfile.WorkbookId, slug: string, requestOptions?: Flags.RequestOptions): core.HttpResponsePromise; private __delete; /** * Performs bulk flag operations on records * * @param {Flatfile.WorkbookId} workbookId - The workbook ID to manage flags for * @param {Flatfile.BulkMutateFlagsRequest} request * @param {Flags.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.flags.bulkMutate("us_wb_YOUR_ID", { * operation: "apply", * slug: "important", * flag: { * label: "Important", * colorHex: "#0090FF" * }, * snapshotLabel: "Before important flag application" * }) * * @example * await client.flags.bulkMutate("us_wb_YOUR_ID", { * operation: "delete", * slug: "important", * exceptions: ["rec_123", "rec_456"] * }) */ bulkMutate(workbookId: Flatfile.WorkbookId, request: Flatfile.BulkMutateFlagsRequest, requestOptions?: Flags.RequestOptions): core.HttpResponsePromise; private __bulkMutate; protected _getAuthorizationHeader(): Promise; }