import GenericMetrics from './generic-metrics'; import { EventPayload, Table } from './metrics.types'; /** * @description Util class to handle Business Metrics * @export * @class BusinessMetrics */ export default class BusinessMetrics extends GenericMetrics { /** * Build the metric event to submit. * @param {string} name of the metric * @param {EventPayload} payload user payload of the metric * @param {EventPayload} metadata to include outside of eventPayload.value * @returns {MetricEvent} The constructed metric event */ private buildEvent; /** * Submit a business metric to our metrics endpoint. * routes to the correct table with the correct schema payload by table * https://confluence-eng-gpk2.cisco.com/conf/display/WAP/Business+metrics++-%3E+ROMA * @param {string} name of the metric, ignored if going to wbxapp_callend_metrics * @param {EventPayload} payload user payload of the metric * @param {Table} table optional - to submit the metric to and adapt the sent schema * @param {EventPayload} metadata optional - to include outside of eventPayload.value * @returns {Promise} */ submitBusinessEvent({ name, payload, table, metadata, }: { name: string; payload: EventPayload; table?: Table; metadata?: EventPayload; }): Promise; }