import { type ServiceResult } from '../models/service-result.js'; import { CompatibilityService, type CompatibilityState } from '../services/CompatibilityService.js'; import { type OrgInfoService } from '../services/OrgInfoService.js'; /** Error codes specific to the compatibility-check operation. */ export declare const CompatibilityErrorCodes: { /** Manifest is missing required fields (re-raised from CompatibilityService). */ readonly MANIFEST_INVALID: "E4681"; /** Manifest CLI version field is missing. */ readonly CLI_VERSION_MISSING: "E4684"; /** Failed to query installed package version from the org. */ readonly ORG_PACKAGE_QUERY_FAILED: "E4683"; }; /** * Result payload of the compatibility check. * * `installed` is present only when an org check was performed (caller passed an * `OrgInfoService`). When absent, the result describes only the CLI's * requirement (no Salesforce API call was made). */ export type CompatibilityResult = { /** CLI plugin version (from `package.json` `version` field). */ cliVersion: string; /** Display name of the Cuneiform For Salesforce managed package. */ appName: string; /** Minimum-required app version (from `package.json` `cuneiform.requiredAppVersion`). */ requiredAppVersion: string; /** Org-side details, present only when a target org was supplied. */ installed?: { /** Installed version string, or `null` when the package is not installed. */ version: string | null; /** Compatibility outcome relative to the required version. */ state: CompatibilityState; }; }; /** Options for {@link CompatibilityCheckOperation.execute}. */ export type CompatibilityCheckOptions = { /** * When provided, the operation queries the org for the installed Cuneiform * For Salesforce package and includes installed-version detail in the result. * When omitted, the result describes only the CLI's requirement. */ orgInfoService?: OrgInfoService; }; /** * Orchestrates compatibility resolution between the running CLI and (optionally) * the Cuneiform For Salesforce package installed in a target org. * * Always returns required and CLI versions. When an `OrgInfoService` is supplied * via {@link execute}, also queries `getCuneiformPackageInfo()` and computes the * comparison state via {@link CompatibilityService.compare}. */ export declare class CompatibilityCheckOperation { private readonly compatibilityService; constructor(compatibilityService: CompatibilityService); /** * Run the compatibility check. * * @param options - optionally supply an `OrgInfoService` to query the target org * @returns ServiceResult describing the CLI requirement and (when org-checked) the installed state */ execute(options?: CompatibilityCheckOptions): Promise>; }