From 05bf2092673ff26ad5d9f85cb01577a19c588ccb Mon Sep 17 00:00:00 2001 From: Andreas Kohn Date: Wed, 11 Nov 2020 09:51:33 +0100 Subject: [PATCH] Document the possible values for the state of a consumer group --- types/index.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/index.d.ts b/types/index.d.ts index d857c8728..f9ad85fb1 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -657,12 +657,15 @@ export type MemberDescription = { memberMetadata: Buffer } +// See https://github.com/apache/kafka/blob/2.4.0/clients/src/main/java/org/apache/kafka/common/ConsumerGroupState.java#L25 +export type ConsumerGroupState = 'Unknown' | 'PreparingRebalance' | 'CompletingRebalance' | 'Stable' | 'Dead' | 'Empty'; + export type GroupDescription = { groupId: string members: MemberDescription[] protocol: string protocolType: string - state: string + state: ConsumerGroupState } export type GroupDescriptions = {