/** * Visits payloads for External Storage and applies payload transformations via * {@link ExternalStorageRunner}. * * @module */ import type { ConcurrencyLimit } from '../concurrency/limit'; import type { ExternalStorage, StorageDriverTargetInfo } from '../converter/extstore'; import type { ExternalStorageMetricsAccumulator } from './external-storage-metrics'; import type { ContextDeriver, VisitOptions } from './payload-visitor'; /** * The storage target in scope at a given payload site during a store walk. It starts at * {@link ExternalStorageStoreOptions.initialTarget} and {@link ExternalStorageStoreOptions.deriveContext} * may retarget it per message (e.g. a child-workflow command retargets its payloads at the child). */ type StoreTarget = StorageDriverTargetInfo | undefined; /** @internal @experimental */ export interface ExternalStorageStoreOptions { /** Storage target before any message is entered (the initial enclosing workflow / activity). */ initialTarget?: StorageDriverTargetInfo; /** Derives new storage target from the current message. */ deriveContext?: ContextDeriver; /** Bounds concurrent transform calls across payload sites. Omit for sequential. */ limit?: ConcurrencyLimit; /** Aborts the walk and every in-flight driver call. */ abortSignal?: AbortSignal; /** Collects metrics of the store operations performed during the walk. */ metrics?: ExternalStorageMetricsAccumulator; } /** * @internal * @experimental */ export declare function extstoreStoreOptions(externalStorage: ExternalStorage, { initialTarget, deriveContext, limit, abortSignal, metrics }?: ExternalStorageStoreOptions): VisitOptions; /** * The inbound External Storage pass for a worker/client boundary: resolve reference payloads when * {@link ExternalStorage} is configured, otherwise fail loudly (via {@link extstoreDetectReferencesOptions}) * because nothing can resolve them. * * @internal * @experimental */ export declare function extstoreInboundOptions(externalStorage: ExternalStorage | undefined, { metrics }?: { metrics?: ExternalStorageMetricsAccumulator; }): VisitOptions; export {};