import { AppContext } from '../types.js';
export declare class GetDataInputType {
    Token: string;
    Queries: string[];
}
export declare class GetDataOutputType {
    Success: boolean;
    Queries: string[];
    ErrorMessages: (string | null)[];
    /**
     * Each query's results will be converted to JSON and returned as a string
     */
    Results: (string | null)[];
}
export declare class SimpleEntityResultType {
    Success: boolean;
    ErrorMessage?: string;
    Results: SimpleEntityOutputType[];
}
export declare class SimpleEntityOutputType {
    ID: string;
    Name: string;
    Description?: string;
    SchemaName: string;
    BaseView: string;
    BaseTable: string;
    CodeName?: string;
    ClassName?: string;
    Fields: SimpleEntityFieldOutputType[];
}
export declare class SimpleEntityFieldOutputType {
    ID: string;
    Name: string;
    Description?: string;
    Type: string;
    AllowsNull: boolean;
    MaxLength: number;
}
/**
 * General purpose resolver for fetching different kinds of data payloads for SYSTEM users only.
 */
export declare class GetDataResolver {
    /**
     * This query will sync the specified items with the existing system. Items will be processed in order and the results of each operation will be returned in the Results array within the return value.
     * @param items - an array of ActionItemInputType objects that specify the action to be taken on the specified entity with the specified primary key and the JSON representation of the field values.
     * @param token - the short-lived access token that is required to perform this operation.
     */
    GetData(input: GetDataInputType, context: AppContext): Promise<GetDataOutputType>;
    GetAllEntities(context: AppContext): Promise<SimpleEntityResultType>;
}
export declare class TokenUseLog {
    Token: string;
    UsedAt: Date;
    UsePayload: any;
}
/**
 * Used to track all active access tokens that are requested by anyone within the server to be able to send to external services that can
 * in turn call back to the GetDataResolver to get data from the server. This is an extra security layer to ensure that tokens are short
 * lived compared to the system level API key which rotates but less frequently.
 */
export declare class GetDataAccessToken {
    Token: string;
    ExpiresAt: Date;
    RequstedAt: Date;
    /**
     * Can be used to store any payload to identify who requested the creation of the token, for example Skip might use this to put in a conversation ID to know which conversation a request is coming back for.
     */
    RequestorPayload: any;
    TokenUses: TokenUseLog[];
}
export declare function registerAccessToken(token?: string, lifeSpan?: number, requestorPayload?: any): GetDataAccessToken;
export declare function deleteAccessToken(token: string): void;
export declare function tokenExists(token: string): boolean;
export declare function isTokenValid(token: string): boolean;
export declare function recordTokenUse(token: string, usePayload: any): void;
//# sourceMappingURL=GetDataResolver.d.ts.map