import { channel, DataType, group, ranger } from '@synnaxlabs/client';
import { Optional, TimeSpan } from '@synnaxlabs/x';
import { z } from 'zod';
import { Flux } from '../flux';
import { Group } from '../group';
import { Ontology } from '../ontology';
import { Ranger } from '../ranger';
export declare const FLUX_STORE_KEY = "channels";
export interface FluxStore extends Flux.UnaryStore<channel.Key, channel.Channel> {
}
interface FluxSubStore extends Flux.Store {
    [FLUX_STORE_KEY]: FluxStore;
    [Ranger.RANGE_ALIASES_FLUX_STORE_KEY]: Ranger.AliasFluxStore;
    [Ontology.RELATIONSHIPS_FLUX_STORE_KEY]: Ontology.RelationshipFluxStore;
    [Ontology.RESOURCES_FLUX_STORE_KEY]: Ontology.ResourceFluxStore;
    [Group.FLUX_STORE_KEY]: Group.FluxStore;
}
export declare const useListenForCalculationStatus: (onChange: (status: channel.Status) => void) => void;
export declare const FLUX_STORE_CONFIG: Flux.UnaryStoreConfig<FluxSubStore, channel.Key, channel.Channel>;
export declare const formSchema: z.ZodObject<{
    alias: z.ZodOptional<z.ZodString>;
    status: z.ZodOptional<import('node_modules/@synnaxlabs/x/dist/src/status/status').StatusZodObject<z.ZodNever>>;
    key: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    leaseholder: z.ZodOptional<z.ZodNumber>;
    index: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    isIndex: z.ZodOptional<z.ZodBoolean>;
    internal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    virtual: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    expression: z.ZodDefault<z.ZodOptional<z.ZodString>>;
    operations: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNull, z.ZodUndefined]>, z.ZodTransform<{
        type: "min" | "max" | "avg" | "none";
        resetChannel?: number | undefined;
        duration?: TimeSpan | undefined;
    }[], null | undefined>>, z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<{
            min: "min";
            max: "max";
            avg: "avg";
            none: "none";
        }>;
        resetChannel: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
        duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeSpan, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').TimeStamp, import('@synnaxlabs/x').TimeStamp>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>;
    }, z.core.$strip>>]>>;
    name: z.ZodString;
    dataType: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DataType, string>>, z.ZodCustom<DataType, DataType>]>, z.ZodTransform<string, DataType>>;
    requires: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>>;
}, z.core.$strip>;
export declare const calculatedFormSchema: z.ZodObject<{
    alias: z.ZodOptional<z.ZodString>;
    status: z.ZodOptional<import('node_modules/@synnaxlabs/x/dist/src/status/status').StatusZodObject<z.ZodNever>>;
    key: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    leaseholder: z.ZodOptional<z.ZodNumber>;
    index: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    isIndex: z.ZodOptional<z.ZodBoolean>;
    internal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    virtual: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    operations: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNull, z.ZodUndefined]>, z.ZodTransform<{
        type: "min" | "max" | "avg" | "none";
        resetChannel?: number | undefined;
        duration?: TimeSpan | undefined;
    }[], null | undefined>>, z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<{
            min: "min";
            max: "max";
            avg: "avg";
            none: "none";
        }>;
        resetChannel: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
        duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeSpan, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').TimeStamp, import('@synnaxlabs/x').TimeStamp>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>;
    }, z.core.$strip>>]>>;
    name: z.ZodString;
    dataType: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DataType, string>>, z.ZodCustom<DataType, DataType>]>, z.ZodTransform<string, DataType>>;
    requires: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>>;
    expression: z.ZodString;
}, z.core.$strip>;
export interface RetrieveQuery {
    key: channel.Key;
    rangeKey?: ranger.Key;
}
export declare const ZERO_FORM_VALUES: z.infer<typeof formSchema | typeof calculatedFormSchema>;
export declare const useRetrieve: Flux.UseRetrieve<RetrieveQuery, channel.Channel>, useRetrieveStateful: Flux.UseRetrieveStateful<RetrieveQuery, channel.Channel>, useRetrieveObservable: Flux.UseRetrieveObservable<RetrieveQuery, channel.Channel>;
export interface RetrieveMultipleQuery extends channel.RetrieveOptions {
    keys: channel.Keys;
}
export declare const useRetrieveMultiple: Flux.UseRetrieve<RetrieveMultipleQuery, channel.Channel[]>;
export interface FormQuery extends Optional<RetrieveQuery, "key"> {
}
export declare const useForm: Flux.UseForm<FormQuery, z.ZodObject<{
    alias: z.ZodOptional<z.ZodString>;
    status: z.ZodOptional<import('node_modules/@synnaxlabs/x/dist/src/status/status').StatusZodObject<z.ZodNever>>;
    key: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    leaseholder: z.ZodOptional<z.ZodNumber>;
    index: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    isIndex: z.ZodOptional<z.ZodBoolean>;
    internal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    virtual: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    expression: z.ZodDefault<z.ZodOptional<z.ZodString>>;
    operations: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNull, z.ZodUndefined]>, z.ZodTransform<{
        type: "min" | "max" | "avg" | "none";
        resetChannel?: number | undefined;
        duration?: TimeSpan | undefined;
    }[], null | undefined>>, z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<{
            min: "min";
            max: "max";
            avg: "avg";
            none: "none";
        }>;
        resetChannel: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
        duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeSpan, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').TimeStamp, import('@synnaxlabs/x').TimeStamp>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>;
    }, z.core.$strip>>]>>;
    name: z.ZodString;
    dataType: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DataType, string>>, z.ZodCustom<DataType, DataType>]>, z.ZodTransform<string, DataType>>;
    requires: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>>;
}, z.core.$strip>, FluxSubStore>;
export declare const useCalculatedForm: Flux.UseForm<FormQuery, z.ZodObject<{
    alias: z.ZodOptional<z.ZodString>;
    status: z.ZodOptional<import('node_modules/@synnaxlabs/x/dist/src/status/status').StatusZodObject<z.ZodNever>>;
    key: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    leaseholder: z.ZodOptional<z.ZodNumber>;
    index: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
    isIndex: z.ZodOptional<z.ZodBoolean>;
    internal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    virtual: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
    operations: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNull, z.ZodUndefined]>, z.ZodTransform<{
        type: "min" | "max" | "avg" | "none";
        resetChannel?: number | undefined;
        duration?: TimeSpan | undefined;
    }[], null | undefined>>, z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<{
            min: "min";
            max: "max";
            avg: "avg";
            none: "none";
        }>;
        resetChannel: z.ZodOptional<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>;
        duration: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
            value: z.ZodBigInt;
        }, z.core.$strip>, z.ZodTransform<TimeSpan, {
            value: bigint;
        }>>, z.ZodPipe<z.ZodString, z.ZodTransform<TimeSpan, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<TimeSpan, number>>, z.ZodPipe<z.ZodBigInt, z.ZodTransform<TimeSpan, bigint>>, z.ZodCustom<TimeSpan, TimeSpan>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').TimeStamp, import('@synnaxlabs/x').TimeStamp>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').TimeStamp>>, z.ZodPipe<z.ZodCustom<import('@synnaxlabs/x').Rate, import('@synnaxlabs/x').Rate>, z.ZodTransform<TimeSpan, import('@synnaxlabs/x').Rate>>]>>;
    }, z.core.$strip>>]>>;
    name: z.ZodString;
    dataType: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DataType, string>>, z.ZodCustom<DataType, DataType>]>, z.ZodTransform<string, DataType>>;
    requires: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUInt32, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>>>;
    expression: z.ZodString;
}, z.core.$strip>, FluxSubStore>;
export interface ListQuery extends channel.RetrieveOptions {
    searchTerm?: string;
    rangeKey?: string;
    internal?: boolean;
    offset?: number;
    limit?: number;
}
export declare const useList: Flux.UseList<ListQuery, number, channel.Channel>;
export interface RenameParams extends Pick<channel.Payload, "key" | "name"> {
}
export declare const useRename: Flux.UseUpdate<RenameParams, RenameParams, z.ZodNever>;
export interface UpdateAliasParams extends Optional<ranger.Alias, "range" | "channel"> {
    alias: string;
}
export declare const useUpdateAlias: Flux.UseUpdate<UpdateAliasParams, UpdateAliasParams, z.ZodNever>;
export type DeleteParams = channel.Key | channel.Keys;
export declare const useDelete: Flux.UseUpdate<DeleteParams, DeleteParams, z.ZodNever>;
export interface DeleteAliasParams {
    range?: ranger.Key;
    channels?: channel.Key | channel.Key[];
}
export declare const useDeleteAlias: Flux.UseUpdate<DeleteAliasParams, DeleteAliasParams, z.ZodNever>;
interface RetrieveGroupQuery {
}
export declare const useRetrieveGroup: Flux.UseRetrieve<RetrieveGroupQuery, group.Group>;
export {};
//# sourceMappingURL=queries.d.ts.map