"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.startApis = exports.Responses = void 0;
const course_1 = require("./course");
const discovery_1 = require("./discovery");
const resources_1 = require("./resources");
const weather_1 = require("./weather");
const autopilot_1 = require("./autopilot");
const radar_1 = require("./radar");
const history_1 = require("./history");
const notifications_1 = require("./notifications");
const streams_1 = require("./streams");
exports.Responses = {
    ok: {
        state: 'COMPLETED',
        statusCode: 200,
        message: 'OK'
    },
    invalid: {
        state: 'FAILED',
        statusCode: 400,
        message: `Invalid Data supplied.`
    },
    unauthorised: {
        state: 'FAILED',
        statusCode: 403,
        message: 'Unauthorised'
    },
    notFound: {
        state: 'FAILED',
        statusCode: 404,
        message: 'Resource not found.'
    },
    notImplemented: {
        state: 'FAILED',
        statusCode: 500,
        message: 'Not implemented.'
    }
};
const startApis = (app) => {
    const apiList = [];
    app.binaryStreamManager = streams_1.binaryStreamManager;
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    (0, streams_1.initializeBinaryStreams)(app);
    const resourcesApi = new resources_1.ResourcesApi(app);
    app.resourcesApi = resourcesApi;
    apiList.push('resources');
    const courseApi = new course_1.CourseApi(app, resourcesApi);
    app.courseApi = courseApi;
    apiList.push('course');
    const weatherApi = new weather_1.WeatherApi(app);
    app.weatherApi = weatherApi;
    apiList.push('weather');
    const autopilotApi = new autopilot_1.AutopilotApi(app);
    app.autopilotApi = autopilotApi;
    apiList.push('autopilot');
    const radarApi = new radar_1.RadarApi(app);
    app.radarApi = radarApi;
    apiList.push('radar');
    const featuresApi = new discovery_1.FeaturesApi(app);
    const historyApiHttpRegistry = new history_1.HistoryApiHttpRegistry(app);
    app.historyApiHttpRegistry = historyApiHttpRegistry;
    apiList.push('history');
    const notificationApi = new notifications_1.NotificationApi(app);
    app.notificationApi = notificationApi;
    apiList.push('notifications');
    Promise.all([
        resourcesApi.start(),
        courseApi.start(),
        weatherApi.start(),
        featuresApi.start(),
        autopilotApi.start(),
        radarApi.start(),
        historyApiHttpRegistry.start(),
        notificationApi.start()
    ]);
    return apiList;
};
exports.startApis = startApis;
//# sourceMappingURL=index.js.map