import { Id } from "./minilinks";
export type Query = BoolExpLink | number;
export type LinkToLinksRelations = 'from' | 'to' | 'type' | 'in' | 'out' | 'typed';
export interface QueryLink extends BoolExpLink {
    limit?: number;
    order_by?: {
        [key: string]: 'asc' | 'desc';
    };
    offset?: number;
    distinct_on?: [string];
    return?: QueryLinkReturn;
}
export interface QueryLinkReturn extends QueryLink {
    relation: LinkToLinksRelations;
}
export interface BoolExp<T> {
    _and?: T[];
    _or?: T[];
    _not?: T;
}
export interface BoolExpLink extends BoolExp<BoolExpLink> {
    id?: ComparasionType<Id>;
    from_id?: ComparasionType<Id>;
    to_id?: ComparasionType<Id>;
    type_id?: ComparasionType<Id>;
    _id?: ComparasionType<Id>;
    _from_id?: ComparasionType<Id>;
    _to_id?: ComparasionType<Id>;
    _type_id?: ComparasionType<Id>;
    from?: BoolExpLink;
    to?: BoolExpLink;
    type?: BoolExpLink;
    in?: BoolExpLink | BoolExpLink[];
    out?: BoolExpLink | BoolExpLink[];
    typed?: BoolExpLink | BoolExpLink[];
    selected?: BoolExpSelector | BoolExpSelector[];
    selectors?: BoolExpSelector | BoolExpSelector[];
    number?: BoolExpValue<number>;
    string?: BoolExpValue<string>;
    object?: BoolExpValue<object>;
    value?: BoolExpValue<any>;
    can_rule?: BoolExpCan;
    can_action?: BoolExpCan;
    can_object?: BoolExpCan;
    can_subject?: BoolExpCan;
    down?: BoolExpTree;
    up?: BoolExpTree;
    tree?: BoolExpTree;
    root?: BoolExpTree;
}
export interface BoolExpValue<T> extends BoolExp<BoolExpValue<T>> {
    id?: ComparasionType<Id>;
    link_id?: ComparasionType<Id>;
    link?: BoolExpLink;
    value?: ComparasionType<T>;
}
export interface BoolExpCan extends BoolExp<BoolExpCan> {
    rule_id?: ComparasionType<Id>;
    action_id?: ComparasionType<Id>;
    object_id?: ComparasionType<Id>;
    subject_id?: ComparasionType<Id>;
    rule?: BoolExpLink;
    action?: BoolExpLink;
    object?: BoolExpLink;
    subject?: BoolExpLink;
}
export interface BoolExpSelector extends BoolExp<BoolExpCan> {
    item_id?: ComparasionType<Id>;
    item?: BoolExpLink;
    selector_id?: ComparasionType<Id>;
    selector?: BoolExpLink;
    query_id?: ComparasionType<Id>;
    query?: BoolExpLink;
    selector_include_id?: ComparasionType<Id>;
}
export interface BoolExpTree extends BoolExp<BoolExpCan> {
    id?: ComparasionType<Id>;
    link_id?: ComparasionType<Id>;
    tree_id?: ComparasionType<Id>;
    root_id?: ComparasionType<Id>;
    parent_id?: ComparasionType<Id>;
    depth?: ComparasionType<string>;
    position_id?: ComparasionType<string>;
    link?: BoolExpLink;
    tree?: BoolExpLink;
    root?: BoolExpLink;
    parent?: BoolExpLink;
    by_link?: BoolExpTree;
    by_tree?: BoolExpTree;
    by_root?: BoolExpTree;
    by_parent?: BoolExpTree;
    by_position?: BoolExpTree;
}
export interface BoolExpHandler extends BoolExp<BoolExpCan> {
    dist_id?: ComparasionType<Id>;
    dist?: BoolExpLink;
    src_id?: ComparasionType<Id>;
    src?: BoolExpLink;
    execution_provider_id?: ComparasionType<Id>;
    execution_provider?: BoolExpLink;
    isolation_provider_id?: ComparasionType<Id>;
    isolation_provider?: BoolExpLink;
    handler_id?: ComparasionType<Id>;
    handler?: BoolExpLink;
}
export type ComparasionType<T> = ComparasionExp<T> | T;
export interface ComparasionExp<T> {
    _eq?: T;
    _neq?: T;
    _gt?: T;
    _gte?: T;
    _lt?: T;
    _lte?: T;
    _is_null?: boolean;
    _in?: T[];
    _nin?: T[];
    _type_of?: T;
    _id?: [any, ...any[]];
    _like?: string;
    _ilike?: string;
    _nlike?: string;
    _nilike?: string;
    _regex?: string;
    _nregex?: string;
    _iregex?: string;
    _niregex?: string;
}
export interface MutationInput {
}
export interface MutationInputLinkPlain {
    id?: Id;
    from_id?: Id;
    to_id?: Id;
    type_id?: Id;
    from?: {
        data: MutationInputLink;
    } | MutationInputLink;
    to?: {
        data: MutationInputLink;
    } | MutationInputLink;
    out?: {
        data: MutationInputLink | MutationInputLink[];
    } | MutationInputLink | MutationInputLink[];
    in?: {
        data: MutationInputLink | MutationInputLink[];
    } | MutationInputLink | MutationInputLink[];
    number?: {
        data: MutationInputValue<number>;
    } | number;
    string?: {
        data: MutationInputValue<string>;
    } | string;
    object?: {
        data: MutationInputValue<any>;
    } | any;
    typed?: {
        data: MutationInputLink | MutationInputLink[];
    };
}
export interface MutationInputLink extends MutationInputLinkPlain {
    from?: {
        data: MutationInputLink;
    } | MutationInputLink;
    to?: {
        data: MutationInputLink;
    } | MutationInputLink;
    out?: {
        data: MutationInputLink | MutationInputLink[];
    } | MutationInputLink | MutationInputLink[];
    in?: {
        data: MutationInputLink | MutationInputLink[];
    } | MutationInputLink | MutationInputLink[];
    number?: {
        data: MutationInputValue<number>;
    } | number;
    string?: {
        data: MutationInputValue<string>;
    } | string;
    object?: {
        data: MutationInputValue<any>;
    } | any;
    typed?: {
        data: MutationInputLink | MutationInputLink[];
    };
}
export interface MutationInputValue<T> {
    link_id?: Id;
    link?: {
        data: MutationInputLink;
    };
    value?: T;
}
