- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8 - Actualizaciones de configuracion Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
71 lines
3.5 KiB
JavaScript
71 lines
3.5 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.OnboardingController = void 0;
|
|
const common_1 = require("@nestjs/common");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const onboarding_service_1 = require("./onboarding.service");
|
|
const jwt_auth_guard_1 = require("../auth/guards/jwt-auth.guard");
|
|
const current_user_decorator_1 = require("../auth/decorators/current-user.decorator");
|
|
const dto_1 = require("./dto");
|
|
let OnboardingController = class OnboardingController {
|
|
constructor(onboardingService) {
|
|
this.onboardingService = onboardingService;
|
|
}
|
|
async getStatus(user) {
|
|
return this.onboardingService.getStatus(user.tenant_id);
|
|
}
|
|
async completeOnboarding(user) {
|
|
return this.onboardingService.completeOnboarding(user.tenant_id, user.id);
|
|
}
|
|
};
|
|
exports.OnboardingController = OnboardingController;
|
|
__decorate([
|
|
(0, common_1.Get)('status'),
|
|
(0, swagger_1.ApiOperation)({ summary: 'Get onboarding status for current tenant' }),
|
|
(0, swagger_1.ApiResponse)({
|
|
status: 200,
|
|
description: 'Current onboarding status',
|
|
type: dto_1.OnboardingStatusDto,
|
|
}),
|
|
(0, swagger_1.ApiResponse)({ status: 401, description: 'Unauthorized' }),
|
|
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
__metadata("design:type", Function),
|
|
__metadata("design:paramtypes", [Object]),
|
|
__metadata("design:returntype", Promise)
|
|
], OnboardingController.prototype, "getStatus", null);
|
|
__decorate([
|
|
(0, common_1.Post)('complete'),
|
|
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
(0, swagger_1.ApiOperation)({ summary: 'Complete the onboarding process' }),
|
|
(0, swagger_1.ApiResponse)({
|
|
status: 200,
|
|
description: 'Onboarding completed successfully',
|
|
type: dto_1.CompleteOnboardingResponseDto,
|
|
}),
|
|
(0, swagger_1.ApiResponse)({ status: 400, description: 'Bad request - Invalid tenant state' }),
|
|
(0, swagger_1.ApiResponse)({ status: 401, description: 'Unauthorized' }),
|
|
__param(0, (0, current_user_decorator_1.CurrentUser)()),
|
|
__metadata("design:type", Function),
|
|
__metadata("design:paramtypes", [Object]),
|
|
__metadata("design:returntype", Promise)
|
|
], OnboardingController.prototype, "completeOnboarding", null);
|
|
exports.OnboardingController = OnboardingController = __decorate([
|
|
(0, swagger_1.ApiTags)('onboarding'),
|
|
(0, common_1.Controller)('onboarding'),
|
|
(0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard),
|
|
(0, swagger_1.ApiBearerAuth)(),
|
|
__metadata("design:paramtypes", [onboarding_service_1.OnboardingService])
|
|
], OnboardingController);
|
|
//# sourceMappingURL=onboarding.controller.js.map
|