Merge branch 'develop' of https://github.com/EvolutionAPI/evolution-api into EvolutionAPI-develop

This commit is contained in:
raimartinsb
2023-09-11 08:08:18 -03:00
41 changed files with 1217 additions and 210 deletions

View File

@@ -0,0 +1,24 @@
import { Schema } from 'mongoose';
import { dbserver } from '../../libs/db.connect';
export class ChamaaiRaw {
_id?: string;
enabled?: boolean;
url?: string;
token?: string;
waNumber?: string;
answerByAudio?: boolean;
}
const chamaaiSchema = new Schema<ChamaaiRaw>({
_id: { type: String, _id: true },
enabled: { type: Boolean, required: true },
url: { type: String, required: true },
token: { type: String, required: true },
waNumber: { type: String, required: true },
answerByAudio: { type: Boolean, required: true },
});
export const ChamaaiModel = dbserver?.model(ChamaaiRaw.name, chamaaiSchema, 'chamaai');
export type IChamaaiModel = typeof ChamaaiModel;

View File

@@ -1,4 +1,5 @@
export * from './auth.model';
export * from './chamaai.model';
export * from './chat.model';
export * from './chatwoot.model';
export * from './contact.model';

View File

@@ -19,6 +19,7 @@ export class TypebotRaw {
keyword_finish?: string;
delay_message?: number;
unknown_message?: string;
listening_from_me?: boolean;
sessions?: Session[];
}
@@ -31,6 +32,7 @@ const typebotSchema = new Schema<TypebotRaw>({
keyword_finish: { type: String, required: true },
delay_message: { type: Number, required: true },
unknown_message: { type: String, required: true },
listening_from_me: { type: Boolean, required: true },
sessions: [
{
remoteJid: { type: String, required: true },