Skip to content

Commit bb21958

Browse files
committed
fix(NODE-5801): use more specific key typing for multiple KMS provider support
1 parent c1af6ad commit bb21958

File tree

1 file changed

+5
-8
lines changed
  • src/client-side-encryption/providers

1 file changed

+5
-8
lines changed

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,34 +122,31 @@ export interface KMSProviders {
122122
* Configuration options for using 'aws' as your KMS provider
123123
*/
124124
aws?: AWSKMSProviderConfiguration | Record<string, never>;
125+
[key: `aws:${string}`]: AWSKMSProviderConfiguration | Record<string, never>;
125126

126127
/**
127128
* Configuration options for using 'local' as your KMS provider
128129
*/
129130
local?: LocalKMSProviderConfiguration;
131+
[key: `local:${string}`]: LocalKMSProviderConfiguration;
130132

131133
/**
132134
* Configuration options for using 'kmip' as your KMS provider
133135
*/
134136
kmip?: KMIPKMSProviderConfiguration;
137+
[key: `kmip:${string}`]: KMIPKMSProviderConfiguration;
135138

136139
/**
137140
* Configuration options for using 'azure' as your KMS provider
138141
*/
139142
azure?: AzureKMSProviderConfiguration | Record<string, never>;
143+
[key: `azure:${string}`]: AzureKMSProviderConfiguration | Record<string, never>;
140144

141145
/**
142146
* Configuration options for using 'gcp' as your KMS provider
143147
*/
144148
gcp?: GCPKMSProviderConfiguration | Record<string, never>;
145-
146-
[key: string]:
147-
| AWSKMSProviderConfiguration
148-
| LocalKMSProviderConfiguration
149-
| KMIPKMSProviderConfiguration
150-
| AzureKMSProviderConfiguration
151-
| GCPKMSProviderConfiguration
152-
| undefined;
149+
[key: `gcp:${string}`]: GCPKMSProviderConfiguration | Record<string, never>;
153150
}
154151

155152
/**

0 commit comments

Comments
 (0)