File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 1- import { BSON } from 'bson' ;
1+ import * as BSON from 'bson' ;
22
33declare module 'mongoose' {
44
@@ -237,6 +237,28 @@ declare module 'mongoose' {
237237
238238 type ValidatorFunction < DocType = any > = ( this : DocType , value : any , validatorProperties ?: Validator ) => any ;
239239
240+ export interface EncryptSchemaTypeOptions {
241+ /** The id of the dataKey to use for encryption */
242+ keyId : BSON . UUID ;
243+
244+ /**
245+ * Specifies the type of queries that the field can be queried on for Queryable Encryption.
246+ * Required when `SchemaOptions.encryptionType` is 'queryableEncryption'
247+ */
248+ queries ?: 'equality' | 'range' ;
249+
250+ /**
251+ * The algorithm to use for encryption.
252+ * Required when `SchemaOptions.encryptionType` is 'csfle'
253+ */
254+ algorithm ?:
255+ | 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'
256+ | 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'
257+ | 'Indexed'
258+ | 'Unindexed'
259+ | 'Range' ;
260+ }
261+
240262 class SchemaType < T = any , DocType = any > {
241263 /** SchemaType constructor */
242264 constructor ( path : string , options ?: AnyObject , instance ?: string ) ;
You can’t perform that action at this time.
0 commit comments