"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function row(body) {
    delete body._rev;
    // have to input everything, since structure unknown
    return Object.assign(Object.assign({}, body), { _id: body._id, tableId: body.tableId });
}
function mapRowSearch(ctx) {
    const rows = ctx.body.rows.map((body) => row(body));
    return {
        data: rows,
        hasNextPage: ctx.body.hasNextPage,
        bookmark: ctx.body.bookmark,
    };
}
function mapRow(ctx) {
    return {
        data: row(ctx.body),
    };
}
exports.default = {
    mapRowSearch,
    mapRow,
};
