Updated bot, integration, and integrationAuth middlewares to support multiple clients

This commit is contained in:
Tuan Dang
2023-04-12 22:36:36 +03:00
parent e2139882da
commit ed7dbb655c
9 changed files with 257 additions and 69 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { Schema, model, Types } from "mongoose";
import { Schema, model, Types, Document } from "mongoose";
import {
INTEGRATION_AZURE_KEY_VAULT,
INTEGRATION_AWS_PARAMETER_STORE,
@@ -15,7 +15,7 @@ import {
INTEGRATION_TRAVISCI,
} from "../variables";
export interface IIntegrationAuth {
export interface IIntegrationAuth extends Document {
_id: Types.ObjectId;
workspace: Types.ObjectId;
integration: 'heroku' | 'vercel' | 'netlify' | 'github' | 'gitlab' | 'render' | 'railway' | 'flyio' | 'azure-key-vault' | 'circleci' | 'travisci' | 'aws-parameter-store' | 'aws-secret-manager';