Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

575 B
Raw Blame
// Meters an in-browser automation run.

import apiClient from "@editor/services/apiClient";
import { type AutomationMeterPayload } from "@editor-core/services/automationMeter";

export {
  type AutomationMeterInput,
  type AutomationMeterPayload,
} from "@editor-core/services/automationMeter";

export function meterAutomationRun(payload: AutomationMeterPayload): void {
  void apiClient
    .post(`/api/v1/automation/meter`, payload, { suppressErrorToast: true })
    .catch(() => {
      // Best-effort billing; the automation already succeeded in the browser.
    });
}