//#region src/offline-eval.d.ts /** * Posts one offline eval run into the customer's Amplitude project. * This is not event ingest. The project API key and secret key travel on * this request only and are never passed to the analytics client. */ type OfflineEvalServerZone = 'US' | 'EU'; interface ReportOfflineEvalOptions { apiKey?: string; secretKey?: string; serverZone?: OfflineEvalServerZone; /** * Overrides the zone host. Use this for staging. Must be `https://`; * plain `http://` is accepted only for localhost. */ host?: string; fetchImpl?: typeof fetch; /** Per-attempt request timeout. Default 30 000 ms. */ timeoutMs?: number; } interface OfflineEvalUploadResult { result_id: string; replayed: boolean; group_id: string | null; counts: { arms: number; rows: number; labels: number; }; warnings: Array<{ field: string; code: string; count: number; }>; } interface OfflineEvalValidationError { field: string; code: string; } declare class OfflineEvalUploadError extends Error { readonly status: number; readonly code: string; readonly retryable: boolean; readonly validationErrors: OfflineEvalValidationError[]; constructor(status: number, code: string, retryable: boolean, validationErrors?: OfflineEvalValidationError[]); } /** Seconds to wait. A missing, non-numeric, negative, or non-finite header waits 1. */ declare function offlineEvalRetryDelaySeconds(header: string | null): number; declare function reportOfflineEval(document: unknown, options?: ReportOfflineEvalOptions): Promise; //#endregion export { OfflineEvalServerZone, OfflineEvalUploadError, OfflineEvalUploadResult, OfflineEvalValidationError, ReportOfflineEvalOptions, offlineEvalRetryDelaySeconds, reportOfflineEval }; //# sourceMappingURL=offline-eval.d.ts.map