import type { LokaliseApi, QueuedProcess } from "@lokalise/node-api"; import type { LogFunction, LogLevel, LogThreshold } from "kliedz"; import type { RetryParams } from "../../../lib/interfaces/index.js"; import { LokaliseFileExchange } from "../../../lib/services/LokaliseFileExchange.js"; // Public morozov export class FakeLokaliseFileExchange extends LokaliseFileExchange { getLogger(): LogFunction { return this.logger; } getApiClient(): LokaliseApi { return this.apiClient; } getLogThreshold(): LogThreshold { return this.logThreshold; } public async withExponentialBackoff( operation: () => Promise, ): Promise { return await super.withExponentialBackoff(operation); } public async getUpdatedProcess(processId: string): Promise { return await super.getUpdatedProcess(processId); } public async pollProcesses( processes: QueuedProcess[], initialWaitTime: number, maxWaitTime: number, ): Promise { return await super.pollProcesses(processes, initialWaitTime, maxWaitTime); } public logMsg(level: LogLevel, ...args: unknown[]): void { super.logMsg(level, ...args); } public async fetchProcessesBatch( processIds: string[], concurrency = LokaliseFileExchange.maxConcurrentProcesses, ): Promise> { return await super.fetchProcessesBatch(processIds, concurrency); } public calculateSleepMs(retryParams: RetryParams, attempt: number): number { return super.calculateSleepMs(retryParams, attempt); } }