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

@@ -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'] },