@fabric-es/fabric-cqrs
Version:
Hyperledger Fabric middleware for event sourcing and cqrs pattern
22 lines • 913 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.commandGetByEntityIdCommitId = void 0;
const command_1 = require("../store/command");
const _1 = require(".");
const commandGetByEntityIdCommitId = (entityName, isPrivateData, { store, logger, connectionProfile, channelName, wallet }) => _1.dispatcher(({ tx_id, args: { id, commitId } }) => command_1.action.queryByEntIdCommitId({
tx_id,
connectionProfile,
wallet,
channelName,
args: { entityName, commitId, id, isPrivateData },
}), {
name: 'queryByEntIdCommitId',
store,
slice: 'write',
SuccessAction: command_1.action.QUERY_SUCCESS,
ErrorAction: command_1.action.QUERY_ERROR,
logger,
typeGuard: _1.isCommitRecord,
}, (result) => Object.values(result));
exports.commandGetByEntityIdCommitId = commandGetByEntityIdCommitId;
//# sourceMappingURL=commandGetByEntityIdCommitId.js.map