import type { AnyAction, TypeGuard } from '../../libs/cargo-hold'; import type { IPathLens } from '../../libs/standard-lens'; import type { MaybePromise } from '../../libs/standard-types'; import type { AsyncBuilder, WithActionKey, WithAsyncCallback, WithEnableLoadingMore, WithFailureType, WithIdleType, WithLensInstance, WithMapOnFailure, WithMapOnSuccess, WithMetadata, WithOptimisticUpdate, WithPayloadTypes, WithSuccessType, WithTriggerActionFilter } from './async.builder.types'; import type { AsyncState } from './async.types'; export declare function asyncBuilder(): AsyncBuilder; export declare function asyncBuilder(): AsyncBuilder & WithIdleType & WithSuccessType; export declare function asyncBuilder(): AsyncBuilder & WithFailureType & WithIdleType & WithSuccessType; export declare const asyncBuilderWithStructureLens: (lens: IPathLens>) => WithLensInstance & WithFailureType & WithIdleType & WithSuccessType; export declare const withStructureLens: (lens: IPathLens>) => (builder: BuilderType) => BuilderType & WithLensInstance; export declare const withActionKey: (actionKey: ActionKeyType) => (builder: BuilderType) => BuilderType & WithActionKey; export declare const withMetadata: >(metadata: MetadataType) => (builder: BuilderType) => BuilderType & WithMetadata; export declare const withTriggerActionFilter: >(triggerActionFilter: TypeGuard, DesiredActionType>) => (builder: BuilderType) => BuilderType & WithTriggerActionFilter; export declare const withAsyncCallback: (callback: (input: InputType) => MaybePromise) => (builder: BuilderType) => BuilderType & WithAsyncCallback; export declare const withMapOnSuccess: (mapOnSuccess: (input: InputType) => (oldPayload: StateType) => PayloadType) => (builder: BuilderType) => BuilderType & WithMapOnSuccess; export declare const withMapOnFailure: (mapOnFailure: (input: InputType) => (oldFailure?: FailureType | undefined) => FailureType) => (builder: BuilderType) => BuilderType & WithMapOnFailure; export declare const withOptimisticUpdate: (prediction: (input: InputType) => (oldPayload: StateType) => PayloadType) => (builder: BuilderType) => BuilderType & WithOptimisticUpdate; export declare const withEnableLoadingMore: (enableLoadMore: boolean) => (builder: BuilderType) => BuilderType & WithEnableLoadingMore;