diff --git a/docs/CustomAuthenticationMechanism.md b/docs/CustomAuthenticationMechanism.md index f02eced77..e4ecbfc27 100644 --- a/docs/CustomAuthenticationMechanism.md +++ b/docs/CustomAuthenticationMechanism.md @@ -24,13 +24,17 @@ configure your brokers. A custom authentication mechanism needs to fulfill the following interface: ```ts +type SaslAuthenticateArgs = { + request: SaslAuthenticationRequest + response?: SaslAuthenticationResponse +} + type AuthenticationProviderArgs = { host: string port: number logger: Logger saslAuthenticate: ( - request: SaslAuthenticationRequest, - response?: SaslAuthenticationResponse + args: SaslAuthenticateArgs ) => Promise } diff --git a/types/index.d.ts b/types/index.d.ts index c046a0188..26bcbfea3 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -28,13 +28,17 @@ export type Authenticator = { authenticate: () => Promise } +export type SaslAuthenticateArgs = { + request: SaslAuthenticationRequest + response?: SaslAuthenticationResponse +} + export type AuthenticationProviderArgs = { host: string port: number logger: Logger saslAuthenticate: ( - request: SaslAuthenticationRequest, - response?: SaslAuthenticationResponse + args: SaslAuthenticateArgs ) => Promise } @@ -259,7 +263,7 @@ export interface ReplicaAssignment { } export interface PartitionReassignment { - topic: string, + topic: string partitionAssignment: Array } @@ -694,7 +698,10 @@ export type Broker = { topics: PartitionReassignment[] timeout?: number }): Promise - listPartitionReassignments(request: { topics?: TopicPartitions[]; timeout?: number }): Promise + listPartitionReassignments(request: { + topics?: TopicPartitions[] + timeout?: number + }): Promise } interface MessageSetEntry {