- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
80 lines
3.2 KiB
JavaScript
80 lines
3.2 KiB
JavaScript
"use strict";
|
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
};
|
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
};
|
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.PlansController = void 0;
|
|
const common_1 = require("@nestjs/common");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const plans_service_1 = require("../services/plans.service");
|
|
const plan_response_dto_1 = require("../dto/plan-response.dto");
|
|
const public_decorator_1 = require("../../auth/decorators/public.decorator");
|
|
let PlansController = class PlansController {
|
|
constructor(plansService) {
|
|
this.plansService = plansService;
|
|
}
|
|
async findAll() {
|
|
return this.plansService.findAll();
|
|
}
|
|
async findOne(id) {
|
|
return this.plansService.findOne(id);
|
|
}
|
|
};
|
|
exports.PlansController = PlansController;
|
|
__decorate([
|
|
(0, common_1.Get)(),
|
|
(0, public_decorator_1.Public)(),
|
|
(0, swagger_1.ApiOperation)({
|
|
summary: 'List all available plans',
|
|
description: 'Returns all visible and active pricing plans ordered by sort_order',
|
|
}),
|
|
(0, swagger_1.ApiResponse)({
|
|
status: 200,
|
|
description: 'List of available plans',
|
|
type: [plan_response_dto_1.PlanResponseDto],
|
|
}),
|
|
__metadata("design:type", Function),
|
|
__metadata("design:paramtypes", []),
|
|
__metadata("design:returntype", Promise)
|
|
], PlansController.prototype, "findAll", null);
|
|
__decorate([
|
|
(0, common_1.Get)(':id'),
|
|
(0, public_decorator_1.Public)(),
|
|
(0, swagger_1.ApiOperation)({
|
|
summary: 'Get a single plan by ID',
|
|
description: 'Returns detailed information about a specific plan',
|
|
}),
|
|
(0, swagger_1.ApiParam)({
|
|
name: 'id',
|
|
description: 'Plan UUID',
|
|
type: 'string',
|
|
}),
|
|
(0, swagger_1.ApiResponse)({
|
|
status: 200,
|
|
description: 'Plan details',
|
|
type: plan_response_dto_1.PlanDetailResponseDto,
|
|
}),
|
|
(0, swagger_1.ApiResponse)({
|
|
status: 404,
|
|
description: 'Plan not found',
|
|
}),
|
|
__param(0, (0, common_1.Param)('id')),
|
|
__metadata("design:type", Function),
|
|
__metadata("design:paramtypes", [String]),
|
|
__metadata("design:returntype", Promise)
|
|
], PlansController.prototype, "findOne", null);
|
|
exports.PlansController = PlansController = __decorate([
|
|
(0, swagger_1.ApiTags)('plans'),
|
|
(0, common_1.Controller)('plans'),
|
|
__metadata("design:paramtypes", [plans_service_1.PlansService])
|
|
], PlansController);
|
|
//# sourceMappingURL=plans.controller.js.map
|