export type { QueryResult, DescribeSObjectResult, DescribeFieldResult, DescribeGlobalResult, DescribeGlobalSObjectResult, ExecuteAnonymousResult, PicklistEntry, ChildRelationship, RecordTypeInfo, IConnectionFacade, IToolingApi, ISObjectApi, ISObjectQueryBuilder, HttpRequest, } from './connection-facade.js'; export type { ServiceResult, ServiceResultMetadata } from '../models/service-result.js'; export { createSuccessResult, createFailureResult } from '../models/service-result.js'; export { AdapterErrorCodes, mapSalesforceError, ErrorCodeDescriptions, type AdapterErrorCode } from './errors.js'; /** * Default cache TTL value (5 minutes in milliseconds). * * The 5-minute default balances freshness with performance: * - Short enough to reflect metadata changes within a typical development session * - Long enough to avoid redundant API calls during iterative operations * - Configurable via `CUNEIFORM_CACHE_TTL` environment variable for different use cases */ export declare const DEFAULT_CACHE_TTL = 300000; /** * Minimum API version required for adapter operations. * * This is set to API version 50.0 (Winter '21) which includes: * - Enhanced Tooling API support for custom fields and validation rules * - Improved SOQL query capabilities * - ExecuteAnonymous improvements */ export declare const MINIMUM_API_VERSION = 50; /** * Parses an API version string to a numeric value. * * @param version - Version string (e.g., "50.0", "v50.0", "50") * @returns Numeric version or undefined if invalid * * @example * ```typescript * parseApiVersion('50.0'); // Returns 50.0 * parseApiVersion('v52.0'); // Returns 52.0 * parseApiVersion('invalid'); // Returns undefined * ``` */ export declare function parseApiVersion(version: string | undefined): number | undefined; /** * Checks if an API version meets the minimum requirement. * * @param version - Version string or number to check * @param minimum - Minimum required version (default: MINIMUM_API_VERSION) * @returns true if version meets or exceeds minimum, false otherwise * * @example * ```typescript * isApiVersionSupported('52.0'); // Returns true * isApiVersionSupported('48.0'); // Returns false * isApiVersionSupported('52.0', 55); // Returns false * ``` */ export declare function isApiVersionSupported(version: string | number | undefined, minimum?: number): boolean; /** * Asserts that an API version meets the minimum requirement. * * @param version - Version string or number to check * @param operation - Operation name for error message * @param minimum - Minimum required version (default: MINIMUM_API_VERSION) * @throws Error if version is below minimum * * @example * ```typescript * assertApiVersion('52.0', 'queryCustomFields'); // No error * assertApiVersion('48.0', 'queryCustomFields'); // Throws Error * ``` */ export declare function assertApiVersion(version: string | number | undefined, operation: string, minimum?: number): void; /** * Logs a warning if the API version is below minimum. * * Unlike assertApiVersion, this doesn't throw an error but logs a warning * to the provided logger. This is useful for adapters that should work * with older API versions but may have degraded functionality. * * If no logger is provided, falls back to console.warn to ensure * version warnings are always visible. * * @param version - Version string or number to check * @param operation - Operation name for the warning message * @param logger - Logger to use for the warning (falls back to console.warn) * @param minimum - Minimum required version (default: MINIMUM_API_VERSION) * @returns true if version is supported, false if warning was logged * * @example * ```typescript * warnApiVersion('48.0', 'RestApiAdapter', console); // Logs warning, returns false * warnApiVersion('52.0', 'RestApiAdapter', console); // No warning, returns true * warnApiVersion('48.0', 'RestApiAdapter'); // Logs to console.warn, returns false * ``` */ export declare function warnApiVersion(version: string | number | undefined, operation: string, logger?: Console, minimum?: number): boolean; /** * Gets the cache TTL from config or environment. * * TTL priority (highest to lowest): * 1. `configTtl` parameter (programmatic override) * 2. `CUNEIFORM_CACHE_TTL` environment variable (in milliseconds) * 3. `DEFAULT_CACHE_TTL` constant (300,000ms = 5 minutes) * * @param configTtl - Optional TTL from adapter config (in milliseconds) * @returns TTL in milliseconds * * @example * ```typescript * // Use environment variable * process.env.CUNEIFORM_CACHE_TTL = '60000'; // 1 minute * const ttl = getCacheTtl(); // Returns 60000 * * // Override with config * const ttl = getCacheTtl(120000); // Returns 120000 (2 minutes) * ``` */ export declare function getCacheTtl(configTtl?: number): number;