import { type ApiBudgetResult } from '@simplysf/simply-core'; import type { Connection } from '@salesforce/core'; /** Default share of the org's remaining API requests a single run may consume. */ export declare const DEFAULT_MAX_API_USAGE = 20; /** * `--max-api-usage`, shared by every command that can count its requests in advance. * * Declared once so the three file commands cannot drift apart on the default or the bounds. */ export declare const apiBudgetFlags: { 'max-api-usage': import("@oclif/core/interfaces").OptionFlag; }; /** * Check a planned run against the org's remaining API allocation, and stop it if it does not fit. * * Call this before making any of the requests being counted — the value of the check is entirely * in nothing having happened when it fails. * * @param connection - The org connection. * @param plannedRequests - How many API requests the run is about to make. * @param maxUsagePercent - The `--max-api-usage` value. * @param warn - Called when the allocation could not be read, so the command can surface it. * @returns The check result, for inclusion in the command's JSON output. * @throws {SfError} If the run would exceed its budget. */ export declare function assertApiBudget(connection: Connection, plannedRequests: number, maxUsagePercent: number, warn: (message: string) => void): Promise;