"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const cron_1 = __importDefault(require("./cron"));
const crud_1 = __importDefault(require("./crud"));
const deployment_1 = __importDefault(require("./deployment"));
const versions_1 = __importDefault(require("./versions"));
const router = (0, express_1.Router)();
// cron.ts handles: GET /cron/status, PUT /:id/cron, DELETE /:id/cron
// Mount before crud so /cron/status doesn't match /:id
router.use(cron_1.default);
// crud.ts handles: GET /, POST /, GET /app-ids, GET /:id, PUT /:id,
//                  POST /:id/regenerate, DELETE /:id
router.use(crud_1.default);
// deployment.ts handles: POST /:id/deploy, POST /:id/activate,
//                        POST /:id/invoke, POST /:id/archive
router.use(deployment_1.default);
// versions.ts handles: GET /:id/versions, GET /:id/versions/:version,
//                      GET /:id/yaml
router.use(versions_1.default);
exports.default = router;
