@@ -277,8 +277,12 @@ export interface AutoEncryptionOptions {
277277 * Other validation rules in the JSON schema will not be enforced by the driver and will result in an error.
278278 */
279279 schemaMap ?: Document ;
280+ /** @experimental */
281+ encryptedFieldsMap ?: Document ;
280282 /** Allows the user to bypass auto encryption, maintaining implicit decryption */
281283 bypassAutoEncryption ?: boolean ;
284+ /** @experimental */
285+ bypassQueryAnalysis ?: boolean ;
282286 options ?: {
283287 /** An optional hook to catch logging messages from the underlying encryption engine */
284288 logger ?: ( level : AutoEncryptionLoggerLevel , message : string ) => void ;
@@ -296,13 +300,38 @@ export interface AutoEncryptionOptions {
296300 /** Command line arguments to use when auto-spawning a mongocryptd */
297301 mongocryptdSpawnArgs ?: string [ ] ;
298302 /**
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.
301322 */
302323 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 ;
303331 /**
304332 * Search paths for a CSFLE shared library to be used (instead of mongocryptd)
305- * @experimental
333+ * Only for driver testing!
334+ * @internal
306335 */
307336 csfleSearchPaths ?: string [ ] ;
308337 } ;
0 commit comments