feat: whatsapp cloud api

This commit is contained in:
Davidson Gomes
2024-02-17 17:42:49 -03:00
parent 3a37fd9d32
commit 0525501b87
24 changed files with 4768 additions and 3231 deletions

View File

@@ -3,6 +3,7 @@ export * from './chamaai.model';
export * from './chat.model';
export * from './chatwoot.model';
export * from './contact.model';
export * from './integration.model';
export * from './label.model';
export * from './message.model';
export * from './proxy.model';

View File

@@ -0,0 +1,20 @@
import { Schema } from 'mongoose';
import { dbserver } from '../../libs/db.connect';
export class IntegrationRaw {
_id?: string;
integration?: string;
number?: string;
token?: string;
}
const sqsSchema = new Schema<IntegrationRaw>({
_id: { type: String, _id: true },
integration: { type: String, required: true },
number: { type: String, required: true },
token: { type: String, required: true },
});
export const IntegrationModel = dbserver?.model(IntegrationRaw.name, sqsSchema, 'integration');
export type IntegrationModel = typeof IntegrationModel;