Skip to content

Commit ac94091

Browse files
baileympearsongithub-actions[bot]
authored andcommitted
[create-pull-request] automated change
1 parent 76c98bb commit ac94091

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+170
-163
lines changed

docs/Next/classes/BSON.ObjectId.html

Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.

docs/Next/classes/BSON.Timestamp.html

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

docs/Next/classes/BSON.UUID.html

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.

docs/Next/classes/ClientEncryption.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ <h4 class="tsd-anchor-link"><a id="Example-9" class="tsd-anchor"></a>Example<a h
108108
<div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Example-13" class="tsd-anchor"></a>Example<a href="#Example-13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// removing a key alt name from a data key</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">id</span><span class="hl-1"> = </span><span class="hl-2">new</span><span class="hl-1"> </span><span class="hl-0">Binary</span><span class="hl-1">(); </span><span class="hl-5">// id is a bson binary subtype 4 object</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">keyAltName</span><span class="hl-1"> = </span><span class="hl-3">&#39;keyAltName&#39;</span><span class="hl-1">;</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">oldKey</span><span class="hl-1"> = </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-6">clientEncryption</span><span class="hl-1">.</span><span class="hl-0">removeKeyAltName</span><span class="hl-1">(</span><span class="hl-6">id</span><span class="hl-1">, </span><span class="hl-6">keyAltName</span><span class="hl-1">);</span><br/><br/><span class="hl-7">if</span><span class="hl-1"> (!</span><span class="hl-6">oldKey</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">// null is returned if there is no matching document with an id matching the supplied id</span><br/><span class="hl-1">}</span>
109109
</code><button type="button">Copy</button></pre>
110110

111-
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/main/src/client-side-encryption/client_encryption.ts#L511">src/client-side-encryption/client_encryption.ts:511</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="rewrapManyDataKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>rewrap<wbr/>Many<wbr/>Data<wbr/>Key</span><a href="#rewrapManyDataKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="rewrapManyDataKey.rewrapManyDataKey-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">rewrap<wbr/>Many<wbr/>Data<wbr/>Key</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">filter</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">bulkWriteResult</span><span class="tsd-signature-symbol">?: </span><a href="BulkWriteResult.html" class="tsd-signature-type tsd-kind-class">BulkWriteResult</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#rewrapManyDataKey.rewrapManyDataKey-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.</p>
111+
</div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/main/src/client-side-encryption/client_encryption.ts#L511">src/client-side-encryption/client_encryption.ts:511</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="rewrapManyDataKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>rewrap<wbr/>Many<wbr/>Data<wbr/>Key</span><a href="#rewrapManyDataKey" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="rewrapManyDataKey.rewrapManyDataKey-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">rewrap<wbr/>Many<wbr/>Data<wbr/>Key</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">filter</span>, <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">bulkWriteResult</span><span class="tsd-signature-symbol">?: </span><a href="BulkWriteResult.html" class="tsd-signature-type tsd-kind-class">BulkWriteResult</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#rewrapManyDataKey.rewrapManyDataKey-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Searches the keyvault for any data keys matching the provided filter. If there are matches, rewrapManyDataKey then attempts to re-wrap the data keys using the provided options.</p>
112112
<p>If no matches are found, then no bulk write is performed.</p>
113-
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">filter</span>: <a href="../types/Filter.html" class="tsd-signature-type tsd-kind-type-alias">Filter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/DataKey.html" class="tsd-signature-type tsd-kind-interface">DataKey</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html" class="tsd-signature-type tsd-kind-interface">ClientEncryptionRewrapManyDataKeyProviderOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">bulkWriteResult</span><span class="tsd-signature-symbol">?: </span><a href="BulkWriteResult.html" class="tsd-signature-type tsd-kind-class">BulkWriteResult</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Example-14" class="tsd-anchor"></a>Example<a href="#Example-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// rewrapping all data data keys (using a filter that matches all documents)</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">filter</span><span class="hl-1"> = {};</span><br/><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> = </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-6">clientEncryption</span><span class="hl-1">.</span><span class="hl-0">rewrapManyDataKey</span><span class="hl-1">(</span><span class="hl-6">filter</span><span class="hl-1">);</span><br/><span class="hl-7">if</span><span class="hl-1"> (</span><span class="hl-6">result</span><span class="hl-1">.</span><span class="hl-6">bulkWriteResult</span><span class="hl-1"> != </span><span class="hl-2">null</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">// keys were re-wrapped, results will be available in the bulkWrite object.</span><br/><span class="hl-1">}</span>
113+
</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">filter</span>: <a href="../types/Filter.html" class="tsd-signature-type tsd-kind-type-alias">Filter</a><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/DataKey.html" class="tsd-signature-type tsd-kind-interface">DataKey</a><span class="tsd-signature-symbol">&gt;</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">options</span>: <a href="../interfaces/ClientEncryptionRewrapManyDataKeyProviderOptions.html" class="tsd-signature-type tsd-kind-interface">ClientEncryptionRewrapManyDataKeyProviderOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">bulkWriteResult</span><span class="tsd-signature-symbol">?: </span><a href="BulkWriteResult.html" class="tsd-signature-type tsd-kind-class">BulkWriteResult</a><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><h4 class="tsd-anchor-link"><a id="Example-14" class="tsd-anchor"></a>Example<a href="#Example-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// rewrapping all data data keys (using a filter that matches all documents)</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">filter</span><span class="hl-1"> = {};</span><br/><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> = </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-6">clientEncryption</span><span class="hl-1">.</span><span class="hl-0">rewrapManyDataKey</span><span class="hl-1">(</span><span class="hl-6">filter</span><span class="hl-1">);</span><br/><span class="hl-7">if</span><span class="hl-1"> (</span><span class="hl-6">result</span><span class="hl-1">.</span><span class="hl-6">bulkWriteResult</span><span class="hl-1"> != </span><span class="hl-2">null</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">// keys were re-wrapped, results will be available in the bulkWrite object.</span><br/><span class="hl-1">}</span>
114114
</code><button type="button">Copy</button></pre>
115115

116116
<h4 class="tsd-anchor-link"><a id="Example-15" class="tsd-anchor"></a>Example<a href="#Example-15" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="ts"><span class="hl-5">// attempting to rewrap all data keys with no matches</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">filter</span><span class="hl-1"> = { </span><span class="hl-6">_id:</span><span class="hl-1"> </span><span class="hl-2">new</span><span class="hl-1"> </span><span class="hl-0">Binary</span><span class="hl-1">() } </span><span class="hl-5">// assume _id matches no documents in the database</span><br/><span class="hl-2">const</span><span class="hl-1"> </span><span class="hl-4">result</span><span class="hl-1"> = </span><span class="hl-7">await</span><span class="hl-1"> </span><span class="hl-6">clientEncryption</span><span class="hl-1">.</span><span class="hl-0">rewrapManyDataKey</span><span class="hl-1">(</span><span class="hl-6">filter</span><span class="hl-1">);</span><br/><br/><span class="hl-7">if</span><span class="hl-1"> (</span><span class="hl-6">result</span><span class="hl-1">.</span><span class="hl-6">bulkWriteResult</span><span class="hl-1"> == </span><span class="hl-2">null</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">// no keys matched, `bulkWriteResult` does not exist on the result object</span><br/><span class="hl-1">}</span>

0 commit comments

Comments
 (0)