///
import { EventEmitter } from 'events';
import { CrudInterface, Database, InputStage, Stage } from 'brackets-model';
import { EntityChangedEvent, Storage } from './types';
import { Create } from './create';
import { Get } from './get';
import { Update } from './update';
import { Delete } from './delete';
import { Find } from './find';
import { Reset } from './reset';
export interface CallableCreate extends Create {
/**
* Creates a stage for an existing tournament. The tournament won't be created.
*
* @param stage A stage to create.
* @deprecated Please use `manager.create.stage()` instead.
*/
(stage: InputStage): Promise;
}
export interface BracketsManager {
on(eventName: 'entity.changed', listener: (event: EntityChangedEvent) => void): this;
}
/**
* A class to handle tournament management at those levels: `stage`, `group`, `round`, `match` and `match_game`.
*/
export declare class BracketsManager extends EventEmitter {
verbose: boolean;
storage: Storage;
get: Get;
update: Update;
delete: Delete;
find: Find;
reset: Reset;
create: CallableCreate;
/**
* Creates an instance of BracketsManager, which will handle all the stuff from the library.
*
* @param storageInterface An implementation of CrudInterface.
* @param verbose Whether to log CRUD operations.
*/
constructor(storageInterface: CrudInterface, verbose?: boolean);
/**
* Imports data in the database.
*
* @param data Data to import.
* @param normalizeIds Enable ID normalization: all IDs (and references to them) are remapped to consecutive IDs starting from 0.
*/
import(data: Database, normalizeIds?: boolean): Promise;
/**
* Exports data from the database.
*/
export(): Promise;
/**
* Add `console.log()` to storage methods in verbose mode.
*/
private instrumentStorage;
}
//# sourceMappingURL=manager.d.ts.map