import { PubSubEngine } from 'type-graphql';
import { AppContext } from '../types.js';
import { UserInfo, DatabaseProviderBase } from '@memberjunction/core';
import { MJQueryResolver } from '../generated/generated.js';
import { DeleteOptionsInput } from '../generic/DeleteOptionsInput.js';
export declare enum QueryStatus {
    Pending = "Pending",
    Approved = "Approved",
    Rejected = "Rejected",
    Expired = "Expired"
}
export declare class QueryPermissionInputType {
    RoleID: string;
}
export declare class CreateQuerySystemUserInput {
    Name: string;
    CategoryID?: string;
    CategoryPath?: string;
    UserQuestion?: string;
    Description?: string;
    SQL?: string;
    TechnicalDescription?: string;
    OriginalSQL?: string;
    Feedback?: string;
    Status?: QueryStatus;
    QualityRank?: number;
    ExecutionCostRank?: number;
    UsesTemplate?: boolean;
    AuditQueryRuns?: boolean;
    CacheEnabled?: boolean;
    CacheTTLMinutes?: number;
    CacheMaxSize?: number;
    Permissions?: QueryPermissionInputType[];
}
export declare class UpdateQuerySystemUserInput {
    ID: string;
    Name?: string;
    CategoryID?: string;
    CategoryPath?: string;
    UserQuestion?: string;
    Description?: string;
    SQL?: string;
    TechnicalDescription?: string;
    OriginalSQL?: string;
    Feedback?: string;
    Status?: QueryStatus;
    QualityRank?: number;
    ExecutionCostRank?: number;
    UsesTemplate?: boolean;
    AuditQueryRuns?: boolean;
    CacheEnabled?: boolean;
    CacheTTLMinutes?: number;
    CacheMaxSize?: number;
    Permissions?: QueryPermissionInputType[];
}
export declare class QueryFieldType {
    ID: string;
    QueryID: string;
    Name: string;
    Description?: string;
    Sequence: number;
    SQLBaseType?: string;
    SQLFullType?: string;
    SourceEntityID?: string;
    SourceEntity?: string;
    SourceFieldName?: string;
    IsComputed: boolean;
    ComputationDescription?: string;
    IsSummary?: boolean;
    SummaryDescription?: string;
}
export declare class QueryParameterType {
    ID: string;
    QueryID: string;
    Name: string;
    Description?: string;
    Type: string;
    IsRequired: boolean;
    DefaultValue?: string;
    SampleValue?: string;
    ValidationFilters?: string;
}
export declare class QueryEntityType {
    ID: string;
    QueryID: string;
    EntityID: string;
    Entity?: string;
}
export declare class QueryPermissionType {
    ID: string;
    QueryID: string;
    RoleID: string;
    Role?: string;
}
export declare class CreateQueryResultType {
    Success: boolean;
    ErrorMessage?: string;
    ID?: string;
    Name?: string;
    Description?: string;
    CategoryID?: string;
    Category?: string;
    SQL?: string;
    Status?: string;
    QualityRank?: number;
    EmbeddingVector?: string;
    EmbeddingModelID?: string;
    EmbeddingModelName?: string;
    Fields?: QueryFieldType[];
    Parameters?: QueryParameterType[];
    Entities?: QueryEntityType[];
    Permissions?: QueryPermissionType[];
}
export declare class UpdateQueryResultType {
    Success: boolean;
    ErrorMessage?: string;
    ID?: string;
    Name?: string;
    Description?: string;
    CategoryID?: string;
    Category?: string;
    SQL?: string;
    Status?: string;
    QualityRank?: number;
    EmbeddingVector?: string;
    EmbeddingModelID?: string;
    EmbeddingModelName?: string;
    Fields?: QueryFieldType[];
    Parameters?: QueryParameterType[];
    Entities?: QueryEntityType[];
    Permissions?: QueryPermissionType[];
}
export declare class DeleteQueryResultType {
    Success: boolean;
    ErrorMessage?: string;
    ID?: string;
    Name?: string;
    Description?: string;
    CategoryID?: string;
    SQL?: string;
    Status?: string;
}
export declare class MJQueryResolverExtended extends MJQueryResolver {
    CreateQuerySystemUser(input: CreateQuerySystemUserInput, context: AppContext, pubSub: PubSubEngine): Promise<CreateQueryResultType>;
    protected createPermissions(p: DatabaseProviderBase, permissions: QueryPermissionInputType[], queryID: string, contextUser: UserInfo): Promise<QueryPermissionType[]>;
    UpdateQuerySystemUser(input: UpdateQuerySystemUserInput, context: AppContext, pubSub: PubSubEngine): Promise<UpdateQueryResultType>;
    DeleteQuerySystemResolver(ID: string, options: DeleteOptionsInput | null, context: AppContext, pubSub: PubSubEngine): Promise<DeleteQueryResultType>;
    private findOrCreateCategoryPath;
    private findExistingQuery;
    private findCategoryByNameAndParent;
}
//# sourceMappingURL=CreateQueryResolver.d.ts.map