Begin frontend for blinded indices

This commit is contained in:
Tuan Dang
2023-04-15 17:39:30 +03:00
parent fcb677d990
commit d9afe90885
11 changed files with 186 additions and 29 deletions
+15
View File
@@ -1,8 +1,14 @@
import { Schema, model, Types } from 'mongoose';
import {
WORKSPACE_ENCRYPTION_MODE_E2EE,
WORKSPACE_ENCRYPTION_MODE_BLIND_INDEXED_E2EE,
WORKSPACE_ENCRYPTION_MODE_NOT_E2EE
} from '../variables';
export interface IWorkspace {
_id: Types.ObjectId;
name: string;
encryptionMode: string;
organization: Types.ObjectId;
environments: Array<{
name: string;
@@ -16,6 +22,15 @@ const workspaceSchema = new Schema<IWorkspace>({
type: String,
required: true
},
encryptionMode: {
type: String,
default: 'e2ee',
enum: [
WORKSPACE_ENCRYPTION_MODE_E2EE,
WORKSPACE_ENCRYPTION_MODE_BLIND_INDEXED_E2EE,
WORKSPACE_ENCRYPTION_MODE_NOT_E2EE
]
},
autoCapitalization: {
type: Boolean,
default: true,