fix: Added description column on typebot, dify and openai

This commit is contained in:
Davidson Gomes 2024-08-03 13:51:24 -03:00
parent 8438c442b4
commit 2aa0e08ae4
14 changed files with 56 additions and 37 deletions

View File

@ -7,6 +7,7 @@
* Resolve issue with connecting to instance
* Session is now individual per instance and remoteJid
* Credentials verify on manager login
* Added description column on typebot, dify and openai
# 2.0.6-rc (2024-08-02 19:23)

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<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-CiiVZ4Gt.js"></script>
<script type="module" crossorigin src="/assets/index-TzTbeCvz.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DZ0gaAHg.css">
</head>
<body>

View File

@ -0,0 +1,8 @@
-- AlterTable
ALTER TABLE "Dify" ADD COLUMN "description" VARCHAR(255);
-- AlterTable
ALTER TABLE "OpenaiBot" ADD COLUMN "description" VARCHAR(255);
-- AlterTable
ALTER TABLE "Typebot" ADD COLUMN "description" VARCHAR(255);

View File

@ -282,6 +282,7 @@ model Websocket {
model Typebot {
id String @id @default(cuid())
enabled Boolean @default(true) @db.Boolean
description String? @db.VarChar(255)
url String @db.VarChar(500)
typebot String @db.VarChar(100)
expire Int? @default(0) @db.Integer

View File

@ -10,6 +10,7 @@ export class Session {
export class DifyDto {
enabled?: boolean;
description?: string;
botType?: $Enums.DifyBotType;
apiUrl?: string;
apiKey?: string;

View File

@ -118,6 +118,7 @@ export class DifyService {
const dify = await this.prismaRepository.dify.create({
data: {
enabled: data.enabled,
description: data.description,
botType: data.botType,
apiUrl: data.apiUrl,
apiKey: data.apiKey,

View File

@ -25,6 +25,7 @@ export const difySchema: JSONSchema7 = {
type: 'object',
properties: {
enabled: { type: 'boolean' },
description: { type: 'string' },
botType: { type: 'string', enum: ['chatBot', 'textGenerator', 'agent', 'workflow'] },
apiUrl: { type: 'string' },
apiKey: { type: 'string' },

View File

@ -15,6 +15,7 @@ export class OpenaiCredsDto {
export class OpenaiDto {
enabled?: boolean;
description?: string;
openaiCredsId: string;
botType?: string;
assistantId?: string;

View File

@ -238,6 +238,7 @@ export class OpenaiService {
const openaiBot = await this.prismaRepository.openaiBot.create({
data: {
enabled: data.enabled,
description: data.description,
openaiCredsId: data.openaiCredsId,
botType: data.botType,
assistantId: data.assistantId,

View File

@ -25,6 +25,7 @@ export const openaiSchema: JSONSchema7 = {
type: 'object',
properties: {
enabled: { type: 'boolean' },
description: { type: 'string' },
openaiCredsId: { type: 'string' },
botType: { type: 'string', enum: ['assistant', 'chatCompletion'] },
assistantId: { type: 'string' },

View File

@ -18,6 +18,7 @@ export class PrefilledVariables {
export class TypebotDto {
enabled?: boolean;
description?: string;
url: string;
typebot?: string;
expire?: number;

View File

@ -118,6 +118,7 @@ export class TypebotService {
const typebot = await this.prismaRepository.typebot.create({
data: {
enabled: data.enabled,
description: data.description,
url: data.url,
typebot: data.typebot,
expire: data.expire,

View File

@ -25,6 +25,7 @@ export const typebotSchema: JSONSchema7 = {
type: 'object',
properties: {
enabled: { type: 'boolean' },
description: { type: 'string' },
url: { type: 'string' },
typebot: { type: 'string' },
triggerType: { type: 'string', enum: ['all', 'keyword', 'none'] },