Skip to content

Commit 1c63e68

Browse files
committed
fixup
1 parent bb21958 commit 1c63e68

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/client-side-encryption/providers/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { loadGCPCredentials } from './gcp';
1212
* `aws:<name>`, `gcp:<name>`, `local:<name>`, `kmip:<name>`, `azure:<name>`
1313
* where `name` is an alphanumeric string, underscores allowed.
1414
*/
15-
export type ClientEncryptionDataKeyProvider = string;
15+
export type ClientEncryptionDataKeyProvider = keyof KMSProviders;
1616

1717
/** @public */
1818
export interface AWSKMSProviderConfiguration {

test/types/client-side-encryption.test-d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type RequiredCreateEncryptedCollectionSettings = Parameters<
1515
>[2];
1616

1717
expectError<RequiredCreateEncryptedCollectionSettings>({});
18-
expectAssignable<RequiredCreateEncryptedCollectionSettings>({
18+
expectError<RequiredCreateEncryptedCollectionSettings>({
1919
provider: 'blah!',
2020
createCollectionOptions: { encryptedFields: {} }
2121
});
@@ -32,6 +32,10 @@ expectAssignable<RequiredCreateEncryptedCollectionSettings>({
3232
provider: 'aws',
3333
createCollectionOptions: { encryptedFields: {} }
3434
});
35+
expectAssignable<RequiredCreateEncryptedCollectionSettings>({
36+
provider: 'aws:namedprovider',
37+
createCollectionOptions: { encryptedFields: {} }
38+
});
3539
expectAssignable<RequiredCreateEncryptedCollectionSettings>({
3640
provider: 'aws',
3741
createCollectionOptions: { encryptedFields: {} },

0 commit comments

Comments
 (0)