import { type PagedResult } from '../../api/ApiTypes';
import { type LogApiKey, type LogEventSkeleton } from '../../api/cloud/LogApi';
import { State } from '../../shared/State';
export type Log = {
    /**
     * Get default noise filter
     * @returns {string[]} array of default event types and loggers to be filtered out
     */
    getDefaultNoiseFilter(): string[];
    /**
     * Resolve log level to an array of effective log levels
     * @param level string or numeric log level: 'FATAL', 'ERROR', 'WARN', 'INFO', 'DEBUG', 'TRACE', 'ALL', 0, 1, 2, 3, 4
     * @returns {string[]} array of effective log levels
     */
    resolveLevel(level: string | number): string[];
    /**
     * Resolve a log event's level
     * @param {object} log log event
     * @returns {string} log level
     */
    resolvePayloadLevel(log: LogEventSkeleton): string;
    /**
     * Get available log sources
     * @returns {Promise<string[]>} promise resolving to an array of available log sources
     */
    getLogSources(): Promise<string[]>;
    /**
     * Get log api key
     * @param {string} keyId key id
     * @returns {Promise<LogApiKey>} promise resolving to a LogApiKey objects
     */
    getLogApiKey(keyId: string): Promise<LogApiKey>;
    /**
     * Validate log api key and secret
     * @param {string} keyId log api key id
     * @param {string} secret log api secret
     * @returns {Promise<boolean>} a promise resolving to true if the key is valid, false otherwise
     */
    isLogApiKeyValid(keyId: string, secret: string): Promise<boolean>;
    /**
     * Get log api keys
     * @returns {Promise<LogApiKey[]>} promise resolving to an array of LogApiKey objects
     */
    getLogApiKeys(): Promise<LogApiKey[]>;
    /**
     * Create log api key
     * @param {string} keyName human-readable key name
     * @returns {Promise<LogApiKey>} a promise resolving to an object containing the log api key and secret
     */
    createLogApiKey(keyName: string): Promise<LogApiKey>;
    /**
     * Delete log api key
     * @param {string} keyId key id
     * @returns {Promise<LogApiKey>} a promise resolving to an object containing the log api key
     */
    deleteLogApiKey(keyId: string): Promise<LogApiKey>;
    /**
     * Delete all log api keys
     * @returns {Promise<LogApiKey>} a promise resolving to an array of log api key objects
     */
    deleteLogApiKeys(): Promise<LogApiKey[]>;
    /**
     * Tail logs
     * @param {string} source log source(s) to tail
     * @param {string} cookie paged results cookie
     * @returns {Promise<PagedResult<LogEventSkeleton>>} promise resolving to paged log event result
     */
    tail(source: string, cookie: string): Promise<PagedResult<LogEventSkeleton>>;
    /**
     * Fetch logs
     * @param {string} source log source(s) to tail
     * @param {string} startTs start timestamp
     * @param {string} endTs end timestamp
     * @param {string} cookie paged results cookie
     * @returns {Promise<PagedResult<LogEventSkeleton>>} promise resolving to paged log event result
     */
    fetch(source: string, startTs: string, endTs: string, cookie: string): Promise<PagedResult<LogEventSkeleton>>;
};
declare const _default: (state: State) => Log;
export default _default;
/**
 * Get default noise filter
 * @returns {string[]} array of default event types and loggers to be filtered out
 */
export declare function getDefaultNoiseFilter(): string[];
/**
 * Resolve log level to an array of effective log levels
 * @param level string or numeric log level: 'FATAL', 'ERROR', 'WARN', 'INFO', 'DEBUG', 'TRACE', 'ALL', 0, 1, 2, 3, 4
 * @returns {string[]} array of effective log levels
 */
export declare function resolveLevel(level: string | number): string[];
/**
 * Resolve a log event's level
 * @param {object} log log event
 * @returns {string} log level
 */
export declare function resolvePayloadLevel(log: LogEventSkeleton): string;
/**
 * Get available log sources
 * @returns {Promise<string[]>} promise resolving to an array of available log sources
 */
export declare function getLogSources({ state }: {
    state: State;
}): Promise<string[]>;
/**
 * Get log API key
 * @returns {Promise<PagedResult<LogApiKey>>} a promise resolving to a log api key object
 */
export declare function getLogApiKey({ keyId, state, }: {
    keyId: string;
    state: State;
}): Promise<LogApiKey>;
/**
 * Validate log API key
 * @param {string} keyId log api key id
 * @param {string} secret log api secret
 * @returns {Promise<boolean>} a promise resolving to true if the key is valid, false otherwise
 */
export declare function isLogApiKeyValid({ keyId, secret, state, }: {
    keyId: string;
    secret: string;
    state: State;
}): Promise<boolean>;
/**
 * Get log api keys
 * @returns {Promise<LogApiKey[]>} promise resolving to an array of LogApiKey objects
 */
export declare function getLogApiKeys({ state, }: {
    state: State;
}): Promise<LogApiKey[]>;
/**
 * Create API key
 * @param {keyName: string, state: State} params keyName, state
 * @returns {Promise<LogApiKey>} new API key and secret
 */
export declare function createLogApiKey({ keyName, state, }: {
    keyName: string;
    state: State;
}): Promise<LogApiKey>;
/**
 * Delete key
 */
export declare function deleteLogApiKey({ keyId, state, }: {
    keyId: string;
    state: State;
}): Promise<LogApiKey>;
/**
 * Delete all keys
 */
export declare function deleteLogApiKeys({ state, }: {
    state: State;
}): Promise<LogApiKey[]>;
/**
 * Tail logs
 * @param {string} source log source(s) to tail
 * @param {string} cookie paged results cookie
 * @returns {Promise<PagedResult<LogEventSkeleton>>} promise resolving to paged log event result
 */
export declare function tail({ source, cookie, state, }: {
    source: string;
    cookie: string;
    state: State;
}): Promise<PagedResult<LogEventSkeleton>>;
/**
 * Fetch logs
 * @param {string} source log source(s) to tail
 * @param {string} startTs start timestamp
 * @param {string} endTs end timestamp
 * @param {string} cookie paged results cookie
 * @returns {Promise<PagedResult<LogEventSkeleton>>} promise resolving to paged log event result
 */
export declare function fetch({ source, startTs, endTs, cookie, state, }: {
    source: string;
    startTs: string;
    endTs: string;
    cookie: string;
    state: State;
}): Promise<PagedResult<LogEventSkeleton>>;
//# sourceMappingURL=LogOps.d.ts.map