Add N8n integration with models, services, and routes

- Introduced N8n and N8nSetting models in both MySQL and PostgreSQL schemas.
- Implemented N8nController and N8nService for managing N8n bots.
- Created N8nRouter for handling API requests related to N8n.
- Added DTOs and validation schemas for N8n integration.
- Updated server module and chatbot controller to include N8n functionality.
- Configured environment settings for N8n integration.
This commit is contained in:
Guilherme Gomes
2025-05-14 20:47:23 -03:00
parent 6d63f2fb6e
commit 38f089f04c
14 changed files with 1708 additions and 5 deletions

View File

@@ -253,6 +253,7 @@ export type Chatwoot = {
};
export type Openai = { ENABLED: boolean; API_KEY_GLOBAL?: string };
export type Dify = { ENABLED: boolean };
export type N8n = { ENABLED: boolean };
export type S3 = {
ACCESS_KEY: string;
@@ -292,6 +293,7 @@ export interface Env {
CHATWOOT: Chatwoot;
OPENAI: Openai;
DIFY: Dify;
N8N: N8n;
CACHE: CacheConf;
S3?: S3;
AUTHENTICATION: Auth;
@@ -587,6 +589,9 @@ export class ConfigService {
DIFY: {
ENABLED: process.env?.DIFY_ENABLED === 'true',
},
N8N: {
ENABLED: process.env?.N8N_ENABLED === 'true',
},
CACHE: {
REDIS: {
ENABLED: process.env?.CACHE_REDIS_ENABLED === 'true',