import { grpc } from "@improbable-eng/grpc-web"; import { ApplyStorageConfigResponse, DefaultStorageConfigResponse, RemoveResponse, SetDefaultStorageConfigResponse, StorageConfig as SConfig } from "@textile/grpc-powergate-client/dist/powergate/user/v1/user_pb"; import { Config } from "../types"; import { ApplyOptions } from "./types"; export { ApplyOptions }; export interface StorageConfig { /** * Get the default storage config associated with the current user. * @returns The default storage config. */ default: () => Promise; /** * Set the default storage config for this user. * @param config The new default storage config. */ setDefault: (config: SConfig.AsObject) => Promise; /** * Apply a storage config or the default to the specified cid. * @param cid The cid to store. * @param opts Options controlling the behavior storage config execution. * @returns An object containing the job id of the job executing the storage configuration. */ apply: (cid: string, opts?: ApplyOptions) => Promise; /** * Remove a cid from the user storage. * @param cid The cid to remove. */ remove: (cid: string) => Promise; } export declare const createStorageConfig: (config: Config, getMeta: () => grpc.Metadata) => StorageConfig;