Skip to content

Commit 8f1bd53

Browse files
code changes
1 parent 070f0e2 commit 8f1bd53

File tree

11 files changed

+144
-184
lines changed

11 files changed

+144
-184
lines changed

package-lock.json

Lines changed: 47 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"js-yaml": "^4.1.0",
9999
"mocha": "^10.4.0",
100100
"mocha-sinon": "^2.1.2",
101-
"mongodb-client-encryption": "^6.0.1",
101+
"mongodb-client-encryption": "^6.1.0-alpha",
102102
"mongodb-legacy": "^6.0.1",
103103
"nyc": "^15.1.0",
104104
"prettier": "^2.8.8",

src/client-side-encryption/client_encryption.ts

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export class ClientEncryption {
595595
/**
596596
* Encrypts a Match Expression or Aggregate Expression to query a range index.
597597
*
598-
* Only supported when queryType is "rangePreview" and algorithm is "RangePreview".
598+
* Only supported when queryType is "range" and algorithm is "Range".
599599
*
600600
* @experimental The Range algorithm is experimental only. It is not intended for production use. It is subject to breaking changes.
601601
*
@@ -737,7 +737,7 @@ export interface ClientEncryptionEncryptOptions {
737737
| 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'
738738
| 'Indexed'
739739
| 'Unindexed'
740-
| 'RangePreview';
740+
| 'Range';
741741

742742
/**
743743
* The id of the Binary dataKey to use for encryption
@@ -757,7 +757,7 @@ export interface ClientEncryptionEncryptOptions {
757757
*
758758
* @experimental Public Technical Preview: The queryType `rangePreview` is experimental.
759759
*/
760-
queryType?: 'equality' | 'rangePreview';
760+
queryType?: 'equality' | 'range';
761761

762762
/** @experimental Public Technical Preview: The index options for a Queryable Encryption field supporting "rangePreview" queries.*/
763763
rangeOptions?: RangeOptions;
@@ -957,42 +957,3 @@ export interface RangeOptions {
957957
sparsity: Long;
958958
precision?: number;
959959
}
960-
961-
/**
962-
* @public
963-
* Options to provide when encrypting data.
964-
*/
965-
export interface ClientEncryptionEncryptOptions {
966-
/**
967-
* The algorithm to use for encryption.
968-
*/
969-
algorithm:
970-
| 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'
971-
| 'AEAD_AES_256_CBC_HMAC_SHA_512-Random'
972-
| 'Indexed'
973-
| 'Unindexed'
974-
| 'RangePreview';
975-
976-
/**
977-
* The id of the Binary dataKey to use for encryption
978-
*/
979-
keyId?: Binary;
980-
981-
/**
982-
* A unique string name corresponding to an already existing dataKey.
983-
*/
984-
keyAltName?: string;
985-
986-
/** The contention factor. */
987-
contentionFactor?: bigint | number;
988-
989-
/**
990-
* The query type supported. Only the queryType `equality` is stable.
991-
*
992-
* @experimental Public Technical Preview: The queryType `rangePreview` is experimental.
993-
*/
994-
queryType?: 'equality' | 'rangePreview';
995-
996-
/** @experimental Public Technical Preview: The index options for a Queryable Encryption field supporting "rangePreview" queries.*/
997-
rangeOptions?: RangeOptions;
998-
}

test/integration/client-side-encryption/client_side_encryption.prose.06.corpus.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Client Side Encryption Prose Corpus Test', function () {
1515
const metadata = {
1616
requires: {
1717
mongodb: '>=4.2.0',
18-
clientSideEncryption: true
18+
clientSideEncryption: true as const
1919
}
2020
};
2121

0 commit comments

Comments
 (0)