@@ -277,8 +277,12 @@ export interface AutoEncryptionOptions {
277
277
* Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.
278
278
*/
279
279
schemaMap ?: Document ;
280
+ /** @experimental */
281
+ encryptedFieldsMap ?: Document ;
280
282
/** Allows the user to bypass auto encryption, maintaining implicit decryption */
281
283
bypassAutoEncryption ?: boolean ;
284
+ /** @experimental */
285
+ bypassQueryAnalysis ?: boolean ;
282
286
options ?: {
283
287
/** An optional hook to catch logging messages from the underlying encryption engine */
284
288
logger ?: ( level : AutoEncryptionLoggerLevel , message : string ) => void ;
@@ -296,13 +300,38 @@ export interface AutoEncryptionOptions {
296
300
/** Command line arguments to use when auto-spawning a mongocryptd */
297
301
mongocryptdSpawnArgs ?: string [ ] ;
298
302
/**
299
- * Full path to a CSFLE shared library to be used (instead of mongocryptd)
300
- * @experimental
303
+ * Full path to a CSFLE shared library to be used (instead of mongocryptd).
304
+ *
305
+ * This needs to be the path to the file itself, not a directory.
306
+ * It can be an absolute or relative path. If the path is relative and
307
+ * its first component is `$ORIGIN`, it will be replaced by the directory
308
+ * containing the mongodb-client-encryption native addon file. Otherwise,
309
+ * the path will be interpreted relative to the current working directory.
310
+ *
311
+ * Currently, loading different CSFLE shared library files from different
312
+ * MongoClients in the same process is not supported.
313
+ *
314
+ * If this option is provided and no CSFLE shared library could be loaded
315
+ * from the specified location, creating the MongoClient will fail.
316
+ *
317
+ * If this option is not provided and `csfleRequired` is not specified,
318
+ * the AutoEncrypter will attempt to spawn and/or use mongocryptd according
319
+ * to the mongocryptd-specific `extraOptions` options.
320
+ *
321
+ * Specifying a path prevents mongocryptd from being used as a fallback.
301
322
*/
302
323
csflePath ?: string ;
324
+ /**
325
+ * If specified, never use mongocryptd and instead fail when the CSFLE shared library
326
+ * could not be loaded.
327
+ *
328
+ * This is always true when `csflePath` is specified.
329
+ */
330
+ csfleRequired ?: boolean ;
303
331
/**
304
332
* Search paths for a CSFLE shared library to be used (instead of mongocryptd)
305
- * @experimental
333
+ * Only for driver testing!
334
+ * @internal
306
335
*/
307
336
csfleSearchPaths ?: string [ ] ;
308
337
} ;
0 commit comments