Skip to content

Commit f790cc1

Browse files
fix(NODE-6085): add TS support for KMIP data key options (#4128)
1 parent 17febb4 commit f790cc1

File tree

2 files changed

+21
-13
lines changed

2 files changed

+21
-13
lines changed

Diff for: src/client-side-encryption/client_encryption.ts

+20-13
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ export interface ClientEncryptionRewrapManyDataKeyProviderOptions {
773773
| AWSEncryptionKeyOptions
774774
| AzureEncryptionKeyOptions
775775
| GCPEncryptionKeyOptions
776+
| KMIPEncryptionKeyOptions
776777
| undefined;
777778
}
778779

@@ -885,6 +886,24 @@ export interface AzureEncryptionKeyOptions {
885886
keyVersion?: string | undefined;
886887
}
887888

889+
/**
890+
* @public
891+
* Configuration options for making a KMIP encryption key
892+
*/
893+
export interface KMIPEncryptionKeyOptions {
894+
/**
895+
* keyId is the KMIP Unique Identifier to a 96 byte KMIP Secret Data managed object.
896+
*
897+
* If keyId is omitted, a random 96 byte KMIP Secret Data managed object will be created.
898+
*/
899+
keyId?: string;
900+
901+
/**
902+
* Host with optional port.
903+
*/
904+
endpoint?: string;
905+
}
906+
888907
/**
889908
* @public
890909
* Options to provide when creating a new data key.
@@ -897,6 +916,7 @@ export interface ClientEncryptionCreateDataKeyProviderOptions {
897916
| AWSEncryptionKeyOptions
898917
| AzureEncryptionKeyOptions
899918
| GCPEncryptionKeyOptions
919+
| KMIPEncryptionKeyOptions
900920
| undefined;
901921

902922
/**
@@ -909,19 +929,6 @@ export interface ClientEncryptionCreateDataKeyProviderOptions {
909929
keyMaterial?: Buffer | Binary;
910930
}
911931

912-
/**
913-
* @public
914-
* @experimental
915-
*/
916-
export interface ClientEncryptionRewrapManyDataKeyProviderOptions {
917-
provider: ClientEncryptionDataKeyProvider;
918-
masterKey?:
919-
| AWSEncryptionKeyOptions
920-
| AzureEncryptionKeyOptions
921-
| GCPEncryptionKeyOptions
922-
| undefined;
923-
}
924-
925932
/**
926933
* @public
927934
* @experimental

Diff for: src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ export type {
225225
ClientEncryptionRewrapManyDataKeyResult,
226226
DataKey,
227227
GCPEncryptionKeyOptions,
228+
KMIPEncryptionKeyOptions,
228229
RangeOptions
229230
} from './client-side-encryption/client_encryption';
230231
export {

0 commit comments

Comments
 (0)