sfdx-hardis
Version:
Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards
36 lines (35 loc) • 1.19 kB
TypeScript
import { NotifProviderRoot } from "./notifProviderRoot.js";
import type { NotifMessage, NotifSeverity } from "./types.js";
export declare class ApiProvider extends NotifProviderRoot {
protected apiUrl: string | null;
payload: ApiNotifMessage;
payloadFormatted: any;
protected metricsApiUrl: string | null;
protected jsonLogsFile: string | null;
metricsPayload: string;
protected metricsFormat: 'influx' | 'prometheus';
getLabel(): string;
isApplicableForNotif(notifMessage: NotifMessage): boolean;
isUserNotifProvider(): boolean;
postNotification(notifMessage: NotifMessage): Promise<void>;
private managePostLogs;
private managePostMetrics;
private buildPayload;
private formatPayload;
private formatPayloadLoki;
private sendToApi;
private writeLogsToJsonFile;
private detectMetricsFormat;
private buildMetricsPayload;
private buildMetricsPayloadInflux;
private buildMetricsPayloadPrometheus;
private sendToMetricsApi;
}
export interface ApiNotifMessage {
source: string;
type: string;
severity: NotifSeverity;
orgIdentifier: string;
gitIdentifier: string;
data: any;
}