From a483642d3e2f3185ccae0eb2bb43666b08f050d5 Mon Sep 17 00:00:00 2001 From: Daniel Hillmann Date: Fri, 28 Feb 2025 13:00:32 +0100 Subject: [PATCH 1/2] chore: list producer on event methods --- types/kafkajs.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/kafkajs.d.ts b/types/kafkajs.d.ts index 58d03a5b..03315679 100644 --- a/types/kafkajs.d.ts +++ b/types/kafkajs.d.ts @@ -191,6 +191,9 @@ export type Producer = Client & { sendBatch(batch: ProducerBatch): Promise flush(args?: { timeout?: number }): Promise + on(name: 'ready', cb: () => void): void; + on(name: 'event.error', cb: (err: unknown) => void): void; + // Transactional producer-only methods. transaction(): Promise commit(): Promise @@ -414,8 +417,9 @@ export type Admin = { groupId: string, topics?: TopicInput, timeout?: number, - requireStableOffsets?: boolean }): - Promise> + requireStableOffsets?: boolean + }): + Promise> deleteTopicRecords(options: { topic: string; partitions: SeekEntry[]; timeout?: number; operationTimeout?: number From a6ce26583a8c29b91fc52a88893fc8c467128108 Mon Sep 17 00:00:00 2001 From: Daniel Hillmann Date: Fri, 28 Feb 2025 13:05:52 +0100 Subject: [PATCH 2/2] Update types/kafkajs.d.ts Revert formatting change --- types/kafkajs.d.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/types/kafkajs.d.ts b/types/kafkajs.d.ts index 03315679..8995def4 100644 --- a/types/kafkajs.d.ts +++ b/types/kafkajs.d.ts @@ -417,9 +417,8 @@ export type Admin = { groupId: string, topics?: TopicInput, timeout?: number, - requireStableOffsets?: boolean - }): - Promise> + requireStableOffsets?: boolean }): + Promise> deleteTopicRecords(options: { topic: string; partitions: SeekEntry[]; timeout?: number; operationTimeout?: number