diff --git a/src/components/core/MantleProvider/MantleProvider.js b/src/components/core/MantleProvider/MantleProvider.js index 6090a14..d5646af 100644 --- a/src/components/core/MantleProvider/MantleProvider.js +++ b/src/components/core/MantleProvider/MantleProvider.js @@ -70,6 +70,13 @@ export const MantleProvider = ({ await mantleClient.sendUsageEvent(usageEvent); }; + /** + * @type {SendUsageEventCallback} + */ + const sendUsageEvents = async (usageEvent) => { + await mantleClient.sendUsageEvents(usageEvent); + }; + /** * @type {GetUsageReportCallback} */ @@ -153,6 +160,7 @@ export const MantleProvider = ({ loading, i18n: { ...Labels, ...i18n }, sendUsageEvent, + sendUsageEvents, getUsageReport, subscribe, cancelSubscription, @@ -214,6 +222,7 @@ export const useMantle = () => { * @property {boolean} loading - Whether the current customer is loading * @property {RefetchCallback} refetch - Refetch the current customer * @property {SendUsageEventCallback} sendUsageEvent - Send a new usage event to Mantle + * @property {SendUsageEventCallback} sendUsageEvents - Send a set of new usage event to Mantle * @property {GetUsageReportCallback} getUsageReport - Get a usage report for a usage metric * @property {SubscribeCallback} subscribe - Subscribe to a new plan * @property {CancelSubscriptionCallback} cancelSubscription - Cancel the current subscription @@ -295,4 +304,4 @@ export const useMantle = () => { * @param {string} params.type - The type of hosted session to create * @param {Object} params.config - The configuration for the hosted session * @returns {Promise} a promise that resolves to the hosted session - */ \ No newline at end of file + */