import type { StoresBase, Store, StoreCopyParams } from "../resources/stores/stores.mjs"; import type { RequestOptions } from "../internal/request-options.mjs"; /** * Parameters for polling a store until it has settled. */ export interface StorePollHelperParams { storeIdentifier: string; pollIntervalMs?: number | undefined; pollTimeoutMs?: number | undefined; options?: RequestOptions | undefined; } /** * Parameters for copying a store and waiting for the copy to finish. */ export interface StoreCopyAndPollHelperParams { storeIdentifier: string; body: StoreCopyParams; pollIntervalMs?: number | undefined; pollTimeoutMs?: number | undefined; options?: RequestOptions | undefined; } type Constructor = new (...args: any[]) => T; /** * Methods `withStoreHelpers` adds to the generated `stores` resource. * * The mixin's return type is spelled out so that declaration emit does not have to name the * anonymous class (TS4094: it has the protected `_client` member). */ export interface StoreHelpers { /** * Poll a store until it is no longer `in_progress`. A store is `in_progress` while a copy * fills it; it settles as `completed` or `failed` (`copy_state` then carries the error). */ poll(storeIdentifier: string, pollIntervalMs?: number, pollTimeoutMs?: number, options?: RequestOptions): Promise; poll(params: StorePollHelperParams): Promise; /** * Copy a store into a new store and wait until the copy has finished. Returns the new store; * check `status` (`completed` or `failed`) before using it. */ copyAndPoll(storeIdentifier: string, body: StoreCopyParams, pollIntervalMs?: number, pollTimeoutMs?: number, options?: RequestOptions): Promise; copyAndPoll(params: StoreCopyAndPollHelperParams): Promise; } export declare function withStoreHelpers>(Base: TBase): (new (...args: any[]) => StoreHelpers) & TBase; export {}; //# sourceMappingURL=stores.d.mts.map