@rockcarver/frodo-lib
Version:
A library to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.
104 lines • 3.23 kB
TypeScript
import { State } from '../../shared/State';
import { type NoIdObjectSkeletonInterface, type PagedResult } from '../ApiTypes';
export type LogApiKey = {
name: string;
api_key_id: string;
api_key_secret?: string;
created_at: string;
};
export type LogEventPayloadSkeleton = NoIdObjectSkeletonInterface & {
context: string;
level: string;
logger: string;
mdc: {
transactionId: string;
};
message: string;
thread: string;
timestamp: string;
transactionId: string;
};
export type LogEventSkeleton = NoIdObjectSkeletonInterface & {
payload: string | LogEventPayloadSkeleton;
timestamp: string;
type: string;
source: 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>;
/**
* Get available API keys
* @returns {Promise<PagedResult<LogApiKey>>} a promise resolving to a paged log api key results object
*/
export declare function getLogApiKeys({ state, }: {
state: State;
}): Promise<PagedResult<LogApiKey>>;
/**
* Get available log sources
* @returns {Promise<PagedResult<string>>} a promise resolving to a paged string results object
*/
export declare function getSources({ state, }: {
state: State;
}): Promise<PagedResult<string>>;
/**
* 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>;
/**
* 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 log API key
* @param {string} keyId key id
* @returns {Promise<unknown>} a promise that resolves to a log api key object
*/
export declare function deleteLogApiKey({ keyId, state, }: {
keyId: string;
state: State;
}): Promise<unknown>;
/**
* 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=LogApi.d.ts.map