@grafana/alerting
Version:
Grafana Alerting Library – Build vertical integrations on top of the industry-leading alerting solution
18 lines (15 loc) • 642 B
JavaScript
import { notificationsAPI as injectedRtkApi } from '../../../api/notifications/v0alpha1/notifications.api.gen.mjs';
;
function useListContactPoints(queryArgs = {}, queryOptions = {}) {
return injectedRtkApi.useListReceiverQuery(queryArgs, queryOptions);
}
function useCreateContactPoint(options) {
const [updateFn, result] = injectedRtkApi.endpoints.createReceiver.useMutation(options);
const typedUpdateFn = (args) => {
const response = updateFn(args);
return response;
};
return [typedUpdateFn, result];
}
export { useCreateContactPoint, useListContactPoints };
//# sourceMappingURL=useContactPoints.mjs.map