"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const express_1 = tslib_1.__importDefault(require("express"));
const _1 = require(".");
const app = (0, express_1.default)();
const port = 5000;
const TIMETRACK_ID = "REPORT_CREATION";
const _data = {
    type: "Employee",
    params: {
        header: [
            { name: "Michael Black" },
            { jobRole: "Software engineer" },
            { organization: "Thrive" },
            { assesedDate: "12/12/2022" },
        ],
        competencies: {
            strength: [
                {
                    skill: "expertise",
                    marked: true,
                    text: "This assessment measures your logical thinking ability and consequently your inductive reasoning. Inductive reasoning is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                },
                {
                    skill: "influence",
                    marked: false,
                    text: "This assessment measures your logical thinking ability and consequently your inductive reasoning. Inductive reasoning is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                },
                {
                    skill: "innovation",
                    marked: false,
                    text: "This assessment measures your logical thinking ability and consequently your inductive reasoning. Inductive reasoning is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                },
            ],
            weakness: [
                {
                    skill: "leadership",
                    marked: false,
                    text: "This assessment measures your logical thinking ability and consequently your inductive reasoning. Inductive reasoning is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                },
                {
                    skill: "teamwork",
                    marked: false,
                    text: "This assessment measures your logical thinking ability and consequently your inductive reasoning. Inductive reasoning is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                },
                {
                    skill: "initiativeResponsibility",
                    marked: false,
                    text: "This assessment measures your logical thinking ability and consequently your inductive reasoning. Inductive reasoning is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                },
            ],
        },
        //16 personalities
        personality: [
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "teamwork",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
            {
                skill: "driveFocus",
                marked: true,
                result: "Well above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 89,
            },
            {
                skill: "teamwork",
                marked: false,
                result: "Above average",
                text: "This assessment measures basic numeracy on the basis of the four basic arithmetic operations. A conscientious handling with numbers and a confident mastery of the four basic arithmetic operations is vitally important in certain occupational areas. Compared to other participants, it is easier for you to handle the tasks in this assessment successfully.",
                barValue: 67,
            },
        ],
        waysToDevelop: [
            {
                skill: "visionAndStrategy",
                marked: true,
                texts: [
                    "Set yourself targets and specific goals. These might be small daily goals, or longer-term achievements that you are working towards.",
                    "Try to envision the path to achieving your goals, anticipating any obstacles and considering how you might overcome these Set a schedule for your week and day, including realistic targets, timings and deadlines for task completion.",
                    "Identify tangible rewards to help keep you focused and motivated. For example, having a 15 minute break to watch your favourite show once you've completed an important task, before moving on to the next.",
                ],
            },
            {
                skill: "commercialGrowth",
                marked: true,
                texts: [
                    "Set yourself targets and specific goals. These might be small daily goals, or longer-term achievements that you are working towards.",
                    "Try to envision the path to achieving your goals, anticipating any obstacles and considering how you might overcome these Set a schedule for your week and day, including realistic targets, timings and deadlines for task completion.",
                    "Identify tangible rewards to help keep you focused and motivated. For example, having a 15 minute break to watch your favourite show once you've completed an important task, before moving on to the next.",
                ],
            },
            {
                skill: "visionAndStrategy",
                marked: false,
                texts: [
                    "Set yourself targets and specific goals. These might be small daily goals, or longer-term achievements that you are working towards.",
                    "Try to envision the path to achieving your goals, anticipating any obstacles and considering how you might overcome these Set a schedule for your week and day, including realistic targets, timings and deadlines for task completion.",
                    "Identify tangible rewards to help keep you focused and motivated. For example, having a 15 minute break to watch your favourite show once you've completed an important task, before moving on to the next.",
                ],
            },
            {
                skill: "commercialGrowth",
                marked: false,
                texts: [
                    "Set yourself targets and specific goals. These might be small daily goals, or longer-term achievements that you are working towards.",
                    "Try to envision the path to achieving your goals, anticipating any obstacles and considering how you might overcome these Set a schedule for your week and day, including realistic targets, timings and deadlines for task completion.",
                    "Identify tangible rewards to help keep you focused and motivated. For example, having a 15 minute break to watch your favourite show once you've completed an important task, before moving on to the next.",
                ],
            },
        ],
    },
};
app.get("/", async (_, res) => {
    console.time(TIMETRACK_ID);
    try {
        const buffer = await (0, _1.createReport)(_data, _data.type);
        res.set({
            "Content-Disposition": "attachment; filename=Employee.pdf",
            "Content-Type": "application/pdf; charset=utf-8",
        });
        res.write(buffer);
        res.end();
        console.timeEnd(TIMETRACK_ID);
    }
    catch (e) {
        console.error(e);
    }
});
app.listen(port, () => {
    console.log(`Test server listening on port ${port}`);
});
//# sourceMappingURL=server.js.map