Complete v1 loop for bot-based integrations

This commit is contained in:
Tuan Dang
2022-12-08 23:22:44 -05:00
parent 46fe724012
commit 1757f0d690
33 changed files with 1085 additions and 638 deletions
+3 -3
View File
@@ -24,12 +24,12 @@ const botSchema = new Schema<IBot>(
},
isActive: {
type: Boolean,
required: true
required: true,
default: false
},
publicKey: {
type: String,
required: true,
select: false
required: true
},
encryptedPrivateKey: {
type: String,
-38
View File
@@ -1,38 +0,0 @@
import { Schema, model, Types } from 'mongoose';
export interface IBotSequence {
_id: Types.ObjectId;
bot: Types.ObjectId;
name: string;
event: string;
action: string;
}
const botSequence = new Schema<IBotSequence>(
{
bot: {
type: Schema.Types.ObjectId,
ref: 'Bot',
required: true
},
name: {
type: String,
required: true
},
event: {
type: String,
required: true
},
action: {
type: String,
required: true
}
},
{
timestamps: true
}
);
const BotSequence = model<IBotSequence>('BotSequence', botSequence);
export default BotSequence;
-3
View File
@@ -1,7 +1,6 @@
import BackupPrivateKey, { IBackupPrivateKey } from './backupPrivateKey';
import Bot, { IBot } from './bot';
import BotKey, { IBotKey } from './botKey';
import BotSequence, { IBotSequence } from './botSequence';
import IncidentContactOrg, { IIncidentContactOrg } from './incidentContactOrg';
import Integration, { IIntegration } from './integration';
import IntegrationAuth, { IIntegrationAuth } from './integrationAuth';
@@ -23,8 +22,6 @@ export {
IBot,
BotKey,
IBotKey,
BotSequence,
IBotSequence,
IncidentContactOrg,
IIncidentContactOrg,
Integration,