UNPKG

@vtex/api

Version:
30 lines (29 loc) 1.24 kB
import { Logger } from './../service/logger/logger'; import { ConflictsResolver, VBase } from '../clients/infra/VBase'; type Configuration = Record<string, ConfigurationData | ConfigurationData[] | object> | ConfigurationData[]; type ConfigurationData = Record<string, object>; export declare class MineWinsConflictsResolver<T> implements ConflictsResolver<T> { /*** * Take mine and merge with master keys that have no conflict * We use base to decide wether a key was deleted or not */ private client; private bucket; private filePath; private comparableKeys; constructor(client: VBase, bucket: string, filePath: string, comparableKeys?: string[]); resolve(logger?: Logger): Promise<any>; resolveAll(): Promise<Configuration[]>; protected mergeMineWins(base: Configuration, master: Configuration, mine: Configuration): Configuration; private parseConflict; private serializeContentByMimetype; private parseContentByMimetype; private resolveConflictMineWins; private mergeMineWinsObject; private mergeMineWinsArray; private removeMasterDeletedElements; private isObjectInArray; private appendMasterAddedElements; private shouldAddToMine; } export {};