mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: get integrations sessions by type
This commit is contained in:
parent
a90617fa0c
commit
aeea61ef4b
1
manager/dist/assets/index-BJ9JMAl_.css
vendored
1
manager/dist/assets/index-BJ9JMAl_.css
vendored
File diff suppressed because one or more lines are too long
381
manager/dist/assets/index-BpEDJ12n.js
vendored
381
manager/dist/assets/index-BpEDJ12n.js
vendored
File diff suppressed because one or more lines are too long
1
manager/dist/assets/index-DvXIV-Pi.css
vendored
Normal file
1
manager/dist/assets/index-DvXIV-Pi.css
vendored
Normal file
File diff suppressed because one or more lines are too long
381
manager/dist/assets/index-PmD1d8Kz.js
vendored
Normal file
381
manager/dist/assets/index-PmD1d8Kz.js
vendored
Normal file
File diff suppressed because one or more lines are too long
4
manager/dist/index.html
vendored
4
manager/dist/index.html
vendored
@ -5,8 +5,8 @@
|
||||
<link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Evolution Manager</title>
|
||||
<script type="module" crossorigin src="/assets/index-BpEDJ12n.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-BJ9JMAl_.css">
|
||||
<script type="module" crossorigin src="/assets/index-PmD1d8Kz.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DvXIV-Pi.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "IntegrationSession" ADD COLUMN "type" VARCHAR(100);
|
@ -397,6 +397,7 @@ model IntegrationSession {
|
||||
status SessionStatus
|
||||
awaitUser Boolean @default(false) @db.Boolean
|
||||
context Json?
|
||||
type String? @db.VarChar(100)
|
||||
createdAt DateTime? @default(now()) @db.Timestamp
|
||||
updatedAt DateTime @updatedAt @db.Timestamp
|
||||
Message Message[]
|
||||
|
@ -649,6 +649,7 @@ export class DifyController extends ChatbotController implements ChatbotControll
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: bot ? botId : { not: null },
|
||||
type: 'dify',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
@ -29,6 +29,7 @@ export class DifyService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'dify',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -3,12 +3,12 @@ import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { PrismaRepository } from '@api/repository/repository.service';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { Flowise } from '@prisma/client';
|
||||
import { getConversationMessage } from '@utils/getConversationMessage';
|
||||
|
||||
import { ChatbotController, ChatbotControllerInterface, EmitData } from '../../chatbot.controller';
|
||||
import { FlowiseDto } from '../dto/flowise.dto';
|
||||
import { FlowiseService } from '../services/flowise.service';
|
||||
import { Flowise } from '@prisma/client';
|
||||
|
||||
export class FlowiseController extends ChatbotController implements ChatbotControllerInterface {
|
||||
constructor(
|
||||
@ -625,6 +625,7 @@ export class FlowiseController extends ChatbotController implements ChatbotContr
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: bot ? botId : { not: null },
|
||||
type: 'flowise',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
@ -28,6 +28,7 @@ export class FlowiseService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'flowise',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -625,6 +625,7 @@ export class GenericController extends ChatbotController implements ChatbotContr
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: bot ? botId : { not: null },
|
||||
type: 'generic',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
@ -28,6 +28,7 @@ export class GenericService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'generic',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -363,9 +363,6 @@ export class OpenaiController extends ChatbotController implements ChatbotContro
|
||||
where: {
|
||||
instanceId,
|
||||
},
|
||||
include: {
|
||||
sessions: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!bots.length) {
|
||||
@ -390,9 +387,6 @@ export class OpenaiController extends ChatbotController implements ChatbotContro
|
||||
where: {
|
||||
id: botId,
|
||||
},
|
||||
include: {
|
||||
sessions: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!bot) {
|
||||
@ -864,9 +858,7 @@ export class OpenaiController extends ChatbotController implements ChatbotContro
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: openaiBot ? botId : { not: null },
|
||||
},
|
||||
include: {
|
||||
OpenaiBot: true,
|
||||
type: 'openai',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
@ -244,6 +244,7 @@ export class OpenaiService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'openai',
|
||||
},
|
||||
});
|
||||
}
|
||||
@ -534,6 +535,7 @@ export class OpenaiService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.instanceId,
|
||||
type: 'openai',
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -911,6 +911,7 @@ export class TypebotController extends ChatbotController implements ChatbotContr
|
||||
instanceId: instanceId,
|
||||
remoteJid,
|
||||
botId: botId ?? { not: null },
|
||||
type: 'typebot',
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
|
@ -78,6 +78,7 @@ export class TypebotService {
|
||||
awaitUser: false,
|
||||
botId: data.botId,
|
||||
instanceId: instance.id,
|
||||
type: 'typebot',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ export class EventManager {
|
||||
if (data.websocket)
|
||||
await this.websocket.set(instanceName, {
|
||||
websocket: {
|
||||
enabled: data.websocket?.enabled,
|
||||
enabled: true,
|
||||
events: data.websocket?.events,
|
||||
},
|
||||
});
|
||||
@ -107,7 +107,7 @@ export class EventManager {
|
||||
if (data.rabbitmq)
|
||||
await this.rabbitmq.set(instanceName, {
|
||||
rabbitmq: {
|
||||
enabled: data.rabbitmq?.enabled,
|
||||
enabled: true,
|
||||
events: data.rabbitmq?.events,
|
||||
},
|
||||
});
|
||||
@ -115,7 +115,7 @@ export class EventManager {
|
||||
if (data.sqs)
|
||||
await this.sqs.set(instanceName, {
|
||||
sqs: {
|
||||
enabled: data.sqs?.enabled,
|
||||
enabled: true,
|
||||
events: data.sqs?.events,
|
||||
},
|
||||
});
|
||||
@ -123,7 +123,7 @@ export class EventManager {
|
||||
if (data.webhook)
|
||||
await this.webhook.set(instanceName, {
|
||||
webhook: {
|
||||
enabled: data.webhook?.enabled,
|
||||
enabled: true,
|
||||
events: data.webhook?.events,
|
||||
url: data.webhook?.url,
|
||||
base64: data.webhook?.base64,
|
||||
|
Loading…
Reference in New Issue
Block a user