Marketplace móvil para negocios locales mexicanos. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React Web) - apps/mobile (Expo/React Native) - apps/mcp-server (Claude MCP Server) - apps/whatsapp-service (WhatsApp Business API) - database/ (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
215 lines
10 KiB
JavaScript
215 lines
10 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);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.IntegrationStatusResponseDto = exports.IntegrationCredentialResponseDto = exports.CreateIntegrationCredentialDto = exports.UpsertLLMCredentialsDto = exports.UpsertWhatsAppCredentialsDto = exports.LLMConfigDto = exports.LLMCredentialsDto = exports.WhatsAppCredentialsDto = void 0;
|
|
const class_validator_1 = require("class-validator");
|
|
const class_transformer_1 = require("class-transformer");
|
|
const swagger_1 = require("@nestjs/swagger");
|
|
const tenant_integration_credential_entity_1 = require("../entities/tenant-integration-credential.entity");
|
|
class WhatsAppCredentialsDto {
|
|
}
|
|
exports.WhatsAppCredentialsDto = WhatsAppCredentialsDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Access Token de Meta/WhatsApp Business API' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], WhatsAppCredentialsDto.prototype, "accessToken", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Phone Number ID de WhatsApp Business' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], WhatsAppCredentialsDto.prototype, "phoneNumberId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Business Account ID de WhatsApp' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], WhatsAppCredentialsDto.prototype, "businessAccountId", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Verify Token para webhook' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], WhatsAppCredentialsDto.prototype, "verifyToken", void 0);
|
|
class LLMCredentialsDto {
|
|
}
|
|
exports.LLMCredentialsDto = LLMCredentialsDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'API Key del proveedor LLM' }),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], LLMCredentialsDto.prototype, "apiKey", void 0);
|
|
class LLMConfigDto {
|
|
}
|
|
exports.LLMConfigDto = LLMConfigDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Modelo a usar', example: 'gpt-4o-mini' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], LLMConfigDto.prototype, "model", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Máximo de tokens', example: 1000 }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Number)
|
|
], LLMConfigDto.prototype, "maxTokens", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Temperatura (0-2)', example: 0.7 }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
__metadata("design:type", Number)
|
|
], LLMConfigDto.prototype, "temperature", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'System prompt personalizado' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], LLMConfigDto.prototype, "systemPrompt", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Base URL del API (para OpenRouter/Azure)' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], LLMConfigDto.prototype, "baseUrl", void 0);
|
|
class UpsertWhatsAppCredentialsDto {
|
|
}
|
|
exports.UpsertWhatsAppCredentialsDto = UpsertWhatsAppCredentialsDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ type: WhatsAppCredentialsDto }),
|
|
(0, class_validator_1.ValidateNested)(),
|
|
(0, class_transformer_1.Type)(() => WhatsAppCredentialsDto),
|
|
__metadata("design:type", WhatsAppCredentialsDto)
|
|
], UpsertWhatsAppCredentialsDto.prototype, "credentials", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Número de teléfono para display' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UpsertWhatsAppCredentialsDto.prototype, "phoneNumber", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Nombre para display' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsString)(),
|
|
__metadata("design:type", String)
|
|
], UpsertWhatsAppCredentialsDto.prototype, "displayName", void 0);
|
|
class UpsertLLMCredentialsDto {
|
|
}
|
|
exports.UpsertLLMCredentialsDto = UpsertLLMCredentialsDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ enum: tenant_integration_credential_entity_1.IntegrationProvider, description: 'Proveedor LLM' }),
|
|
(0, class_validator_1.IsEnum)(tenant_integration_credential_entity_1.IntegrationProvider),
|
|
__metadata("design:type", String)
|
|
], UpsertLLMCredentialsDto.prototype, "provider", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ type: LLMCredentialsDto }),
|
|
(0, class_validator_1.ValidateNested)(),
|
|
(0, class_transformer_1.Type)(() => LLMCredentialsDto),
|
|
__metadata("design:type", LLMCredentialsDto)
|
|
], UpsertLLMCredentialsDto.prototype, "credentials", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ type: LLMConfigDto }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.ValidateNested)(),
|
|
(0, class_transformer_1.Type)(() => LLMConfigDto),
|
|
__metadata("design:type", LLMConfigDto)
|
|
], UpsertLLMCredentialsDto.prototype, "config", void 0);
|
|
class CreateIntegrationCredentialDto {
|
|
}
|
|
exports.CreateIntegrationCredentialDto = CreateIntegrationCredentialDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ enum: tenant_integration_credential_entity_1.IntegrationType }),
|
|
(0, class_validator_1.IsEnum)(tenant_integration_credential_entity_1.IntegrationType),
|
|
__metadata("design:type", String)
|
|
], CreateIntegrationCredentialDto.prototype, "integrationType", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ enum: tenant_integration_credential_entity_1.IntegrationProvider }),
|
|
(0, class_validator_1.IsEnum)(tenant_integration_credential_entity_1.IntegrationProvider),
|
|
__metadata("design:type", String)
|
|
], CreateIntegrationCredentialDto.prototype, "provider", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Credenciales específicas del proveedor' }),
|
|
(0, class_validator_1.IsObject)(),
|
|
__metadata("design:type", Object)
|
|
], CreateIntegrationCredentialDto.prototype, "credentials", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Configuración adicional' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsObject)(),
|
|
__metadata("design:type", Object)
|
|
], CreateIntegrationCredentialDto.prototype, "config", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)({ description: 'Activar inmediatamente' }),
|
|
(0, class_validator_1.IsOptional)(),
|
|
(0, class_validator_1.IsBoolean)(),
|
|
__metadata("design:type", Boolean)
|
|
], CreateIntegrationCredentialDto.prototype, "isActive", void 0);
|
|
class IntegrationCredentialResponseDto {
|
|
}
|
|
exports.IntegrationCredentialResponseDto = IntegrationCredentialResponseDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", String)
|
|
], IntegrationCredentialResponseDto.prototype, "id", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ enum: tenant_integration_credential_entity_1.IntegrationType }),
|
|
__metadata("design:type", String)
|
|
], IntegrationCredentialResponseDto.prototype, "integrationType", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ enum: tenant_integration_credential_entity_1.IntegrationProvider }),
|
|
__metadata("design:type", String)
|
|
], IntegrationCredentialResponseDto.prototype, "provider", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)({ description: 'Indica si hay credenciales configuradas' }),
|
|
__metadata("design:type", Boolean)
|
|
], IntegrationCredentialResponseDto.prototype, "hasCredentials", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Boolean)
|
|
], IntegrationCredentialResponseDto.prototype, "isActive", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Boolean)
|
|
], IntegrationCredentialResponseDto.prototype, "isVerified", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
__metadata("design:type", Date)
|
|
], IntegrationCredentialResponseDto.prototype, "lastVerifiedAt", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
__metadata("design:type", String)
|
|
], IntegrationCredentialResponseDto.prototype, "verificationError", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Object)
|
|
], IntegrationCredentialResponseDto.prototype, "config", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Date)
|
|
], IntegrationCredentialResponseDto.prototype, "createdAt", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Date)
|
|
], IntegrationCredentialResponseDto.prototype, "updatedAt", void 0);
|
|
class IntegrationStatusResponseDto {
|
|
}
|
|
exports.IntegrationStatusResponseDto = IntegrationStatusResponseDto;
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Object)
|
|
], IntegrationStatusResponseDto.prototype, "whatsapp", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Object)
|
|
], IntegrationStatusResponseDto.prototype, "llm", void 0);
|
|
__decorate([
|
|
(0, swagger_1.ApiProperty)(),
|
|
__metadata("design:type", Object)
|
|
], IntegrationStatusResponseDto.prototype, "payments", void 0);
|
|
//# sourceMappingURL=integration-credentials.dto.js.map
|