import { AddCommand } from './commands/add-command'; import { BatchRemoveCommand } from './commands/batch-remove-command'; import { BatchUpdateCommand } from './commands/batch-update-command'; import { BulkAddCommand } from './commands/bulk-add-command'; import { BulkQueryCommand } from './commands/bulk-query-command'; import { BulkRemoveCommand } from './commands/bulk-remove-command'; import { BulkSaveCommand } from './commands/bulk-save-command'; import { BulkUpdateCommand } from './commands/bulk-update-command'; import { QueryCommand } from './commands/query-command'; import { RemoveCommand } from './commands/remove-command'; import { SaveCommand } from './commands/save-command'; import { UpdateCommand } from './commands/update-command'; import { Entity } from './entity'; import { EntityCollection } from './entity-collection'; import { Nullable } from './nullable'; import { PaginatedEntityCollection } from './paginated-entity-collection'; /** * Entity provider which executes passed commands. * * @type {EntityProvider} */ export interface EntityProvider { /** * Executes add command. * * @param {AddCommand} addCommand Add command. * * @returns {Promise} Added entity. */ executeAddCommand(addCommand: AddCommand): Promise; /** * Executes bulk add command. * * @param {BulkAddCommand} bulkAddCommand Bulk add command. * * @returns {Promise>} Added entity collection. */ executeBulkAddCommand(bulkAddCommand: BulkAddCommand): Promise>; /** * Executes update command. * * @param {UpdateCommand} updateCommand Update command. * * @returns {Promise} Updated entity. */ executeUpdateCommand(updateCommand: UpdateCommand): Promise; /** * Executes bulk update command. * * @param {BulkUpdateCommand} bulkUpdateCommand Bulk update command. * * @returns {Promise>} Updated entity collection. */ executeBulkUpdateCommand(bulkUpdateCommand: BulkUpdateCommand): Promise>; /** * Executes batch update command. * * @param {BatchUpdateCommand} batchUpdateCommand Batch update command. * * @returns {Promise} Promise to update an entity collection. */ executeBatchUpdateCommand(batchUpdateCommand: BatchUpdateCommand): Promise; /** * Executes save command. * * @param {SaveCommand} saveCommand Save command. * * @returns {Promise} Saved entity. */ executeSaveCommand(saveCommand: SaveCommand): Promise; /** * Executes bulk save command. * * @param {BulkSaveCommand} bulkSaveCommand Bulk save command. * * @returns {Promise>} Saved entity collection. */ executeBulkSaveCommand(bulkSaveCommand: BulkSaveCommand): Promise>; /** * Executes query command. * * @param {QueryCommand} queryCommand Query command. * * @returns {Promise>} Entity or null. */ executeQueryCommand(queryCommand: QueryCommand): Promise>; /** * Executes bulk query command. * * @param {BulkQueryCommand} bulkQueryCommand Bulk query command. * * @returns {Promise>} Queried entity collection. */ executeBulkQueryCommand(bulkQueryCommand: BulkQueryCommand): Promise>; /** * Executes remove command. * * @param {RemoveCommand} removeCommand Remove command. * * @returns {Promise} Removed entity. */ executeRemoveCommand(removeCommand: RemoveCommand): Promise; /** * Executes bulk remove command. * * @param {BulkRemoveCommand} bulkRemoveCommand Bulk remove command. * * @returns {Promise>} Removed entity collection. */ executeBulkRemoveCommand(bulkRemoveCommand: BulkRemoveCommand): Promise>; /** * Executes batch remove command. * * @param {BatchRemoveCommand} batchRemoveCommand Batch remove command. * * @returns {Promise} Promise to remove an entity collection. */ executeBatchRemoveCommand(batchRemoveCommand: BatchRemoveCommand): Promise; } //# sourceMappingURL=entity-provider.d.ts.map