"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function application(body) {
    let app = (body === null || body === void 0 ? void 0 : body.application) ? body.application : body;
    return {
        _id: app.appId,
        name: app.name,
        url: app.url,
        status: app.status,
        createdAt: app.createdAt,
        updatedAt: app.updatedAt,
        version: app.version,
        tenantId: app.tenantId,
        lockedBy: app.lockedBy,
    };
}
function mapApplication(ctx) {
    return {
        data: application(ctx.body),
    };
}
function mapApplications(ctx) {
    const apps = ctx.body.map((body) => application(body));
    return { data: apps };
}
exports.default = {
    mapApplication,
    mapApplications,
};
