import type { LaraClient } from "./net/lara"; import type { MultiPartFile } from "./net/lara/client"; export interface Memory { readonly id: string; readonly createdAt: Date; readonly updatedAt: Date; readonly sharedAt: Date; readonly name: string; readonly externalId?: string; readonly secret?: string; readonly ownerId: string; readonly collaboratorsCount: number; readonly isPersonal: boolean; } export interface MemoryImport { readonly id: string; readonly begin: number; readonly end: number; readonly channel: number; readonly size: number; readonly progress: number; } export type MemoryImportCallback = (memoryImport: MemoryImport) => void; export declare class Memories { private readonly client; private readonly pollingInterval; constructor(client: LaraClient); list(): Promise; create(name: string, externalId?: string): Promise; get(id: string): Promise; delete(id: string): Promise; update(id: string, name: string): Promise; connect(ids: T): Promise; importTmx(id: string, tmx: MultiPartFile): Promise; importTmx(id: string, tmx: MultiPartFile, gzip: boolean): Promise; importTmx(id: string, tmx: MultiPartFile, callbackUrl: string): Promise; importTmx(id: string, tmx: MultiPartFile, gzip: boolean, callbackUrl: string): Promise; exportAsync(id: string, callbackUrl: string, format?: "tmx" | "jtm"): Promise<{ jobId: string; }>; addTranslation(id: string | string[], source: string, target: string, sentence: string, translation: string, tuid?: string, sentenceBefore?: string, sentenceAfter?: string, headers?: Record): Promise; deleteTranslation(id: string | string[], source: string, target: string, sentence?: string, translation?: string, tuid?: string, sentenceBefore?: string, sentenceAfter?: string): Promise; getImportStatus(id: string): Promise; waitForImport(mImport: MemoryImport, updateCallback?: MemoryImportCallback, maxWaitTime?: number): Promise; }