File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed
src/client-side-encryption Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -866,9 +866,36 @@ export interface ClientEncryptionOptions {
866
866
*/
867
867
tlsOptions ?: CSFLEKMSTlsOptions ;
868
868
869
- /** @internal TODO(NODE-5688): make this public
869
+ /**
870
+ * @experimental
870
871
*
871
872
* The timeout setting to be used for all the operations on ClientEncryption.
873
+ *
874
+ * When provided, `timeoutMS` is used as the timeout for each operation executed on
875
+ * the ClientEncryption object. For example:
876
+ *
877
+ * ```typescript
878
+ * const clientEncryption = new ClientEncryption(client, {
879
+ * timeoutMS: 1_000
880
+ * kmsProviders: { local: { key: '<KEY>' } }
881
+ * });
882
+ *
883
+ * // `1_000` is used as the timeout for createDataKey call
884
+ * await clientEncryption.createDataKey('local');
885
+ * ```
886
+ *
887
+ * If `timeoutMS` is configured on the provided client, the client's `timeoutMS` value
888
+ * will be used unless `timeoutMS` is also provided as a client encryption option.
889
+ *
890
+ * ```typescript
891
+ * const client = new MongoClient('<uri>', { timeoutMS: 2_000 });
892
+ *
893
+ * // timeoutMS is set to 1_000 on clientEncryption
894
+ * const clientEncryption = new ClientEncryption(client, {
895
+ * timeoutMS: 1_000
896
+ * kmsProviders: { local: { key: '<KEY>' } }
897
+ * });
898
+ * ```
872
899
*/
873
900
timeoutMS ?: number ;
874
901
}
You can’t perform that action at this time.
0 commit comments