Comparing version 1.15.0-beta.25 to 1.15.0-beta.26
{ | ||
"name": "kafkajs", | ||
"version": "1.15.0-beta.25", | ||
"version": "1.15.0-beta.26", | ||
"description": "A modern Apache Kafka client for node.js", | ||
@@ -83,5 +83,5 @@ "author": "Tulio Ornelas <ornelas.tulio@gmail.com>", | ||
"kafkajs": { | ||
"sha": "d13acd58f693bef5f2460ade036757d6314e4710", | ||
"compare": "https://github.com/tulios/kafkajs/compare/v1.14.0...d13acd58f693bef5f2460ade036757d6314e4710" | ||
"sha": "2c55fc190346eea3f458da983388044349fbe527", | ||
"compare": "https://github.com/tulios/kafkajs/compare/v1.14.0...2c55fc190346eea3f458da983388044349fbe527" | ||
} | ||
} |
@@ -44,4 +44,2 @@ /// <reference types="node" /> | ||
export type SASLMechanism = 'plain' | 'scram-sha-256' | 'scram-sha-512' | 'aws' | 'oauthbearer' | ||
export interface OauthbearerProviderResponse { | ||
@@ -51,9 +49,14 @@ value: string | ||
export interface SASLOptions { | ||
mechanism: SASLMechanism | ||
username?: string | ||
password?: string | ||
oauthBearerProvider?: () => Promise<OauthbearerProviderResponse> | ||
type SASLMechanismOptionsMap = { | ||
'plain': { username: string, password: string }, | ||
'scram-sha-256': { username: string, password: string }, | ||
'scram-sha-512': { username: string, password: string }, | ||
'aws': { authorizationIdentity: string, accessKeyId: string, secretAccessKey: string, sessionToken?: string }, | ||
'oauthbearer': { oauthBearerProvider: () => Promise<OauthbearerProviderResponse> } | ||
} | ||
export type SASLMechanism = keyof SASLMechanismOptionsMap | ||
type SASLMechanismOptions<T> = T extends SASLMechanism ? { mechanism: T } & SASLMechanismOptionsMap[T] : never | ||
export type SASLOptions = SASLMechanismOptions<SASLMechanism> | ||
export interface ProducerConfig { | ||
@@ -60,0 +63,0 @@ createPartitioner?: ICustomPartitioner |
671244
19883