@platformatic/kafka 1.27.0-alpha.2 → 1.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/apis/admin/create-acls-v2.d.ts +16 -0
- package/dist/apis/admin/create-acls-v2.js +55 -0
- package/dist/apis/admin/delete-acls-v2.d.ts +21 -0
- package/dist/apis/admin/delete-acls-v2.js +84 -0
- package/dist/apis/admin/describe-acls-v2.d.ts +17 -0
- package/dist/apis/admin/describe-acls-v2.js +66 -0
- package/dist/apis/admin/describe-cluster-v0.d.ts +23 -0
- package/dist/apis/admin/describe-cluster-v0.js +48 -0
- package/dist/apis/admin/describe-log-dirs-v2.d.ts +32 -0
- package/dist/apis/admin/describe-log-dirs-v2.js +67 -0
- package/dist/apis/admin/describe-log-dirs-v3.d.ts +32 -0
- package/dist/apis/admin/describe-log-dirs-v3.js +73 -0
- package/dist/apis/admin/index.d.ts +7 -0
- package/dist/apis/admin/index.js +7 -0
- package/dist/apis/admin/list-transactions-v0.d.ts +18 -0
- package/dist/apis/admin/list-transactions-v0.js +43 -0
- package/dist/apis/consumer/index.d.ts +8 -0
- package/dist/apis/consumer/index.js +8 -0
- package/dist/apis/consumer/join-group-v6.d.ts +27 -0
- package/dist/apis/consumer/join-group-v6.js +67 -0
- package/dist/apis/consumer/join-group-v7.d.ts +27 -0
- package/dist/apis/consumer/join-group-v7.js +68 -0
- package/dist/apis/consumer/join-group-v8.d.ts +27 -0
- package/dist/apis/consumer/join-group-v8.js +70 -0
- package/dist/apis/consumer/leave-group-v4.d.ts +22 -0
- package/dist/apis/consumer/leave-group-v4.js +56 -0
- package/dist/apis/consumer/list-offsets-v5.d.ts +30 -0
- package/dist/apis/consumer/list-offsets-v5.js +67 -0
- package/dist/apis/consumer/list-offsets-v6.d.ts +30 -0
- package/dist/apis/consumer/list-offsets-v6.js +68 -0
- package/dist/apis/consumer/list-offsets-v7.d.ts +30 -0
- package/dist/apis/consumer/list-offsets-v7.js +68 -0
- package/dist/apis/consumer/sync-group-v4.d.ts +18 -0
- package/dist/apis/consumer/sync-group-v4.js +43 -0
- package/dist/apis/enumerations.d.ts +5 -5
- package/dist/apis/producer/add-offsets-to-txn-v1.d.ts +10 -0
- package/dist/apis/producer/add-offsets-to-txn-v1.js +33 -0
- package/dist/apis/producer/add-offsets-to-txn-v2.d.ts +10 -0
- package/dist/apis/producer/add-offsets-to-txn-v2.js +33 -0
- package/dist/apis/producer/index.d.ts +3 -0
- package/dist/apis/producer/index.js +3 -0
- package/dist/apis/producer/init-producer-id-v3.d.ts +21 -0
- package/dist/apis/producer/init-producer-id-v3.js +38 -0
- package/dist/clients/admin/options.d.ts +9 -9
- package/dist/clients/base/base.js +6 -2
- package/dist/clients/base/options.d.ts +9 -2
- package/dist/clients/base/options.js +1 -1
- package/dist/clients/base/types.d.ts +2 -1
- package/dist/clients/consumer/consumer.js +14 -1
- package/dist/clients/consumer/messages-stream.d.ts +2 -2
- package/dist/clients/consumer/messages-stream.js +3 -3
- package/dist/clients/producer/producer.js +7 -1
- package/dist/errors.d.ts +0 -4
- package/dist/errors.js +0 -6
- package/dist/network/connection.js +1 -1
- package/dist/protocol/compression.d.ts +1 -1
- package/dist/protocol/compression.js +7 -46
- package/dist/protocol/crc32c.d.ts +1 -1
- package/dist/protocol/crc32c.js +5 -6
- package/dist/protocol/definitions.d.ts +1 -1
- package/dist/protocol/index.d.ts +0 -2
- package/dist/protocol/index.js +0 -2
- package/dist/protocol/reader.d.ts +2 -2
- package/dist/protocol/reader.js +3 -3
- package/dist/protocol/records.d.ts +4 -4
- package/dist/protocol/records.js +1 -1
- package/dist/protocol/writer.d.ts +1 -1
- package/dist/protocol/writer.js +2 -2
- package/dist/typescript-4/dist/apis/admin/create-acls-v2.d.ts +16 -0
- package/dist/typescript-4/dist/apis/admin/delete-acls-v2.d.ts +21 -0
- package/dist/typescript-4/dist/apis/admin/describe-acls-v2.d.ts +17 -0
- package/dist/typescript-4/dist/apis/admin/describe-cluster-v0.d.ts +23 -0
- package/dist/typescript-4/dist/apis/admin/describe-log-dirs-v2.d.ts +32 -0
- package/dist/typescript-4/dist/apis/admin/describe-log-dirs-v3.d.ts +32 -0
- package/dist/typescript-4/dist/apis/admin/index.d.ts +7 -0
- package/dist/typescript-4/dist/apis/admin/list-transactions-v0.d.ts +18 -0
- package/dist/typescript-4/dist/apis/consumer/index.d.ts +8 -0
- package/dist/typescript-4/dist/apis/consumer/join-group-v6.d.ts +27 -0
- package/dist/typescript-4/dist/apis/consumer/join-group-v7.d.ts +27 -0
- package/dist/typescript-4/dist/apis/consumer/join-group-v8.d.ts +27 -0
- package/dist/typescript-4/dist/apis/consumer/leave-group-v4.d.ts +22 -0
- package/dist/typescript-4/dist/apis/consumer/list-offsets-v5.d.ts +30 -0
- package/dist/typescript-4/dist/apis/consumer/list-offsets-v6.d.ts +30 -0
- package/dist/typescript-4/dist/apis/consumer/list-offsets-v7.d.ts +30 -0
- package/dist/typescript-4/dist/apis/consumer/sync-group-v4.d.ts +18 -0
- package/dist/typescript-4/dist/apis/enumerations.d.ts +5 -5
- package/dist/typescript-4/dist/apis/producer/add-offsets-to-txn-v1.d.ts +10 -0
- package/dist/typescript-4/dist/apis/producer/add-offsets-to-txn-v2.d.ts +10 -0
- package/dist/typescript-4/dist/apis/producer/index.d.ts +3 -0
- package/dist/typescript-4/dist/apis/producer/init-producer-id-v3.d.ts +21 -0
- package/dist/typescript-4/dist/clients/admin/options.d.ts +9 -9
- package/dist/typescript-4/dist/clients/base/options.d.ts +9 -2
- package/dist/typescript-4/dist/clients/base/types.d.ts +2 -1
- package/dist/typescript-4/dist/clients/consumer/messages-stream.d.ts +2 -2
- package/dist/typescript-4/dist/errors.d.ts +0 -4
- package/dist/typescript-4/dist/protocol/compression.d.ts +1 -1
- package/dist/typescript-4/dist/protocol/crc32c.d.ts +1 -1
- package/dist/typescript-4/dist/protocol/definitions.d.ts +1 -1
- package/dist/typescript-4/dist/protocol/index.d.ts +0 -2
- package/dist/typescript-4/dist/protocol/reader.d.ts +2 -2
- package/dist/typescript-4/dist/protocol/records.d.ts +4 -4
- package/dist/typescript-4/dist/protocol/writer.d.ts +1 -1
- package/dist/typescript-4/dist/utils.d.ts +3 -2
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +3 -0
- package/dist/version.js +1 -1
- package/package.json +11 -9
- package/dist/protocol/dynamic-buffer.d.ts +0 -65
- package/dist/protocol/dynamic-buffer.js +0 -563
- package/dist/protocol/varint.d.ts +0 -12
- package/dist/protocol/varint.js +0 -36
- package/dist/typescript-4/dist/protocol/dynamic-buffer.d.ts +0 -65
- package/dist/typescript-4/dist/protocol/varint.d.ts +0 -12
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type NullableString } from "../../protocol/definitions";
|
|
2
|
+
import { type Reader } from "../../protocol/reader";
|
|
3
|
+
import { Writer } from "../../protocol/writer";
|
|
4
|
+
export interface JoinGroupRequestProtocol {
|
|
5
|
+
name: string;
|
|
6
|
+
metadata?: Buffer | null;
|
|
7
|
+
}
|
|
8
|
+
export type JoinGroupRequest = Parameters<typeof createRequest>;
|
|
9
|
+
export interface JoinGroupResponseMember {
|
|
10
|
+
memberId: string;
|
|
11
|
+
groupInstanceId?: NullableString;
|
|
12
|
+
metadata: Buffer | null;
|
|
13
|
+
}
|
|
14
|
+
export interface JoinGroupResponse {
|
|
15
|
+
throttleTimeMs: number;
|
|
16
|
+
errorCode: number;
|
|
17
|
+
generationId: number;
|
|
18
|
+
protocolType: NullableString;
|
|
19
|
+
protocolName: NullableString;
|
|
20
|
+
leader: string;
|
|
21
|
+
skipAssignment: boolean;
|
|
22
|
+
memberId: NullableString;
|
|
23
|
+
members: JoinGroupResponseMember[];
|
|
24
|
+
}
|
|
25
|
+
export declare function createRequest(groupId: string, sessionTimeoutMs: number, rebalanceTimeoutMs: number, memberId: string, groupInstanceId: NullableString, protocolType: string, protocols: JoinGroupRequestProtocol[], reason?: NullableString): Writer;
|
|
26
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): JoinGroupResponse;
|
|
27
|
+
export declare const api: import("../definitions").API<[groupId: string, sessionTimeoutMs: number, rebalanceTimeoutMs: number, memberId: string, groupInstanceId: NullableString, protocolType: string, protocols: JoinGroupRequestProtocol[], reason?: NullableString], JoinGroupResponse>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type NullableString } from "../../protocol/definitions";
|
|
2
|
+
import { type Reader } from "../../protocol/reader";
|
|
3
|
+
import { Writer } from "../../protocol/writer";
|
|
4
|
+
export interface LeaveGroupRequestMember {
|
|
5
|
+
memberId: string;
|
|
6
|
+
groupInstanceId?: NullableString;
|
|
7
|
+
reason?: NullableString;
|
|
8
|
+
}
|
|
9
|
+
export type LeaveGroupRequest = Parameters<typeof createRequest>;
|
|
10
|
+
export interface LeaveGroupResponseMember {
|
|
11
|
+
memberId: NullableString;
|
|
12
|
+
groupInstanceId: NullableString;
|
|
13
|
+
errorCode: number;
|
|
14
|
+
}
|
|
15
|
+
export interface LeaveGroupResponse {
|
|
16
|
+
throttleTimeMs: number;
|
|
17
|
+
errorCode: number;
|
|
18
|
+
members: LeaveGroupResponseMember[];
|
|
19
|
+
}
|
|
20
|
+
export declare function createRequest(groupId: string, members: LeaveGroupRequestMember[]): Writer;
|
|
21
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): LeaveGroupResponse;
|
|
22
|
+
export declare const api: import("../definitions").API<[groupId: string, members: LeaveGroupRequestMember[]], LeaveGroupResponse>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Reader } from "../../protocol/reader";
|
|
2
|
+
import { Writer } from "../../protocol/writer";
|
|
3
|
+
export interface ListOffsetsRequestPartition {
|
|
4
|
+
partitionIndex: number;
|
|
5
|
+
currentLeaderEpoch: number;
|
|
6
|
+
timestamp: bigint;
|
|
7
|
+
}
|
|
8
|
+
export interface ListOffsetsRequestTopic {
|
|
9
|
+
name: string;
|
|
10
|
+
partitions: ListOffsetsRequestPartition[];
|
|
11
|
+
}
|
|
12
|
+
export type ListOffsetsRequest = Parameters<typeof createRequest>;
|
|
13
|
+
export interface ListOffsetResponsePartition {
|
|
14
|
+
partitionIndex: number;
|
|
15
|
+
errorCode: number;
|
|
16
|
+
timestamp: bigint;
|
|
17
|
+
offset: bigint;
|
|
18
|
+
leaderEpoch: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ListOffsetResponseTopic {
|
|
21
|
+
name: string;
|
|
22
|
+
partitions: ListOffsetResponsePartition[];
|
|
23
|
+
}
|
|
24
|
+
export interface ListOffsetsResponse {
|
|
25
|
+
throttleTimeMs: number;
|
|
26
|
+
topics: ListOffsetResponseTopic[];
|
|
27
|
+
}
|
|
28
|
+
export declare function createRequest(replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]): Writer;
|
|
29
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): ListOffsetsResponse;
|
|
30
|
+
export declare const api: import("../definitions").API<[replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]], ListOffsetsResponse>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Reader } from "../../protocol/reader";
|
|
2
|
+
import { Writer } from "../../protocol/writer";
|
|
3
|
+
export interface ListOffsetsRequestPartition {
|
|
4
|
+
partitionIndex: number;
|
|
5
|
+
currentLeaderEpoch: number;
|
|
6
|
+
timestamp: bigint;
|
|
7
|
+
}
|
|
8
|
+
export interface ListOffsetsRequestTopic {
|
|
9
|
+
name: string;
|
|
10
|
+
partitions: ListOffsetsRequestPartition[];
|
|
11
|
+
}
|
|
12
|
+
export type ListOffsetsRequest = Parameters<typeof createRequest>;
|
|
13
|
+
export interface ListOffsetResponsePartition {
|
|
14
|
+
partitionIndex: number;
|
|
15
|
+
errorCode: number;
|
|
16
|
+
timestamp: bigint;
|
|
17
|
+
offset: bigint;
|
|
18
|
+
leaderEpoch: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ListOffsetResponseTopic {
|
|
21
|
+
name: string;
|
|
22
|
+
partitions: ListOffsetResponsePartition[];
|
|
23
|
+
}
|
|
24
|
+
export interface ListOffsetsResponse {
|
|
25
|
+
throttleTimeMs: number;
|
|
26
|
+
topics: ListOffsetResponseTopic[];
|
|
27
|
+
}
|
|
28
|
+
export declare function createRequest(replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]): Writer;
|
|
29
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): ListOffsetsResponse;
|
|
30
|
+
export declare const api: import("../definitions").API<[replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]], ListOffsetsResponse>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Reader } from "../../protocol/reader";
|
|
2
|
+
import { Writer } from "../../protocol/writer";
|
|
3
|
+
export interface ListOffsetsRequestPartition {
|
|
4
|
+
partitionIndex: number;
|
|
5
|
+
currentLeaderEpoch: number;
|
|
6
|
+
timestamp: bigint;
|
|
7
|
+
}
|
|
8
|
+
export interface ListOffsetsRequestTopic {
|
|
9
|
+
name: string;
|
|
10
|
+
partitions: ListOffsetsRequestPartition[];
|
|
11
|
+
}
|
|
12
|
+
export type ListOffsetsRequest = Parameters<typeof createRequest>;
|
|
13
|
+
export interface ListOffsetResponsePartition {
|
|
14
|
+
partitionIndex: number;
|
|
15
|
+
errorCode: number;
|
|
16
|
+
timestamp: bigint;
|
|
17
|
+
offset: bigint;
|
|
18
|
+
leaderEpoch: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ListOffsetResponseTopic {
|
|
21
|
+
name: string;
|
|
22
|
+
partitions: ListOffsetResponsePartition[];
|
|
23
|
+
}
|
|
24
|
+
export interface ListOffsetsResponse {
|
|
25
|
+
throttleTimeMs: number;
|
|
26
|
+
topics: ListOffsetResponseTopic[];
|
|
27
|
+
}
|
|
28
|
+
export declare function createRequest(replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]): Writer;
|
|
29
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): ListOffsetsResponse;
|
|
30
|
+
export declare const api: import("../definitions").API<[replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]], ListOffsetsResponse>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type NullableString } from "../../protocol/definitions";
|
|
2
|
+
import { type Reader } from "../../protocol/reader";
|
|
3
|
+
import { Writer } from "../../protocol/writer";
|
|
4
|
+
export interface SyncGroupRequestAssignment {
|
|
5
|
+
memberId: string;
|
|
6
|
+
assignment: Buffer;
|
|
7
|
+
}
|
|
8
|
+
export type SyncGroupRequest = Parameters<typeof createRequest>;
|
|
9
|
+
export interface SyncGroupResponse {
|
|
10
|
+
throttleTimeMs: number;
|
|
11
|
+
errorCode: number;
|
|
12
|
+
protocolType: NullableString;
|
|
13
|
+
protocolName: NullableString;
|
|
14
|
+
assignment: Buffer;
|
|
15
|
+
}
|
|
16
|
+
export declare function createRequest(groupId: string, generationId: number, memberId: string, groupInstanceId: NullableString, assignments: SyncGroupRequestAssignment[]): Writer;
|
|
17
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): SyncGroupResponse;
|
|
18
|
+
export declare const api: import("../definitions").API<[groupId: string, generationId: number, memberId: string, groupInstanceId: NullableString, assignments: SyncGroupRequestAssignment[]], SyncGroupResponse>;
|
|
@@ -67,7 +67,7 @@ export declare const ResourceTypes: {
|
|
|
67
67
|
readonly DELEGATION_TOKEN: 6;
|
|
68
68
|
readonly USER: 7;
|
|
69
69
|
};
|
|
70
|
-
export declare const allowedResourceTypes: (0 | 1 |
|
|
70
|
+
export declare const allowedResourceTypes: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
71
71
|
export type ResourceTypeLabel = keyof typeof ResourceTypes;
|
|
72
72
|
export type ResourceTypeValue = (typeof ResourceTypes)[ResourceTypeLabel];
|
|
73
73
|
/** @deprecated Use ResourceTypeLabel */
|
|
@@ -102,7 +102,7 @@ export declare const AclOperations: {
|
|
|
102
102
|
readonly DESCRIBE_TOKENS: 14;
|
|
103
103
|
readonly TWO_PHASE_COMMIT: 15;
|
|
104
104
|
};
|
|
105
|
-
export declare const allowedAclOperations: (0 | 1 |
|
|
105
|
+
export declare const allowedAclOperations: (0 | 1 | 2 | 4 | 8 | 7 | 10 | 3 | 5 | 6 | 9 | 11 | 12 | 13 | 14 | 15)[];
|
|
106
106
|
export type AclOperationLabel = keyof typeof AclOperations;
|
|
107
107
|
export type AclOperationValue = (typeof AclOperations)[AclOperationLabel];
|
|
108
108
|
/** @deprecated Use AclOperationLabel */
|
|
@@ -129,7 +129,7 @@ export declare const ConfigSources: {
|
|
|
129
129
|
readonly CLIENT_METRICS_CONFIG: 7;
|
|
130
130
|
readonly GROUP_CONFIG: 8;
|
|
131
131
|
};
|
|
132
|
-
export declare const allowedConfigSources: (0 | 1 |
|
|
132
|
+
export declare const allowedConfigSources: (0 | 1 | 2 | 4 | 8 | 7 | 3 | 5 | 6)[];
|
|
133
133
|
export type ConfigSourceLabel = keyof typeof ConfigSources;
|
|
134
134
|
export type ConfigSourceValue = (typeof ConfigSources)[ConfigSourceLabel];
|
|
135
135
|
/** @deprecated Use ConfigSourceLabel */
|
|
@@ -142,7 +142,7 @@ export declare const ConfigResourceTypes: {
|
|
|
142
142
|
readonly CLIENT_METRICS: 16;
|
|
143
143
|
readonly GROUP: 32;
|
|
144
144
|
};
|
|
145
|
-
export declare const allowedConfigResourceTypes: (0 |
|
|
145
|
+
export declare const allowedConfigResourceTypes: (0 | 2 | 4 | 8 | 16 | 32)[];
|
|
146
146
|
export type ConfigResourceTypeLabel = keyof typeof ConfigResourceTypes;
|
|
147
147
|
export type ConfigResourceTypeValue = (typeof ConfigResourceTypes)[ConfigResourceTypeLabel];
|
|
148
148
|
export declare const ConfigTypes: {
|
|
@@ -157,7 +157,7 @@ export declare const ConfigTypes: {
|
|
|
157
157
|
readonly CLASS: 8;
|
|
158
158
|
readonly PASSWORD: 9;
|
|
159
159
|
};
|
|
160
|
-
export declare const allowedConfigTypes: (0 | 1 |
|
|
160
|
+
export declare const allowedConfigTypes: (0 | 1 | 2 | 4 | 8 | 7 | 3 | 5 | 6 | 9)[];
|
|
161
161
|
export type ConfigTypeLabel = keyof typeof ConfigTypes;
|
|
162
162
|
export type ConfigTypeValue = (typeof ConfigTypes)[ConfigTypeLabel];
|
|
163
163
|
export declare const IncrementalAlterConfigOperationTypes: {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Reader } from "../../protocol/reader";
|
|
2
|
+
import { Writer } from "../../protocol/writer";
|
|
3
|
+
export type AddOffsetsToTxnRequest = Parameters<typeof createRequest>;
|
|
4
|
+
export interface AddOffsetsToTxnResponse {
|
|
5
|
+
throttleTimeMs: number;
|
|
6
|
+
errorCode: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function createRequest(transactionalId: string, producerId: bigint, producerEpoch: number, groupId: string): Writer;
|
|
9
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): AddOffsetsToTxnResponse;
|
|
10
|
+
export declare const api: import("../definitions").API<[transactionalId: string, producerId: bigint, producerEpoch: number, groupId: string], AddOffsetsToTxnResponse>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Reader } from "../../protocol/reader";
|
|
2
|
+
import { Writer } from "../../protocol/writer";
|
|
3
|
+
export type AddOffsetsToTxnRequest = Parameters<typeof createRequest>;
|
|
4
|
+
export interface AddOffsetsToTxnResponse {
|
|
5
|
+
throttleTimeMs: number;
|
|
6
|
+
errorCode: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function createRequest(transactionalId: string, producerId: bigint, producerEpoch: number, groupId: string): Writer;
|
|
9
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): AddOffsetsToTxnResponse;
|
|
10
|
+
export declare const api: import("../definitions").API<[transactionalId: string, producerId: bigint, producerEpoch: number, groupId: string], AddOffsetsToTxnResponse>;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * as addOffsetsToTxnV1 from "./add-offsets-to-txn-v1";
|
|
2
|
+
export * as addOffsetsToTxnV2 from "./add-offsets-to-txn-v2";
|
|
1
3
|
export * as addOffsetsToTxnV3 from "./add-offsets-to-txn-v3";
|
|
2
4
|
export * as addOffsetsToTxnV4 from "./add-offsets-to-txn-v4";
|
|
3
5
|
export * as addPartitionsToTxnV3 from "./add-partitions-to-txn-v3";
|
|
@@ -5,6 +7,7 @@ export * as addPartitionsToTxnV4 from "./add-partitions-to-txn-v4";
|
|
|
5
7
|
export * as addPartitionsToTxnV5 from "./add-partitions-to-txn-v5";
|
|
6
8
|
export * as endTxnV3 from "./end-txn-v3";
|
|
7
9
|
export * as endTxnV4 from "./end-txn-v4";
|
|
10
|
+
export * as initProducerIdV3 from "./init-producer-id-v3";
|
|
8
11
|
export * as initProducerIdV4 from "./init-producer-id-v4";
|
|
9
12
|
export * as initProducerIdV5 from "./init-producer-id-v5";
|
|
10
13
|
export * as produceV10 from "./produce-v10";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type NullableString } from "../../protocol/definitions";
|
|
2
|
+
import { type Reader } from "../../protocol/reader";
|
|
3
|
+
import { Writer } from "../../protocol/writer";
|
|
4
|
+
export type InitProducerIdRequest = Parameters<typeof createRequest>;
|
|
5
|
+
export interface InitProducerIdResponseCoordinator {
|
|
6
|
+
key: string;
|
|
7
|
+
nodeId: number;
|
|
8
|
+
host: string;
|
|
9
|
+
port: number;
|
|
10
|
+
errorCode: number;
|
|
11
|
+
errorMessage: NullableString;
|
|
12
|
+
}
|
|
13
|
+
export interface InitProducerIdResponse {
|
|
14
|
+
throttleTimeMs: number;
|
|
15
|
+
errorCode: number;
|
|
16
|
+
producerId: bigint;
|
|
17
|
+
producerEpoch: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function createRequest(transactionalId: NullableString, transactionTimeoutMs: number, producerId: bigint, producerEpoch: number): Writer;
|
|
20
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): InitProducerIdResponse;
|
|
21
|
+
export declare const api: import("../definitions").API<[transactionalId: NullableString, transactionTimeoutMs: number, producerId: bigint, producerEpoch: number], InitProducerIdResponse>;
|
|
@@ -494,7 +494,7 @@ export declare const describeConfigsOptionsSchema: {
|
|
|
494
494
|
properties: {
|
|
495
495
|
resourceType: {
|
|
496
496
|
type: string;
|
|
497
|
-
enum: (0 | 1 |
|
|
497
|
+
enum: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
498
498
|
};
|
|
499
499
|
resourceName: {
|
|
500
500
|
type: string;
|
|
@@ -533,7 +533,7 @@ export declare const alterConfigsOptionsSchema: {
|
|
|
533
533
|
properties: {
|
|
534
534
|
resourceType: {
|
|
535
535
|
type: string;
|
|
536
|
-
enum: (0 | 1 |
|
|
536
|
+
enum: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
537
537
|
};
|
|
538
538
|
resourceName: {
|
|
539
539
|
type: string;
|
|
@@ -580,7 +580,7 @@ export declare const incrementalAlterConfigsOptionsSchema: {
|
|
|
580
580
|
properties: {
|
|
581
581
|
resourceType: {
|
|
582
582
|
type: string;
|
|
583
|
-
enum: (0 | 1 |
|
|
583
|
+
enum: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
584
584
|
};
|
|
585
585
|
resourceName: {
|
|
586
586
|
type: string;
|
|
@@ -648,7 +648,7 @@ export declare const createAclsOptionsSchema: {
|
|
|
648
648
|
properties: {
|
|
649
649
|
resourceType: {
|
|
650
650
|
type: string;
|
|
651
|
-
enum: (0 | 1 |
|
|
651
|
+
enum: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
652
652
|
};
|
|
653
653
|
resourceName: {
|
|
654
654
|
type: string;
|
|
@@ -668,7 +668,7 @@ export declare const createAclsOptionsSchema: {
|
|
|
668
668
|
};
|
|
669
669
|
operation: {
|
|
670
670
|
type: string;
|
|
671
|
-
enum: (0 | 1 |
|
|
671
|
+
enum: (0 | 1 | 2 | 4 | 8 | 7 | 10 | 3 | 5 | 6 | 9 | 11 | 12 | 13 | 14 | 15)[];
|
|
672
672
|
};
|
|
673
673
|
permissionType: {
|
|
674
674
|
type: string;
|
|
@@ -692,7 +692,7 @@ export declare const describeAclsOptionsSchema: {
|
|
|
692
692
|
properties: {
|
|
693
693
|
resourceType: {
|
|
694
694
|
type: string;
|
|
695
|
-
enum: (0 | 1 |
|
|
695
|
+
enum: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
696
696
|
};
|
|
697
697
|
resourceName: {
|
|
698
698
|
anyOf: ({
|
|
@@ -727,7 +727,7 @@ export declare const describeAclsOptionsSchema: {
|
|
|
727
727
|
};
|
|
728
728
|
operation: {
|
|
729
729
|
type: string;
|
|
730
|
-
enum: (0 | 1 |
|
|
730
|
+
enum: (0 | 1 | 2 | 4 | 8 | 7 | 10 | 3 | 5 | 6 | 9 | 11 | 12 | 13 | 14 | 15)[];
|
|
731
731
|
};
|
|
732
732
|
permissionType: {
|
|
733
733
|
type: string;
|
|
@@ -751,7 +751,7 @@ export declare const deleteAclsOptionsSchema: {
|
|
|
751
751
|
properties: {
|
|
752
752
|
resourceType: {
|
|
753
753
|
type: string;
|
|
754
|
-
enum: (0 | 1 |
|
|
754
|
+
enum: (0 | 1 | 2 | 4 | 7 | 3 | 5 | 6)[];
|
|
755
755
|
};
|
|
756
756
|
resourceName: {
|
|
757
757
|
anyOf: ({
|
|
@@ -786,7 +786,7 @@ export declare const deleteAclsOptionsSchema: {
|
|
|
786
786
|
};
|
|
787
787
|
operation: {
|
|
788
788
|
type: string;
|
|
789
|
-
enum: (0 | 1 |
|
|
789
|
+
enum: (0 | 1 | 2 | 4 | 8 | 7 | 10 | 3 | 5 | 6 | 9 | 11 | 12 | 13 | 14 | 15)[];
|
|
790
790
|
};
|
|
791
791
|
permissionType: {
|
|
792
792
|
type: string;
|
|
@@ -67,8 +67,15 @@ export declare const baseOptionsSchema: {
|
|
|
67
67
|
})[];
|
|
68
68
|
};
|
|
69
69
|
retryDelay: {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
oneOf: ({
|
|
71
|
+
type: string;
|
|
72
|
+
minimum: number;
|
|
73
|
+
function?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
function: boolean;
|
|
76
|
+
type?: undefined;
|
|
77
|
+
minimum?: undefined;
|
|
78
|
+
})[];
|
|
72
79
|
};
|
|
73
80
|
maxInflights: {
|
|
74
81
|
type: string;
|
|
@@ -29,12 +29,13 @@ export interface ClusterMetadata {
|
|
|
29
29
|
topics: Map<string, ClusterTopicMetadata>;
|
|
30
30
|
lastUpdate: number;
|
|
31
31
|
}
|
|
32
|
+
export type RetryDelayGetter<Owner = object> = (client: Owner, operationId: string, attempt: number, retries: number, error: Error) => number;
|
|
32
33
|
export interface BaseOptions extends ConnectionOptions {
|
|
33
34
|
clientId: string;
|
|
34
35
|
bootstrapBrokers: Broker[] | string[];
|
|
35
36
|
timeout?: number;
|
|
36
37
|
retries?: number | boolean;
|
|
37
|
-
retryDelay?: number;
|
|
38
|
+
retryDelay?: number | RetryDelayGetter;
|
|
38
39
|
metadataMaxAge?: number;
|
|
39
40
|
autocreateTopics?: boolean;
|
|
40
41
|
strict?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Readable } from 'node:stream';
|
|
2
2
|
import { type CallbackWithPromise } from "../../apis/callbacks";
|
|
3
|
-
import {
|
|
3
|
+
import type { ConnectionPool } from "../../network/connection-pool";
|
|
4
4
|
import { type Message } from "../../protocol/records";
|
|
5
5
|
import { kAutocommit, kInstance, kRefreshOffsetsAndFetch } from "../../symbols";
|
|
6
6
|
import { kConnections, kInspect } from "../base/base";
|
|
7
|
-
import {
|
|
7
|
+
import type { Consumer } from "./consumer";
|
|
8
8
|
import { type CommitOptionsPartition, type ConsumeOptions } from "./types";
|
|
9
9
|
export declare function noopDeserializer(data?: Buffer): Buffer | undefined;
|
|
10
10
|
export declare function defaultCorruptedMessageHandler(): boolean;
|
|
@@ -45,10 +45,6 @@ export declare class ProtocolError extends GenericError {
|
|
|
45
45
|
static code: ErrorCode;
|
|
46
46
|
constructor(codeOrId: string | number, serverErrorMessage?: NullableString, properties?: ErrorProperties, response?: unknown);
|
|
47
47
|
}
|
|
48
|
-
export declare class OutOfBoundsError extends GenericError {
|
|
49
|
-
static code: ErrorCode;
|
|
50
|
-
constructor(message: string, properties?: ErrorProperties);
|
|
51
|
-
}
|
|
52
48
|
export declare class ResponseError extends MultipleErrors {
|
|
53
49
|
static code: ErrorCode;
|
|
54
50
|
constructor(apiName: number, apiVersion: number, errors: Record<string, [number, NullableString]>, response: unknown, properties?: ErrorProperties);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicBuffer } from
|
|
1
|
+
import { DynamicBuffer } from '@platformatic/dynamic-buffer';
|
|
2
2
|
export type SyncCompressionPhase = (data: Buffer | DynamicBuffer) => Buffer;
|
|
3
3
|
export type CompressionOperation = (data: Buffer) => Buffer;
|
|
4
4
|
export interface CompressionAlgorithmSpecification {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicBuffer } from
|
|
1
|
+
import { DynamicBuffer } from '@platformatic/dynamic-buffer';
|
|
2
2
|
export declare function loadNativeCRC32C(): typeof jsCRC32C | null;
|
|
3
3
|
export declare function jsCRC32C(data: Buffer | Uint8Array | DynamicBuffer): number;
|
|
4
4
|
export declare const crc32c: typeof jsCRC32C;
|
|
@@ -2,7 +2,6 @@ export * from "./apis";
|
|
|
2
2
|
export * from "./compression";
|
|
3
3
|
export * from "./crc32c";
|
|
4
4
|
export * from "./definitions";
|
|
5
|
-
export * from "./dynamic-buffer";
|
|
6
5
|
export * from "./errors";
|
|
7
6
|
export * from "./murmur2";
|
|
8
7
|
export * from "./reader";
|
|
@@ -11,5 +10,4 @@ export * as saslOAuthBearer from "./sasl/oauth-bearer";
|
|
|
11
10
|
export * as saslPlain from "./sasl/plain";
|
|
12
11
|
export * as saslScramSha from "./sasl/scram-sha";
|
|
13
12
|
export * as saslUtils from "./sasl/utils";
|
|
14
|
-
export * from "./varint";
|
|
15
13
|
export * from "./writer";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DynamicBuffer } from
|
|
1
|
+
import { DynamicBuffer } from '@platformatic/dynamic-buffer';
|
|
2
2
|
import { Writer } from "./writer";
|
|
3
3
|
export type EntryReader<OutputType> = (reader: Reader, index: number) => OutputType;
|
|
4
4
|
declare const instanceIdentifier: unique symbol;
|
|
@@ -48,7 +48,7 @@ export declare class Reader {
|
|
|
48
48
|
readUUID(): string;
|
|
49
49
|
readNullableBytes(compact?: boolean): Buffer | null;
|
|
50
50
|
readBytes(compact?: boolean): Buffer;
|
|
51
|
-
readVarIntBytes(): Buffer;
|
|
51
|
+
readVarIntBytes(): Buffer | null;
|
|
52
52
|
readNullableArray<OutputType>(reader: EntryReader<OutputType>, compact?: boolean, discardTrailingTaggedFields?: boolean): OutputType[] | null;
|
|
53
53
|
readNullableMap<Key, Value>(reader: EntryReader<[Key, Value]>, compact?: boolean, discardTrailingTaggedFields?: boolean): Map<Key, Value> | null;
|
|
54
54
|
readArray<OutputType>(reader: EntryReader<OutputType>, compact?: boolean, discardTrailingTaggedFields?: boolean): OutputType[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NumericMap } from "../utils";
|
|
2
2
|
import { type CompressionAlgorithmValue } from "./compression";
|
|
3
3
|
import { type NullableString } from "./definitions";
|
|
4
4
|
import { Reader } from "./reader";
|
|
@@ -64,9 +64,9 @@ export interface KafkaRecord {
|
|
|
64
64
|
attributes: number;
|
|
65
65
|
timestampDelta: bigint;
|
|
66
66
|
offsetDelta: number;
|
|
67
|
-
key: Buffer;
|
|
68
|
-
value: Buffer;
|
|
69
|
-
headers: [Buffer, Buffer][];
|
|
67
|
+
key: Buffer | null;
|
|
68
|
+
value: Buffer | null;
|
|
69
|
+
headers: [Buffer | null, Buffer | null][];
|
|
70
70
|
}
|
|
71
71
|
export interface MessageToConsume extends KafkaRecord {
|
|
72
72
|
topic: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { DynamicBuffer } from '@platformatic/dynamic-buffer';
|
|
1
2
|
import { type NullableString } from "./definitions";
|
|
2
|
-
import { DynamicBuffer } from "./dynamic-buffer";
|
|
3
3
|
export type ChildrenWriter = (w: Writer) => void;
|
|
4
4
|
export type EntryWriter<InputType> = (writer: Writer, entry: InputType, index: number) => void;
|
|
5
5
|
declare const instanceIdentifier: unique symbol;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type DynamicBuffer } from '@platformatic/dynamic-buffer';
|
|
1
2
|
import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
2
3
|
import debug from 'debug';
|
|
3
|
-
import { type DynamicBuffer } from "./protocol/dynamic-buffer";
|
|
4
4
|
export interface EnumerationDefinition<T> {
|
|
5
5
|
allowed: T[];
|
|
6
6
|
errorMessage?: string;
|
|
@@ -34,4 +34,5 @@ export declare function enumErrorMessage(type: Record<string, unknown>, keysOnly
|
|
|
34
34
|
export declare function groupByProperty<Key extends PropertyKey, Value>(entries: readonly Value[], property: keyof Value): [Key, Value[]][];
|
|
35
35
|
export declare function humanize(label: string, buffer: Buffer | DynamicBuffer): string;
|
|
36
36
|
export declare function setDebugDumpLogger(logger: DebugDumpLogger): void;
|
|
37
|
-
export declare function debugDump(...values: unknown[]): void;
|
|
37
|
+
export declare function debugDump(...values: unknown[]): void;
|
|
38
|
+
export declare function emitExperimentalApiWarning(api: string): void;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type DynamicBuffer } from '@platformatic/dynamic-buffer';
|
|
1
2
|
import { Ajv2020 } from 'ajv/dist/2020.js';
|
|
2
3
|
import debug from 'debug';
|
|
3
|
-
import { type DynamicBuffer } from './protocol/dynamic-buffer.ts';
|
|
4
4
|
export interface EnumerationDefinition<T> {
|
|
5
5
|
allowed: T[];
|
|
6
6
|
errorMessage?: string;
|
|
@@ -35,3 +35,4 @@ export declare function groupByProperty<Key extends PropertyKey, Value>(entries:
|
|
|
35
35
|
export declare function humanize(label: string, buffer: Buffer | DynamicBuffer): string;
|
|
36
36
|
export declare function setDebugDumpLogger(logger: DebugDumpLogger): void;
|
|
37
37
|
export declare function debugDump(...values: unknown[]): void;
|
|
38
|
+
export declare function emitExperimentalApiWarning(api: string): void;
|
package/dist/utils.js
CHANGED
|
@@ -156,3 +156,6 @@ export function setDebugDumpLogger(logger) {
|
|
|
156
156
|
export function debugDump(...values) {
|
|
157
157
|
debugDumpLogger(new Date().toISOString(), ...values.map(v => (typeof v === 'string' ? v : inspect(v, false, 10))));
|
|
158
158
|
}
|
|
159
|
+
export function emitExperimentalApiWarning(api) {
|
|
160
|
+
process.emitWarning(`The ${api} API is experimental and does not follow semver. It may change in minor/patch releases.`);
|
|
161
|
+
}
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@platformatic/kafka";
|
|
2
|
-
export const version = "1.27.0
|
|
2
|
+
export const version = "1.27.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/kafka",
|
|
3
|
-
"version": "1.27.0
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "Modern and performant client for Apache Kafka",
|
|
5
5
|
"homepage": "https://github.com/platformatic/kafka",
|
|
6
6
|
"author": "Platformatic Inc. <oss@platformatic.dev> (https://platformatic.dev)",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"exports": "./dist/index.js",
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@platformatic/dynamic-buffer": "^0.3.0",
|
|
29
|
+
"@platformatic/wasm-utils": "^0.1.0",
|
|
28
30
|
"ajv": "^8.17.1",
|
|
29
31
|
"debug": "^4.4.3",
|
|
30
32
|
"fastq": "^1.19.1",
|
|
@@ -33,9 +35,7 @@
|
|
|
33
35
|
},
|
|
34
36
|
"optionalDependencies": {
|
|
35
37
|
"@node-rs/crc32": "^1.10.6",
|
|
36
|
-
"
|
|
37
|
-
"protobufjs": "^8.0.0",
|
|
38
|
-
"snappy": "^7.3.3"
|
|
38
|
+
"protobufjs": "^8.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/generator": "^7.28.5",
|
|
@@ -45,11 +45,12 @@
|
|
|
45
45
|
"@confluentinc/kafka-javascript": "^1.5.0",
|
|
46
46
|
"@opentelemetry/instrumentation": "^0.210.0",
|
|
47
47
|
"@platformatic/rdkafka": "^4.0.0",
|
|
48
|
+
"@swc-node/register": "^1.11.1",
|
|
48
49
|
"@types/babel__generator": "^7.27.0",
|
|
49
50
|
"@types/babel__traverse": "^7.28.0",
|
|
50
51
|
"@types/debug": "^4.1.12",
|
|
51
52
|
"@types/kerberos": "^1.1.5",
|
|
52
|
-
"@types/node": "^22.18.
|
|
53
|
+
"@types/node": "^22.18.8",
|
|
53
54
|
"@types/semver": "^7.7.1",
|
|
54
55
|
"@watchable/unpromise": "^1.0.2",
|
|
55
56
|
"avsc": "^5.7.9",
|
|
@@ -63,12 +64,14 @@
|
|
|
63
64
|
"json5": "^2.2.3",
|
|
64
65
|
"kafkajs": "^2.2.4",
|
|
65
66
|
"kerberos": "^2.2.2",
|
|
67
|
+
"lz4-napi": "^2.9.0",
|
|
66
68
|
"neostandard": "^0.12.2",
|
|
67
69
|
"parse5": "^7.3.0",
|
|
68
70
|
"prettier": "^3.8.1",
|
|
69
71
|
"prettier-plugin-space-before-function-paren": "^0.0.10",
|
|
70
72
|
"prom-client": "^15.1.3",
|
|
71
73
|
"semver": "^7.7.2",
|
|
74
|
+
"snappy": "^7.3.3",
|
|
72
75
|
"table": "^6.9.0",
|
|
73
76
|
"typescript": "^5.9.2"
|
|
74
77
|
},
|
|
@@ -84,16 +87,15 @@
|
|
|
84
87
|
},
|
|
85
88
|
"scripts": {
|
|
86
89
|
"build": "rm -rf dist && tsc -p tsconfig.base.json",
|
|
87
|
-
"postbuild": "node scripts/postbuild.ts",
|
|
90
|
+
"postbuild": "./scripts/node scripts/postbuild.ts",
|
|
88
91
|
"lint": "eslint --cache",
|
|
89
92
|
"typecheck": "tsc -p . --noEmit",
|
|
90
93
|
"format": "prettier -w benchmarks playground src test",
|
|
91
|
-
"test": "c8 -c test/config/c8-local.json node --
|
|
92
|
-
"test:ci": "c8 -c test/config/c8-ci.json node --
|
|
94
|
+
"test": "c8 -c test/config/c8-local.json ./scripts/node --test --test-reporter=cleaner-spec-reporter 'test/*.test.ts' 'test/*/*.test.ts' 'test/*/*/*.test.ts'",
|
|
95
|
+
"test:ci": "c8 -c test/config/c8-ci.json ./scripts/node --test --test-reporter=cleaner-spec-reporter 'test/*.test.ts' 'test/*/*.test.ts' 'test/*/*/*.test.ts'",
|
|
93
96
|
"test:docker:up": "docker-compose up -d --wait",
|
|
94
97
|
"test:docker:down": "docker-compose down",
|
|
95
98
|
"ci": "npm run build && npm run lint && npm run test:ci",
|
|
96
|
-
"ci:v20": "npm run lint && rm -rf dist && tsc -p tsconfig.json && node dist/scripts/postbuild.js && cd dist && node --env-file=../test/config/env --no-warnings --test --test-timeout=600000",
|
|
97
99
|
"generate:apis": "node scripts/generate-apis.ts",
|
|
98
100
|
"generate:errors": "node scripts/generate-errors.ts",
|
|
99
101
|
"create:api": "node scripts/create-api.ts"
|