///
import { Ari } from '@forge/util/packages/ari';
import { URL } from 'url';
import { AppConfigProvider } from '../apps';
import { AppEnvironmentClient, DateSearchInput } from '../graphql';
import { GlobalEdgeClient } from '../http-client';
import { StatsigService } from '../service';
export interface InstallContext {
site: URL;
product: string;
}
export interface SplunkQueryDetails {
environmentKey: string;
}
export interface QueryDetails {
environmentKey: string;
limit: number;
context?: InstallContext;
startTime?: string | null;
containers?: boolean;
grouped?: boolean;
}
export declare type AppLogsDetails = {
appId: string;
environmentId: string;
limit: number;
grouped?: boolean;
startTime?: string | null;
contextAri?: [Ari];
runtime?: string | null;
};
export declare type AppLogsDetailsV2 = AppLogsDetails & {
offset: number;
dateSearchInput: DateSearchInput;
queryStartTime: string;
maxLimit: number;
};
export interface InvocationQueryDetails {
environmentKey: string;
invocationId: string;
context?: InstallContext;
}
export interface AppInvocationLogsDetails {
invocationId: string;
}
export interface InvocationLogLine {
timestamp: string;
level?: string;
message?: string;
other?: any;
}
export interface Invocation {
id: string;
appVersion: string | undefined | null;
logs: InvocationLogLine[];
function?: string;
trigger?: string;
}
export declare enum Runtime {
RUNTIMEV2 = "RUNTIMEV2",
CONTAINER = "CONTAINER"
}
export interface ViewAppLogsClient {
viewAppLogs(details: AppLogsDetails): Promise;
viewAppLogsV2(details: AppLogsDetailsV2, invocationMap: Map, logLinesWithInvocation: Invocation[], totalRecieved: number): Promise;
viewInvocationLogs(details: AppInvocationLogsDetails): Promise;
}
export declare class ViewAppLogsCommand {
private readonly getAppConfig;
private readonly appEnvironmentClient;
private readonly globalEdgeClient;
private readonly logsClient;
private readonly statsigService;
constructor(getAppConfig: AppConfigProvider, appEnvironmentClient: AppEnvironmentClient, globalEdgeClient: GlobalEdgeClient, logsClient: ViewAppLogsClient, statsigService: StatsigService);
getAll({ environmentKey, limit, context, startTime, grouped, containers }: QueryDetails): Promise;
getLogs(details: AppLogsDetails): Promise;
getOne(details: InvocationQueryDetails): Promise;
}
//# sourceMappingURL=view-logs.d.ts.map