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>
110 lines
5.2 KiB
JavaScript
110 lines
5.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);
|
|
};
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.TenantIntegrationCredential = exports.IntegrationProvider = exports.IntegrationType = void 0;
|
|
const typeorm_1 = require("typeorm");
|
|
const tenant_entity_1 = require("../../auth/entities/tenant.entity");
|
|
var IntegrationType;
|
|
(function (IntegrationType) {
|
|
IntegrationType["WHATSAPP"] = "whatsapp";
|
|
IntegrationType["LLM"] = "llm";
|
|
IntegrationType["STRIPE"] = "stripe";
|
|
IntegrationType["MERCADOPAGO"] = "mercadopago";
|
|
IntegrationType["CLIP"] = "clip";
|
|
})(IntegrationType || (exports.IntegrationType = IntegrationType = {}));
|
|
var IntegrationProvider;
|
|
(function (IntegrationProvider) {
|
|
IntegrationProvider["META"] = "meta";
|
|
IntegrationProvider["OPENAI"] = "openai";
|
|
IntegrationProvider["OPENROUTER"] = "openrouter";
|
|
IntegrationProvider["ANTHROPIC"] = "anthropic";
|
|
IntegrationProvider["OLLAMA"] = "ollama";
|
|
IntegrationProvider["AZURE_OPENAI"] = "azure_openai";
|
|
IntegrationProvider["STRIPE"] = "stripe";
|
|
IntegrationProvider["MERCADOPAGO"] = "mercadopago";
|
|
IntegrationProvider["CLIP"] = "clip";
|
|
})(IntegrationProvider || (exports.IntegrationProvider = IntegrationProvider = {}));
|
|
let TenantIntegrationCredential = class TenantIntegrationCredential {
|
|
};
|
|
exports.TenantIntegrationCredential = TenantIntegrationCredential;
|
|
__decorate([
|
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "id", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'tenant_id', type: 'uuid' }),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "tenantId", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.ManyToOne)(() => tenant_entity_1.Tenant, { onDelete: 'CASCADE' }),
|
|
(0, typeorm_1.JoinColumn)({ name: 'tenant_id' }),
|
|
__metadata("design:type", tenant_entity_1.Tenant)
|
|
], TenantIntegrationCredential.prototype, "tenant", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({
|
|
name: 'integration_type',
|
|
type: 'enum',
|
|
enum: IntegrationType,
|
|
}),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "integrationType", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({
|
|
type: 'enum',
|
|
enum: IntegrationProvider,
|
|
}),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "provider", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'jsonb', default: {} }),
|
|
__metadata("design:type", Object)
|
|
], TenantIntegrationCredential.prototype, "credentials", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ type: 'jsonb', default: {} }),
|
|
__metadata("design:type", Object)
|
|
], TenantIntegrationCredential.prototype, "config", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'is_active', default: true }),
|
|
__metadata("design:type", Boolean)
|
|
], TenantIntegrationCredential.prototype, "isActive", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'is_verified', default: false }),
|
|
__metadata("design:type", Boolean)
|
|
], TenantIntegrationCredential.prototype, "isVerified", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'last_verified_at', type: 'timestamptz', nullable: true }),
|
|
__metadata("design:type", Date)
|
|
], TenantIntegrationCredential.prototype, "lastVerifiedAt", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'verification_error', type: 'text', nullable: true }),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "verificationError", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'created_by', type: 'uuid', nullable: true }),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "createdBy", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.Column)({ name: 'updated_by', type: 'uuid', nullable: true }),
|
|
__metadata("design:type", String)
|
|
], TenantIntegrationCredential.prototype, "updatedBy", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
__metadata("design:type", Date)
|
|
], TenantIntegrationCredential.prototype, "createdAt", void 0);
|
|
__decorate([
|
|
(0, typeorm_1.UpdateDateColumn)({ name: 'updated_at' }),
|
|
__metadata("design:type", Date)
|
|
], TenantIntegrationCredential.prototype, "updatedAt", void 0);
|
|
exports.TenantIntegrationCredential = TenantIntegrationCredential = __decorate([
|
|
(0, typeorm_1.Entity)({ schema: 'public', name: 'tenant_integration_credentials' }),
|
|
(0, typeorm_1.Unique)(['tenantId', 'integrationType', 'provider'])
|
|
], TenantIntegrationCredential);
|
|
//# sourceMappingURL=tenant-integration-credential.entity.js.map
|