import { ontology, rack, task } from '@synnaxlabs/client';
import { optional } from '@synnaxlabs/x';
import { z } from 'zod';
import { Flux } from '../flux';
import { Label } from '../label';
import { Ontology } from '../ontology';
import { Status } from '../status';
export declare const FLUX_STORE_KEY = "tasks";
export declare const RESOURCE_NAME = "task";
export declare const PLURAL_RESOURCE_NAME = "tasks";
export interface FluxStore extends Flux.UnaryStore<task.Key, Omit<task.Task, "status">> {
}
export interface FluxSubStore extends Ontology.FluxSubStore, Label.FluxSubStore {
    [FLUX_STORE_KEY]: FluxStore;
    [Status.FLUX_STORE_KEY]: Status.FluxStore;
}
export declare const FLUX_STORE_CONFIG: Flux.UnaryStoreConfig<FluxSubStore>;
export type RetrieveQuery = task.RetrieveSingleParams;
export declare const retrieveSingle: <S extends task.Schemas = task.Schemas>({ query, schemas, client, store, }: Flux.RetrieveParams<RetrieveQuery, FluxSubStore> & {
    schemas?: S;
}) => Promise<task.Task<S>>;
export declare const createRetrieve: <S extends task.Schemas = task.Schemas>(schemas?: S) => Flux.CreateRetrieveReturn<{
    key: string | number | bigint;
    includeStatus?: boolean | undefined;
} | {
    name: string;
    includeStatus?: boolean | undefined;
} | {
    type: string;
    rack?: number | undefined;
}, task.Task<S> | null>;
export declare const useRetrieve: Flux.UseRetrieve<{
    key: string | number | bigint;
    includeStatus?: boolean | undefined;
} | {
    name: string;
    includeStatus?: boolean | undefined;
} | {
    type: string;
    rack?: number | undefined;
}, task.Task<task.Schemas<z.ZodLiteral<string>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>> | null>;
export interface ListQuery extends task.RetrieveMultipleParams {
}
export declare const useList: Flux.UseList<ListQuery, string, task.Task<task.Schemas<z.ZodLiteral<string>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>>;
export interface FormSchema<S extends task.Schemas = task.Schemas> extends z.ZodType<{
    key?: task.Key;
    name: string;
    rackKey: rack.Key;
    type: z.infer<S["type"]>;
    snapshot: boolean;
    config: z.infer<S["config"]>;
    status?: task.Status<S["statusData"]>;
}> {
}
export interface CreateFormParams<S extends task.Schemas = task.Schemas> {
    schemas: S;
    initialValues: InitialValues<S>;
}
export interface InitialValues<S extends task.Schemas = task.Schemas> extends optional.Optional<task.Payload<S>, "key"> {
    key?: task.Key;
}
export interface FormQuery {
    key?: task.Key;
}
export declare const createForm: <S extends task.Schemas = task.Schemas>({ schemas, initialValues, }: CreateFormParams<S>) => Flux.UseForm<FormQuery, FormSchema<S>, FluxSubStore>;
export type DeleteParams = task.Key | task.Key[];
export declare const useDelete: Flux.UseUpdate<DeleteParams, DeleteParams, z.ZodNever, false, FluxSubStore>;
export interface SnapshotPair extends Pick<task.Payload, "key" | "name"> {
}
export interface SnapshotParams {
    tasks: SnapshotPair | SnapshotPair[];
    parentID: ontology.ID;
}
export declare const useCreateSnapshot: Flux.UseUpdate<SnapshotParams, SnapshotParams, z.ZodNever, false, FluxSubStore>;
export interface UseRenameArgs extends Pick<task.Payload, "key" | "name"> {
}
export declare const rename: (params: Flux.UpdateParams<UseRenameArgs, FluxSubStore>) => Promise<UseRenameArgs>;
export declare const useRename: Flux.UseUpdate<UseRenameArgs, UseRenameArgs, z.ZodNever, false, FluxSubStore>;
export type CommandParams = task.NewCommand | task.NewCommand[];
export declare const shouldExecuteCommand: <StatusData extends z.ZodType = z.ZodType>(status: task.Status<StatusData>, command: string) => boolean;
export declare const useCommand: Flux.UseUpdate<CommandParams, CommandParams, z.ZodNever, false, FluxSubStore>;
//# sourceMappingURL=queries.d.ts.map