import { DatasourceConfiguration } from '../datasource/index.js';
import { Timing } from './timing.js';
export declare class ResponseWrapper<T> {
    responseMeta: ResponseMeta;
    data?: T;
    api?: T;
    intergrations?: Record<string, DatasourceConfiguration>;
    constructor({ data }: {
        data: T;
    });
}
export declare class ApiV2WithIntegrationsResponseWrapper<T> {
    api: T;
    integrations: Record<string, DatasourceConfiguration>;
    metadata: Record<string, string>;
    stores: {
        secrets: Array<DatasourceConfiguration>;
    };
    constructor(api: T, integrations: Record<string, DatasourceConfiguration>, metadata: Record<string, string>, stores: {
        secrets: Array<DatasourceConfiguration>;
    });
}
export declare class ResponseMeta {
    status: number;
    message: string;
    success?: boolean;
    error?: ErrorDto;
    timing?: Timing;
    constructor({ status, message, success }: {
        status: number;
        message: string;
        success: boolean;
    });
}
export declare class ErrorDto {
    code: number;
    message: string;
    superblocksError?: SuperblocksError;
    constructor({ code, message, type }: {
        code: number;
        message: string;
        type?: SuperblocksError;
    });
}
/**
 * To let UI know if http error is caused by superblocks or external
 * This enum is intended to provide additional information on top of general
 * error code and message
 */
export declare enum SuperblocksError {
    RbacUnauthorized = "RbacUnauthorized",
    APIKeyInvalid = "APIKeyInvalid",
    AuthenticatedUserNotFound = "AuthenticatedUserNotFound",
    UserTokenInvalid = "UserTokenInvalid",
    JWTExpired = "JWTExpired"
}
/**
 * Type guard to check if an object is a ResponseMeta
 * Works with both class instances and serialized objects (from API responses)
 */
export declare function isResponseMetadata(responseMetadata: unknown): responseMetadata is ResponseMeta;
//# sourceMappingURL=response.d.ts.map