@platformatic/kafka 1.1.0 → 1.2.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/dist/apis/admin/index.d.ts +38 -37
- package/dist/apis/admin/index.js +38 -37
- package/dist/apis/admin/list-groups-v4.d.ts +17 -0
- package/dist/apis/admin/list-groups-v4.js +40 -0
- package/dist/apis/consumer/fetch-v16.js +121 -0
- package/dist/apis/consumer/fetch-v17.d.ts +46 -0
- package/dist/apis/consumer/index.d.ts +11 -9
- package/dist/apis/consumer/index.js +11 -9
- package/dist/apis/consumer/list-offsets-v8.js +68 -0
- package/dist/apis/consumer/list-offsets-v9.d.ts +30 -0
- package/dist/apis/metadata/api-versions-v3.js +41 -0
- package/dist/apis/metadata/api-versions-v4.d.ts +17 -0
- package/dist/apis/metadata/find-coordinator-v4.js +50 -0
- package/dist/apis/metadata/find-coordinator-v5.d.ts +19 -0
- package/dist/apis/metadata/find-coordinator-v5.js +50 -0
- package/dist/apis/metadata/find-coordinator-v6.d.ts +19 -0
- package/dist/apis/metadata/index.d.ts +6 -3
- package/dist/apis/metadata/index.js +6 -3
- package/dist/apis/producer/index.d.ts +8 -6
- package/dist/apis/producer/index.js +8 -6
- package/dist/apis/producer/init-producer-id-v4.js +38 -0
- package/dist/apis/producer/init-producer-id-v5.d.ts +21 -0
- package/dist/apis/producer/produce-v10.js +104 -0
- package/dist/apis/producer/produce-v11.d.ts +29 -0
- package/dist/apis/security/index.d.ts +2 -2
- package/dist/apis/security/index.js +2 -2
- package/dist/apis/telemetry/index.d.ts +3 -3
- package/dist/apis/telemetry/index.js +3 -3
- package/dist/clients/admin/admin.js +49 -13
- package/dist/clients/base/base.d.ts +10 -1
- package/dist/clients/base/base.js +74 -5
- package/dist/clients/base/options.d.ts +2 -0
- package/dist/clients/base/options.js +5 -0
- package/dist/clients/consumer/consumer.d.ts +1 -1
- package/dist/clients/consumer/consumer.js +66 -21
- package/dist/clients/consumer/types.d.ts +2 -2
- package/dist/clients/producer/producer.js +17 -7
- package/dist/diagnostic.d.ts +1 -0
- package/dist/diagnostic.js +1 -0
- package/dist/errors.d.ts +5 -1
- package/dist/errors.js +12 -5
- package/dist/protocol/sasl/plain.d.ts +1 -1
- package/dist/protocol/sasl/scram-sha.d.ts +1 -1
- package/package.json +15 -17
- /package/dist/apis/admin/{alter-client-quotas.d.ts → alter-client-quotas-v1.d.ts} +0 -0
- /package/dist/apis/admin/{alter-client-quotas.js → alter-client-quotas-v1.js} +0 -0
- /package/dist/apis/admin/{alter-configs.d.ts → alter-configs-v2.d.ts} +0 -0
- /package/dist/apis/admin/{alter-configs.js → alter-configs-v2.js} +0 -0
- /package/dist/apis/admin/{alter-partition-reassignments.d.ts → alter-partition-reassignments-v0.d.ts} +0 -0
- /package/dist/apis/admin/{alter-partition-reassignments.js → alter-partition-reassignments-v0.js} +0 -0
- /package/dist/apis/admin/{alter-partition.d.ts → alter-partition-v3.d.ts} +0 -0
- /package/dist/apis/admin/{alter-partition.js → alter-partition-v3.js} +0 -0
- /package/dist/apis/admin/{alter-replica-log-dirs.d.ts → alter-replica-log-dirs-v2.d.ts} +0 -0
- /package/dist/apis/admin/{alter-replica-log-dirs.js → alter-replica-log-dirs-v2.js} +0 -0
- /package/dist/apis/admin/{alter-user-scram-credentials.d.ts → alter-user-scram-credentials-v0.d.ts} +0 -0
- /package/dist/apis/admin/{alter-user-scram-credentials.js → alter-user-scram-credentials-v0.js} +0 -0
- /package/dist/apis/admin/{consumer-group-describe.d.ts → consumer-group-describe-v0.d.ts} +0 -0
- /package/dist/apis/admin/{consumer-group-describe.js → consumer-group-describe-v0.js} +0 -0
- /package/dist/apis/admin/{create-acls.d.ts → create-acls-v3.d.ts} +0 -0
- /package/dist/apis/admin/{create-acls.js → create-acls-v3.js} +0 -0
- /package/dist/apis/admin/{create-delegation-token.d.ts → create-delegation-token-v3.d.ts} +0 -0
- /package/dist/apis/admin/{create-delegation-token.js → create-delegation-token-v3.js} +0 -0
- /package/dist/apis/admin/{create-partitions.d.ts → create-partitions-v3.d.ts} +0 -0
- /package/dist/apis/admin/{create-partitions.js → create-partitions-v3.js} +0 -0
- /package/dist/apis/admin/{create-topics.d.ts → create-topics-v7.d.ts} +0 -0
- /package/dist/apis/admin/{create-topics.js → create-topics-v7.js} +0 -0
- /package/dist/apis/admin/{delete-acls.d.ts → delete-acls-v3.d.ts} +0 -0
- /package/dist/apis/admin/{delete-acls.js → delete-acls-v3.js} +0 -0
- /package/dist/apis/admin/{delete-groups.d.ts → delete-groups-v2.d.ts} +0 -0
- /package/dist/apis/admin/{delete-groups.js → delete-groups-v2.js} +0 -0
- /package/dist/apis/admin/{delete-records.d.ts → delete-records-v2.d.ts} +0 -0
- /package/dist/apis/admin/{delete-records.js → delete-records-v2.js} +0 -0
- /package/dist/apis/admin/{delete-topics.d.ts → delete-topics-v6.d.ts} +0 -0
- /package/dist/apis/admin/{delete-topics.js → delete-topics-v6.js} +0 -0
- /package/dist/apis/admin/{describe-acls.d.ts → describe-acls-v3.d.ts} +0 -0
- /package/dist/apis/admin/{describe-acls.js → describe-acls-v3.js} +0 -0
- /package/dist/apis/admin/{describe-client-quotas.d.ts → describe-client-quotas-v0.d.ts} +0 -0
- /package/dist/apis/admin/{describe-client-quotas.js → describe-client-quotas-v0.js} +0 -0
- /package/dist/apis/admin/{describe-cluster.d.ts → describe-cluster-v1.d.ts} +0 -0
- /package/dist/apis/admin/{describe-cluster.js → describe-cluster-v1.js} +0 -0
- /package/dist/apis/admin/{describe-configs.d.ts → describe-configs-v4.d.ts} +0 -0
- /package/dist/apis/admin/{describe-configs.js → describe-configs-v4.js} +0 -0
- /package/dist/apis/admin/{describe-delegation-token.d.ts → describe-delegation-token-v3.d.ts} +0 -0
- /package/dist/apis/admin/{describe-delegation-token.js → describe-delegation-token-v3.js} +0 -0
- /package/dist/apis/admin/{describe-groups.d.ts → describe-groups-v5.d.ts} +0 -0
- /package/dist/apis/admin/{describe-groups.js → describe-groups-v5.js} +0 -0
- /package/dist/apis/admin/{describe-log-dirs.d.ts → describe-log-dirs-v4.d.ts} +0 -0
- /package/dist/apis/admin/{describe-log-dirs.js → describe-log-dirs-v4.js} +0 -0
- /package/dist/apis/admin/{describe-producers.d.ts → describe-producers-v0.d.ts} +0 -0
- /package/dist/apis/admin/{describe-producers.js → describe-producers-v0.js} +0 -0
- /package/dist/apis/admin/{describe-quorum.d.ts → describe-quorum-v2.d.ts} +0 -0
- /package/dist/apis/admin/{describe-quorum.js → describe-quorum-v2.js} +0 -0
- /package/dist/apis/admin/{describe-topic-partitions.d.ts → describe-topic-partitions-v0.d.ts} +0 -0
- /package/dist/apis/admin/{describe-topic-partitions.js → describe-topic-partitions-v0.js} +0 -0
- /package/dist/apis/admin/{describe-transactions.d.ts → describe-transactions-v0.d.ts} +0 -0
- /package/dist/apis/admin/{describe-transactions.js → describe-transactions-v0.js} +0 -0
- /package/dist/apis/admin/{describe-user-scram-credentials.d.ts → describe-user-scram-credentials-v0.d.ts} +0 -0
- /package/dist/apis/admin/{describe-user-scram-credentials.js → describe-user-scram-credentials-v0.js} +0 -0
- /package/dist/apis/admin/{envelope.d.ts → envelope-v0.d.ts} +0 -0
- /package/dist/apis/admin/{envelope.js → envelope-v0.js} +0 -0
- /package/dist/apis/admin/{expire-delegation-token.d.ts → expire-delegation-token-v2.d.ts} +0 -0
- /package/dist/apis/admin/{expire-delegation-token.js → expire-delegation-token-v2.js} +0 -0
- /package/dist/apis/admin/{incremental-alter-configs.d.ts → incremental-alter-configs-v1.d.ts} +0 -0
- /package/dist/apis/admin/{incremental-alter-configs.js → incremental-alter-configs-v1.js} +0 -0
- /package/dist/apis/admin/{list-groups.d.ts → list-groups-v5.d.ts} +0 -0
- /package/dist/apis/admin/{list-groups.js → list-groups-v5.js} +0 -0
- /package/dist/apis/admin/{list-partition-reassignments.d.ts → list-partition-reassignments-v0.d.ts} +0 -0
- /package/dist/apis/admin/{list-partition-reassignments.js → list-partition-reassignments-v0.js} +0 -0
- /package/dist/apis/admin/{list-transactions.d.ts → list-transactions-v1.d.ts} +0 -0
- /package/dist/apis/admin/{list-transactions.js → list-transactions-v1.js} +0 -0
- /package/dist/apis/admin/{offset-delete.d.ts → offset-delete-v0.d.ts} +0 -0
- /package/dist/apis/admin/{offset-delete.js → offset-delete-v0.js} +0 -0
- /package/dist/apis/admin/{renew-delegation-token.d.ts → renew-delegation-token-v2.d.ts} +0 -0
- /package/dist/apis/admin/{renew-delegation-token.js → renew-delegation-token-v2.js} +0 -0
- /package/dist/apis/admin/{unregister-broker.d.ts → unregister-broker-v0.d.ts} +0 -0
- /package/dist/apis/admin/{unregister-broker.js → unregister-broker-v0.js} +0 -0
- /package/dist/apis/admin/{update-features.d.ts → update-features-v1.d.ts} +0 -0
- /package/dist/apis/admin/{update-features.js → update-features-v1.js} +0 -0
- /package/dist/apis/consumer/{consumer-group-heartbeat.d.ts → consumer-group-heartbeat-v0.d.ts} +0 -0
- /package/dist/apis/consumer/{consumer-group-heartbeat.js → consumer-group-heartbeat-v0.js} +0 -0
- /package/dist/apis/consumer/{fetch.d.ts → fetch-v16.d.ts} +0 -0
- /package/dist/apis/consumer/{fetch.js → fetch-v17.js} +0 -0
- /package/dist/apis/consumer/{heartbeat.d.ts → heartbeat-v4.d.ts} +0 -0
- /package/dist/apis/consumer/{heartbeat.js → heartbeat-v4.js} +0 -0
- /package/dist/apis/consumer/{join-group.d.ts → join-group-v9.d.ts} +0 -0
- /package/dist/apis/consumer/{join-group.js → join-group-v9.js} +0 -0
- /package/dist/apis/consumer/{leave-group.d.ts → leave-group-v5.d.ts} +0 -0
- /package/dist/apis/consumer/{leave-group.js → leave-group-v5.js} +0 -0
- /package/dist/apis/consumer/{list-offsets.d.ts → list-offsets-v8.d.ts} +0 -0
- /package/dist/apis/consumer/{list-offsets.js → list-offsets-v9.js} +0 -0
- /package/dist/apis/consumer/{offset-commit.d.ts → offset-commit-v9.d.ts} +0 -0
- /package/dist/apis/consumer/{offset-commit.js → offset-commit-v9.js} +0 -0
- /package/dist/apis/consumer/{offset-fetch.d.ts → offset-fetch-v9.d.ts} +0 -0
- /package/dist/apis/consumer/{offset-fetch.js → offset-fetch-v9.js} +0 -0
- /package/dist/apis/consumer/{sync-group.d.ts → sync-group-v5.d.ts} +0 -0
- /package/dist/apis/consumer/{sync-group.js → sync-group-v5.js} +0 -0
- /package/dist/apis/metadata/{api-versions.d.ts → api-versions-v3.d.ts} +0 -0
- /package/dist/apis/metadata/{api-versions.js → api-versions-v4.js} +0 -0
- /package/dist/apis/metadata/{find-coordinator.d.ts → find-coordinator-v4.d.ts} +0 -0
- /package/dist/apis/metadata/{find-coordinator.js → find-coordinator-v6.js} +0 -0
- /package/dist/apis/metadata/{metadata.d.ts → metadata-v12.d.ts} +0 -0
- /package/dist/apis/metadata/{metadata.js → metadata-v12.js} +0 -0
- /package/dist/apis/producer/{add-offsets-to-txn.d.ts → add-offsets-to-txn-v4.d.ts} +0 -0
- /package/dist/apis/producer/{add-offsets-to-txn.js → add-offsets-to-txn-v4.js} +0 -0
- /package/dist/apis/producer/{add-partitions-to-txn.d.ts → add-partitions-to-txn-v5.d.ts} +0 -0
- /package/dist/apis/producer/{add-partitions-to-txn.js → add-partitions-to-txn-v5.js} +0 -0
- /package/dist/apis/producer/{end-txn.d.ts → end-txn-v4.d.ts} +0 -0
- /package/dist/apis/producer/{end-txn.js → end-txn-v4.js} +0 -0
- /package/dist/apis/producer/{init-producer-id.d.ts → init-producer-id-v4.d.ts} +0 -0
- /package/dist/apis/producer/{init-producer-id.js → init-producer-id-v5.js} +0 -0
- /package/dist/apis/producer/{produce.d.ts → produce-v10.d.ts} +0 -0
- /package/dist/apis/producer/{produce.js → produce-v11.js} +0 -0
- /package/dist/apis/producer/{txn-offset-commit.d.ts → txn-offset-commit-v4.d.ts} +0 -0
- /package/dist/apis/producer/{txn-offset-commit.js → txn-offset-commit-v4.js} +0 -0
- /package/dist/apis/security/{sasl-authenticate.d.ts → sasl-authenticate-v2.d.ts} +0 -0
- /package/dist/apis/security/{sasl-authenticate.js → sasl-authenticate-v2.js} +0 -0
- /package/dist/apis/security/{sasl-handshake.d.ts → sasl-handshake-v1.d.ts} +0 -0
- /package/dist/apis/security/{sasl-handshake.js → sasl-handshake-v1.js} +0 -0
- /package/dist/apis/telemetry/{get-telemetry-subscriptions.d.ts → get-telemetry-subscriptions-v0.d.ts} +0 -0
- /package/dist/apis/telemetry/{get-telemetry-subscriptions.js → get-telemetry-subscriptions-v0.js} +0 -0
- /package/dist/apis/telemetry/{list-client-metrics-resources.d.ts → list-client-metrics-resources-v0.d.ts} +0 -0
- /package/dist/apis/telemetry/{list-client-metrics-resources.js → list-client-metrics-resources-v0.js} +0 -0
- /package/dist/apis/telemetry/{push-telemetry.d.ts → push-telemetry-v0.d.ts} +0 -0
- /package/dist/apis/telemetry/{push-telemetry.js → push-telemetry-v0.js} +0 -0
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
export * as alterClientQuotasV1 from './alter-client-quotas.ts';
|
|
2
|
-
export * as alterConfigsV2 from './alter-configs.ts';
|
|
3
|
-
export * as alterPartitionReassignmentsV0 from './alter-partition-reassignments.ts';
|
|
4
|
-
export * as alterPartitionV3 from './alter-partition.ts';
|
|
5
|
-
export * as alterReplicaLogDirsV2 from './alter-replica-log-dirs.ts';
|
|
6
|
-
export * as alterUserScramCredentialsV0 from './alter-user-scram-credentials.ts';
|
|
7
|
-
export * as consumerGroupDescribeV0 from './consumer-group-describe.ts';
|
|
8
|
-
export * as createAclsV3 from './create-acls.ts';
|
|
9
|
-
export * as createDelegationTokenV3 from './create-delegation-token.ts';
|
|
10
|
-
export * as createPartitionsV3 from './create-partitions.ts';
|
|
11
|
-
export * as createTopicsV7 from './create-topics.ts';
|
|
12
|
-
export * as deleteAclsV3 from './delete-acls.ts';
|
|
13
|
-
export * as deleteGroupsV2 from './delete-groups.ts';
|
|
14
|
-
export * as deleteRecordsV2 from './delete-records.ts';
|
|
15
|
-
export * as deleteTopicsV6 from './delete-topics.ts';
|
|
16
|
-
export * as describeAclsV3 from './describe-acls.ts';
|
|
17
|
-
export * as describeClientQuotasV0 from './describe-client-quotas.ts';
|
|
18
|
-
export * as describeClusterV1 from './describe-cluster.ts';
|
|
19
|
-
export * as describeConfigsV4 from './describe-configs.ts';
|
|
20
|
-
export * as describeDelegationTokenV3 from './describe-delegation-token.ts';
|
|
21
|
-
export * as describeGroupsV5 from './describe-groups.ts';
|
|
22
|
-
export * as describeLogDirsV4 from './describe-log-dirs.ts';
|
|
23
|
-
export * as describeProducersV0 from './describe-producers.ts';
|
|
24
|
-
export * as describeQuorumV2 from './describe-quorum.ts';
|
|
25
|
-
export * as describeTopicPartitionsV0 from './describe-topic-partitions.ts';
|
|
26
|
-
export * as describeTransactionsV0 from './describe-transactions.ts';
|
|
27
|
-
export * as describeUserScramCredentialsV0 from './describe-user-scram-credentials.ts';
|
|
28
|
-
export * as envelopeV0 from './envelope.ts';
|
|
29
|
-
export * as expireDelegationTokenV2 from './expire-delegation-token.ts';
|
|
30
|
-
export * as incrementalAlterConfigsV1 from './incremental-alter-configs.ts';
|
|
31
|
-
export * as
|
|
32
|
-
export * as
|
|
33
|
-
export * as
|
|
34
|
-
export * as
|
|
35
|
-
export * as
|
|
36
|
-
export * as
|
|
37
|
-
export * as
|
|
1
|
+
export * as alterClientQuotasV1 from './alter-client-quotas-v1.ts';
|
|
2
|
+
export * as alterConfigsV2 from './alter-configs-v2.ts';
|
|
3
|
+
export * as alterPartitionReassignmentsV0 from './alter-partition-reassignments-v0.ts';
|
|
4
|
+
export * as alterPartitionV3 from './alter-partition-v3.ts';
|
|
5
|
+
export * as alterReplicaLogDirsV2 from './alter-replica-log-dirs-v2.ts';
|
|
6
|
+
export * as alterUserScramCredentialsV0 from './alter-user-scram-credentials-v0.ts';
|
|
7
|
+
export * as consumerGroupDescribeV0 from './consumer-group-describe-v0.ts';
|
|
8
|
+
export * as createAclsV3 from './create-acls-v3.ts';
|
|
9
|
+
export * as createDelegationTokenV3 from './create-delegation-token-v3.ts';
|
|
10
|
+
export * as createPartitionsV3 from './create-partitions-v3.ts';
|
|
11
|
+
export * as createTopicsV7 from './create-topics-v7.ts';
|
|
12
|
+
export * as deleteAclsV3 from './delete-acls-v3.ts';
|
|
13
|
+
export * as deleteGroupsV2 from './delete-groups-v2.ts';
|
|
14
|
+
export * as deleteRecordsV2 from './delete-records-v2.ts';
|
|
15
|
+
export * as deleteTopicsV6 from './delete-topics-v6.ts';
|
|
16
|
+
export * as describeAclsV3 from './describe-acls-v3.ts';
|
|
17
|
+
export * as describeClientQuotasV0 from './describe-client-quotas-v0.ts';
|
|
18
|
+
export * as describeClusterV1 from './describe-cluster-v1.ts';
|
|
19
|
+
export * as describeConfigsV4 from './describe-configs-v4.ts';
|
|
20
|
+
export * as describeDelegationTokenV3 from './describe-delegation-token-v3.ts';
|
|
21
|
+
export * as describeGroupsV5 from './describe-groups-v5.ts';
|
|
22
|
+
export * as describeLogDirsV4 from './describe-log-dirs-v4.ts';
|
|
23
|
+
export * as describeProducersV0 from './describe-producers-v0.ts';
|
|
24
|
+
export * as describeQuorumV2 from './describe-quorum-v2.ts';
|
|
25
|
+
export * as describeTopicPartitionsV0 from './describe-topic-partitions-v0.ts';
|
|
26
|
+
export * as describeTransactionsV0 from './describe-transactions-v0.ts';
|
|
27
|
+
export * as describeUserScramCredentialsV0 from './describe-user-scram-credentials-v0.ts';
|
|
28
|
+
export * as envelopeV0 from './envelope-v0.ts';
|
|
29
|
+
export * as expireDelegationTokenV2 from './expire-delegation-token-v2.ts';
|
|
30
|
+
export * as incrementalAlterConfigsV1 from './incremental-alter-configs-v1.ts';
|
|
31
|
+
export * as listGroupsV4 from './list-groups-v4.ts';
|
|
32
|
+
export * as listGroupsV5 from './list-groups-v5.ts';
|
|
33
|
+
export * as listPartitionReassignmentsV0 from './list-partition-reassignments-v0.ts';
|
|
34
|
+
export * as listTransactionsV1 from './list-transactions-v1.ts';
|
|
35
|
+
export * as offsetDeleteV0 from './offset-delete-v0.ts';
|
|
36
|
+
export * as renewDelegationTokenV2 from './renew-delegation-token-v2.ts';
|
|
37
|
+
export * as unregisterBrokerV0 from './unregister-broker-v0.ts';
|
|
38
|
+
export * as updateFeaturesV1 from './update-features-v1.ts';
|
package/dist/apis/admin/index.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
export * as alterClientQuotasV1 from "./alter-client-quotas.js";
|
|
2
|
-
export * as alterConfigsV2 from "./alter-configs.js";
|
|
3
|
-
export * as alterPartitionReassignmentsV0 from "./alter-partition-reassignments.js";
|
|
4
|
-
export * as alterPartitionV3 from "./alter-partition.js";
|
|
5
|
-
export * as alterReplicaLogDirsV2 from "./alter-replica-log-dirs.js";
|
|
6
|
-
export * as alterUserScramCredentialsV0 from "./alter-user-scram-credentials.js";
|
|
7
|
-
export * as consumerGroupDescribeV0 from "./consumer-group-describe.js";
|
|
8
|
-
export * as createAclsV3 from "./create-acls.js";
|
|
9
|
-
export * as createDelegationTokenV3 from "./create-delegation-token.js";
|
|
10
|
-
export * as createPartitionsV3 from "./create-partitions.js";
|
|
11
|
-
export * as createTopicsV7 from "./create-topics.js";
|
|
12
|
-
export * as deleteAclsV3 from "./delete-acls.js";
|
|
13
|
-
export * as deleteGroupsV2 from "./delete-groups.js";
|
|
14
|
-
export * as deleteRecordsV2 from "./delete-records.js";
|
|
15
|
-
export * as deleteTopicsV6 from "./delete-topics.js";
|
|
16
|
-
export * as describeAclsV3 from "./describe-acls.js";
|
|
17
|
-
export * as describeClientQuotasV0 from "./describe-client-quotas.js";
|
|
18
|
-
export * as describeClusterV1 from "./describe-cluster.js";
|
|
19
|
-
export * as describeConfigsV4 from "./describe-configs.js";
|
|
20
|
-
export * as describeDelegationTokenV3 from "./describe-delegation-token.js";
|
|
21
|
-
export * as describeGroupsV5 from "./describe-groups.js";
|
|
22
|
-
export * as describeLogDirsV4 from "./describe-log-dirs.js";
|
|
23
|
-
export * as describeProducersV0 from "./describe-producers.js";
|
|
24
|
-
export * as describeQuorumV2 from "./describe-quorum.js";
|
|
25
|
-
export * as describeTopicPartitionsV0 from "./describe-topic-partitions.js";
|
|
26
|
-
export * as describeTransactionsV0 from "./describe-transactions.js";
|
|
27
|
-
export * as describeUserScramCredentialsV0 from "./describe-user-scram-credentials.js";
|
|
28
|
-
export * as envelopeV0 from "./envelope.js";
|
|
29
|
-
export * as expireDelegationTokenV2 from "./expire-delegation-token.js";
|
|
30
|
-
export * as incrementalAlterConfigsV1 from "./incremental-alter-configs.js";
|
|
31
|
-
export * as
|
|
32
|
-
export * as
|
|
33
|
-
export * as
|
|
34
|
-
export * as
|
|
35
|
-
export * as
|
|
36
|
-
export * as
|
|
37
|
-
export * as
|
|
1
|
+
export * as alterClientQuotasV1 from "./alter-client-quotas-v1.js";
|
|
2
|
+
export * as alterConfigsV2 from "./alter-configs-v2.js";
|
|
3
|
+
export * as alterPartitionReassignmentsV0 from "./alter-partition-reassignments-v0.js";
|
|
4
|
+
export * as alterPartitionV3 from "./alter-partition-v3.js";
|
|
5
|
+
export * as alterReplicaLogDirsV2 from "./alter-replica-log-dirs-v2.js";
|
|
6
|
+
export * as alterUserScramCredentialsV0 from "./alter-user-scram-credentials-v0.js";
|
|
7
|
+
export * as consumerGroupDescribeV0 from "./consumer-group-describe-v0.js";
|
|
8
|
+
export * as createAclsV3 from "./create-acls-v3.js";
|
|
9
|
+
export * as createDelegationTokenV3 from "./create-delegation-token-v3.js";
|
|
10
|
+
export * as createPartitionsV3 from "./create-partitions-v3.js";
|
|
11
|
+
export * as createTopicsV7 from "./create-topics-v7.js";
|
|
12
|
+
export * as deleteAclsV3 from "./delete-acls-v3.js";
|
|
13
|
+
export * as deleteGroupsV2 from "./delete-groups-v2.js";
|
|
14
|
+
export * as deleteRecordsV2 from "./delete-records-v2.js";
|
|
15
|
+
export * as deleteTopicsV6 from "./delete-topics-v6.js";
|
|
16
|
+
export * as describeAclsV3 from "./describe-acls-v3.js";
|
|
17
|
+
export * as describeClientQuotasV0 from "./describe-client-quotas-v0.js";
|
|
18
|
+
export * as describeClusterV1 from "./describe-cluster-v1.js";
|
|
19
|
+
export * as describeConfigsV4 from "./describe-configs-v4.js";
|
|
20
|
+
export * as describeDelegationTokenV3 from "./describe-delegation-token-v3.js";
|
|
21
|
+
export * as describeGroupsV5 from "./describe-groups-v5.js";
|
|
22
|
+
export * as describeLogDirsV4 from "./describe-log-dirs-v4.js";
|
|
23
|
+
export * as describeProducersV0 from "./describe-producers-v0.js";
|
|
24
|
+
export * as describeQuorumV2 from "./describe-quorum-v2.js";
|
|
25
|
+
export * as describeTopicPartitionsV0 from "./describe-topic-partitions-v0.js";
|
|
26
|
+
export * as describeTransactionsV0 from "./describe-transactions-v0.js";
|
|
27
|
+
export * as describeUserScramCredentialsV0 from "./describe-user-scram-credentials-v0.js";
|
|
28
|
+
export * as envelopeV0 from "./envelope-v0.js";
|
|
29
|
+
export * as expireDelegationTokenV2 from "./expire-delegation-token-v2.js";
|
|
30
|
+
export * as incrementalAlterConfigsV1 from "./incremental-alter-configs-v1.js";
|
|
31
|
+
export * as listGroupsV4 from "./list-groups-v4.js";
|
|
32
|
+
export * as listGroupsV5 from "./list-groups-v5.js";
|
|
33
|
+
export * as listPartitionReassignmentsV0 from "./list-partition-reassignments-v0.js";
|
|
34
|
+
export * as listTransactionsV1 from "./list-transactions-v1.js";
|
|
35
|
+
export * as offsetDeleteV0 from "./offset-delete-v0.js";
|
|
36
|
+
export * as renewDelegationTokenV2 from "./renew-delegation-token-v2.js";
|
|
37
|
+
export * as unregisterBrokerV0 from "./unregister-broker-v0.js";
|
|
38
|
+
export * as updateFeaturesV1 from "./update-features-v1.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
2
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
3
|
+
import { type ConsumerGroupState } from '../enumerations.ts';
|
|
4
|
+
export type ListGroupsRequest = Parameters<typeof createRequest>;
|
|
5
|
+
export interface ListGroupsResponseGroup {
|
|
6
|
+
groupId: string;
|
|
7
|
+
protocolType: string;
|
|
8
|
+
groupState: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ListGroupsResponse {
|
|
11
|
+
throttleTimeMs: number;
|
|
12
|
+
errorCode: number;
|
|
13
|
+
groups: ListGroupsResponseGroup[];
|
|
14
|
+
}
|
|
15
|
+
export declare function createRequest(statesFilter: ConsumerGroupState[]): Writer;
|
|
16
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): ListGroupsResponse;
|
|
17
|
+
export declare const api: import("../definitions.ts").API<[statesFilter: ("PREPARING_REBALANCE" | "COMPLETING_REBALANCE" | "STABLE" | "DEAD" | "EMPTY")[]], ListGroupsResponse>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { pascalCase } from 'scule';
|
|
2
|
+
import { ResponseError } from "../../errors.js";
|
|
3
|
+
import { Writer } from "../../protocol/writer.js";
|
|
4
|
+
import { createAPI } from "../definitions.js";
|
|
5
|
+
/*
|
|
6
|
+
ListGroups Request (Version: 4) => [states_filter] TAG_BUFFER
|
|
7
|
+
states_filter => COMPACT_STRING
|
|
8
|
+
*/
|
|
9
|
+
export function createRequest(statesFilter) {
|
|
10
|
+
return Writer.create()
|
|
11
|
+
.appendArray(statesFilter, (w, s) => w.appendString(pascalCase(s, { normalize: true })), true, false)
|
|
12
|
+
.appendTaggedFields();
|
|
13
|
+
}
|
|
14
|
+
/*
|
|
15
|
+
ListGroups Response (Version: 4) => throttle_time_ms error_code [groups] TAG_BUFFER
|
|
16
|
+
throttle_time_ms => INT32
|
|
17
|
+
error_code => INT16
|
|
18
|
+
groups => group_id protocol_type group_state group_type TAG_BUFFER
|
|
19
|
+
group_id => COMPACT_STRING
|
|
20
|
+
protocol_type => COMPACT_STRING
|
|
21
|
+
group_state => COMPACT_STRING
|
|
22
|
+
*/
|
|
23
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
24
|
+
const response = {
|
|
25
|
+
throttleTimeMs: reader.readInt32(),
|
|
26
|
+
errorCode: reader.readInt16(),
|
|
27
|
+
groups: reader.readArray(r => {
|
|
28
|
+
return {
|
|
29
|
+
groupId: r.readNullableString(),
|
|
30
|
+
protocolType: r.readString(),
|
|
31
|
+
groupState: r.readString()
|
|
32
|
+
};
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
if (response.errorCode !== 0) {
|
|
36
|
+
throw new ResponseError(apiKey, apiVersion, { '': response.errorCode }, response);
|
|
37
|
+
}
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
export const api = createAPI(16, 4, createRequest, parseResponse);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ResponseError } from "../../errors.js";
|
|
2
|
+
import { Reader } from "../../protocol/reader.js";
|
|
3
|
+
import { readRecordsBatch } from "../../protocol/records.js";
|
|
4
|
+
import { Writer } from "../../protocol/writer.js";
|
|
5
|
+
import { createAPI } from "../definitions.js";
|
|
6
|
+
/*
|
|
7
|
+
Fetch Request (Version: 16) => max_wait_ms min_bytes max_bytes isolation_level session_id session_epoch [topics] [forgotten_topics_data] rack_id TAG_BUFFER
|
|
8
|
+
max_wait_ms => INT32
|
|
9
|
+
min_bytes => INT32
|
|
10
|
+
max_bytes => INT32
|
|
11
|
+
isolation_level => INT8
|
|
12
|
+
session_id => INT32
|
|
13
|
+
session_epoch => INT32
|
|
14
|
+
topics => topic_id [partitions] TAG_BUFFER
|
|
15
|
+
topic_id => UUID
|
|
16
|
+
partitions => partition current_leader_epoch fetch_offset last_fetched_epoch log_start_offset partition_max_bytes TAG_BUFFER
|
|
17
|
+
partition => INT32
|
|
18
|
+
current_leader_epoch => INT32
|
|
19
|
+
fetch_offset => INT64
|
|
20
|
+
last_fetched_epoch => INT32
|
|
21
|
+
log_start_offset => INT64
|
|
22
|
+
partition_max_bytes => INT32
|
|
23
|
+
forgotten_topics_data => topic_id [partitions] TAG_BUFFER
|
|
24
|
+
topic_id => UUID
|
|
25
|
+
partitions => INT32
|
|
26
|
+
rack_id => COMPACT_STRING
|
|
27
|
+
*/
|
|
28
|
+
export function createRequest(maxWaitMs, minBytes, maxBytes, isolationLevel, sessionId, sessionEpoch, topics, forgottenTopicsData, rackId) {
|
|
29
|
+
return Writer.create()
|
|
30
|
+
.appendInt32(maxWaitMs)
|
|
31
|
+
.appendInt32(minBytes)
|
|
32
|
+
.appendInt32(maxBytes)
|
|
33
|
+
.appendInt8(isolationLevel)
|
|
34
|
+
.appendInt32(sessionId)
|
|
35
|
+
.appendInt32(sessionEpoch)
|
|
36
|
+
.appendArray(topics, (w, t) => {
|
|
37
|
+
w.appendUUID(t.topicId).appendArray(t.partitions, (w, p) => {
|
|
38
|
+
w.appendInt32(p.partition)
|
|
39
|
+
.appendInt32(p.currentLeaderEpoch)
|
|
40
|
+
.appendInt64(p.fetchOffset)
|
|
41
|
+
.appendInt32(p.lastFetchedEpoch)
|
|
42
|
+
.appendInt64(-1n)
|
|
43
|
+
.appendInt32(p.partitionMaxBytes);
|
|
44
|
+
});
|
|
45
|
+
})
|
|
46
|
+
.appendArray(forgottenTopicsData, (w, t) => {
|
|
47
|
+
w.appendUUID(t.topic).appendArray(t.partitions, (w, p) => {
|
|
48
|
+
w.appendInt32(p);
|
|
49
|
+
}, true, false);
|
|
50
|
+
})
|
|
51
|
+
.appendString(rackId)
|
|
52
|
+
.appendTaggedFields();
|
|
53
|
+
}
|
|
54
|
+
/*
|
|
55
|
+
Fetch Response (Version: 16) => throttle_time_ms error_code session_id [responses] TAG_BUFFER
|
|
56
|
+
throttle_time_ms => INT32
|
|
57
|
+
error_code => INT16
|
|
58
|
+
session_id => INT32
|
|
59
|
+
responses => topic_id [partitions] TAG_BUFFER
|
|
60
|
+
topic_id => UUID
|
|
61
|
+
partitions => partition_index error_code high_watermark last_stable_offset log_start_offset [aborted_transactions] preferred_read_replica records TAG_BUFFER
|
|
62
|
+
partition_index => INT32
|
|
63
|
+
error_code => INT16
|
|
64
|
+
high_watermark => INT64
|
|
65
|
+
last_stable_offset => INT64
|
|
66
|
+
log_start_offset => INT64
|
|
67
|
+
aborted_transactions => producer_id first_offset TAG_BUFFER
|
|
68
|
+
producer_id => INT64
|
|
69
|
+
first_offset => INT64
|
|
70
|
+
preferred_read_replica => INT32
|
|
71
|
+
records => COMPACT_RECORDS
|
|
72
|
+
*/
|
|
73
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
74
|
+
const errors = [];
|
|
75
|
+
const throttleTimeMs = reader.readInt32();
|
|
76
|
+
const errorCode = reader.readInt16();
|
|
77
|
+
if (errorCode !== 0) {
|
|
78
|
+
errors.push(['', errorCode]);
|
|
79
|
+
}
|
|
80
|
+
const response = {
|
|
81
|
+
throttleTimeMs,
|
|
82
|
+
errorCode,
|
|
83
|
+
sessionId: reader.readInt32(),
|
|
84
|
+
responses: reader.readArray((r, i) => {
|
|
85
|
+
return {
|
|
86
|
+
topicId: r.readUUID(),
|
|
87
|
+
partitions: r.readArray((r, j) => {
|
|
88
|
+
const partition = {
|
|
89
|
+
partitionIndex: r.readInt32(),
|
|
90
|
+
errorCode: r.readInt16(),
|
|
91
|
+
highWatermark: r.readInt64(),
|
|
92
|
+
lastStableOffset: r.readInt64(),
|
|
93
|
+
logStartOffset: r.readInt64(),
|
|
94
|
+
abortedTransactions: r.readArray(r => {
|
|
95
|
+
return {
|
|
96
|
+
producerId: r.readInt64(),
|
|
97
|
+
firstOffset: r.readInt64()
|
|
98
|
+
};
|
|
99
|
+
}),
|
|
100
|
+
preferredReadReplica: r.readInt32()
|
|
101
|
+
};
|
|
102
|
+
let recordsSize = r.readUnsignedVarInt();
|
|
103
|
+
if (partition.errorCode !== 0) {
|
|
104
|
+
errors.push([`/responses/${i}/partitions/${j}`, partition.errorCode]);
|
|
105
|
+
}
|
|
106
|
+
if (recordsSize > 1) {
|
|
107
|
+
recordsSize--;
|
|
108
|
+
partition.records = readRecordsBatch(Reader.from(r.buffer.subarray(r.position, r.position + recordsSize)));
|
|
109
|
+
r.skip(recordsSize);
|
|
110
|
+
}
|
|
111
|
+
return partition;
|
|
112
|
+
})
|
|
113
|
+
};
|
|
114
|
+
})
|
|
115
|
+
};
|
|
116
|
+
if (errors.length) {
|
|
117
|
+
throw new ResponseError(apiKey, apiVersion, Object.fromEntries(errors), response);
|
|
118
|
+
}
|
|
119
|
+
return response;
|
|
120
|
+
}
|
|
121
|
+
export const api = createAPI(1, 16, createRequest, parseResponse);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Reader } from '../../protocol/reader.ts';
|
|
2
|
+
import { type RecordsBatch } from '../../protocol/records.ts';
|
|
3
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
4
|
+
export interface FetchRequestPartition {
|
|
5
|
+
partition: number;
|
|
6
|
+
currentLeaderEpoch: number;
|
|
7
|
+
fetchOffset: bigint;
|
|
8
|
+
lastFetchedEpoch: number;
|
|
9
|
+
partitionMaxBytes: number;
|
|
10
|
+
}
|
|
11
|
+
export interface FetchRequestTopic {
|
|
12
|
+
topicId: string;
|
|
13
|
+
partitions: FetchRequestPartition[];
|
|
14
|
+
}
|
|
15
|
+
export interface FetchRequestForgottenTopicsData {
|
|
16
|
+
topic: string;
|
|
17
|
+
partitions: number[];
|
|
18
|
+
}
|
|
19
|
+
export type FetchRequest = Parameters<typeof createRequest>;
|
|
20
|
+
export interface FetchResponsePartitionAbortedTransaction {
|
|
21
|
+
producerId: bigint;
|
|
22
|
+
firstOffset: bigint;
|
|
23
|
+
}
|
|
24
|
+
export interface FetchResponsePartition {
|
|
25
|
+
partitionIndex: number;
|
|
26
|
+
errorCode: number;
|
|
27
|
+
highWatermark: bigint;
|
|
28
|
+
lastStableOffset: bigint;
|
|
29
|
+
logStartOffset: bigint;
|
|
30
|
+
abortedTransactions: FetchResponsePartitionAbortedTransaction[];
|
|
31
|
+
preferredReadReplica: number;
|
|
32
|
+
records?: RecordsBatch;
|
|
33
|
+
}
|
|
34
|
+
export interface FetchResponseTopic {
|
|
35
|
+
topicId: string;
|
|
36
|
+
partitions: FetchResponsePartition[];
|
|
37
|
+
}
|
|
38
|
+
export type FetchResponse = {
|
|
39
|
+
throttleTimeMs: number;
|
|
40
|
+
errorCode: number;
|
|
41
|
+
sessionId: number;
|
|
42
|
+
responses: FetchResponseTopic[];
|
|
43
|
+
};
|
|
44
|
+
export declare function createRequest(maxWaitMs: number, minBytes: number, maxBytes: number, isolationLevel: number, sessionId: number, sessionEpoch: number, topics: FetchRequestTopic[], forgottenTopicsData: FetchRequestForgottenTopicsData[], rackId: string): Writer;
|
|
45
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): FetchResponse;
|
|
46
|
+
export declare const api: import("../definitions.ts").API<[maxWaitMs: number, minBytes: number, maxBytes: number, isolationLevel: number, sessionId: number, sessionEpoch: number, topics: FetchRequestTopic[], forgottenTopicsData: FetchRequestForgottenTopicsData[], rackId: string], FetchResponse>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export * as consumerGroupHeartbeatV0 from './consumer-group-heartbeat.ts';
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
6
|
-
export * as
|
|
7
|
-
export * as
|
|
8
|
-
export * as
|
|
9
|
-
export * as
|
|
1
|
+
export * as consumerGroupHeartbeatV0 from './consumer-group-heartbeat-v0.ts';
|
|
2
|
+
export * as fetchV16 from './fetch-v16.ts';
|
|
3
|
+
export * as fetchV17 from './fetch-v17.ts';
|
|
4
|
+
export * as heartbeatV4 from './heartbeat-v4.ts';
|
|
5
|
+
export * as joinGroupV9 from './join-group-v9.ts';
|
|
6
|
+
export * as leaveGroupV5 from './leave-group-v5.ts';
|
|
7
|
+
export * as listOffsetsV8 from './list-offsets-v8.ts';
|
|
8
|
+
export * as listOffsetsV9 from './list-offsets-v9.ts';
|
|
9
|
+
export * as offsetCommitV9 from './offset-commit-v9.ts';
|
|
10
|
+
export * as offsetFetchV9 from './offset-fetch-v9.ts';
|
|
11
|
+
export * as syncGroupV5 from './sync-group-v5.ts';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export * as consumerGroupHeartbeatV0 from "./consumer-group-heartbeat.js";
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
6
|
-
export * as
|
|
7
|
-
export * as
|
|
8
|
-
export * as
|
|
9
|
-
export * as
|
|
1
|
+
export * as consumerGroupHeartbeatV0 from "./consumer-group-heartbeat-v0.js";
|
|
2
|
+
export * as fetchV16 from "./fetch-v16.js";
|
|
3
|
+
export * as fetchV17 from "./fetch-v17.js";
|
|
4
|
+
export * as heartbeatV4 from "./heartbeat-v4.js";
|
|
5
|
+
export * as joinGroupV9 from "./join-group-v9.js";
|
|
6
|
+
export * as leaveGroupV5 from "./leave-group-v5.js";
|
|
7
|
+
export * as listOffsetsV8 from "./list-offsets-v8.js";
|
|
8
|
+
export * as listOffsetsV9 from "./list-offsets-v9.js";
|
|
9
|
+
export * as offsetCommitV9 from "./offset-commit-v9.js";
|
|
10
|
+
export * as offsetFetchV9 from "./offset-fetch-v9.js";
|
|
11
|
+
export * as syncGroupV5 from "./sync-group-v5.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { ResponseError } from "../../errors.js";
|
|
2
|
+
import { Writer } from "../../protocol/writer.js";
|
|
3
|
+
import { createAPI } from "../definitions.js";
|
|
4
|
+
/*
|
|
5
|
+
ListOffsets Request (Version: 8) => replica_id isolation_level [topics] TAG_BUFFER
|
|
6
|
+
replica_id => INT32
|
|
7
|
+
isolation_level => INT8
|
|
8
|
+
topics => name [partitions] TAG_BUFFER
|
|
9
|
+
name => COMPACT_STRING
|
|
10
|
+
partitions => partition_index current_leader_epoch timestamp TAG_BUFFER
|
|
11
|
+
partition_index => INT32
|
|
12
|
+
current_leader_epoch => INT32
|
|
13
|
+
timestamp => INT64
|
|
14
|
+
*/
|
|
15
|
+
export function createRequest(replica, isolationLevel, topics) {
|
|
16
|
+
return Writer.create()
|
|
17
|
+
.appendInt32(replica)
|
|
18
|
+
.appendInt8(isolationLevel)
|
|
19
|
+
.appendArray(topics, (w, topic) => {
|
|
20
|
+
w.appendString(topic.name).appendArray(topic.partitions, (w, partition) => {
|
|
21
|
+
w.appendInt32(partition.partitionIndex)
|
|
22
|
+
.appendInt32(partition.currentLeaderEpoch)
|
|
23
|
+
.appendInt64(partition.timestamp);
|
|
24
|
+
});
|
|
25
|
+
})
|
|
26
|
+
.appendTaggedFields();
|
|
27
|
+
}
|
|
28
|
+
/*
|
|
29
|
+
ListOffsets Response (Version: 8) => throttle_time_ms [topics] TAG_BUFFER
|
|
30
|
+
throttle_time_ms => INT32
|
|
31
|
+
topics => name [partitions] TAG_BUFFER
|
|
32
|
+
name => COMPACT_STRING
|
|
33
|
+
partitions => partition_index error_code timestamp offset leader_epoch TAG_BUFFER
|
|
34
|
+
partition_index => INT32
|
|
35
|
+
error_code => INT16
|
|
36
|
+
timestamp => INT64
|
|
37
|
+
offset => INT64
|
|
38
|
+
leader_epoch => INT32
|
|
39
|
+
*/
|
|
40
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
41
|
+
const errors = [];
|
|
42
|
+
const response = {
|
|
43
|
+
throttleTimeMs: reader.readInt32(),
|
|
44
|
+
topics: reader.readArray((r, i) => {
|
|
45
|
+
return {
|
|
46
|
+
name: r.readString(),
|
|
47
|
+
partitions: r.readArray((r, j) => {
|
|
48
|
+
const partition = {
|
|
49
|
+
partitionIndex: r.readInt32(),
|
|
50
|
+
errorCode: r.readInt16(),
|
|
51
|
+
timestamp: r.readInt64(),
|
|
52
|
+
offset: r.readInt64(),
|
|
53
|
+
leaderEpoch: r.readInt32()
|
|
54
|
+
};
|
|
55
|
+
if (partition.errorCode !== 0) {
|
|
56
|
+
errors.push([`/topics/${i}/partitions/${j}`, partition.errorCode]);
|
|
57
|
+
}
|
|
58
|
+
return partition;
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
})
|
|
62
|
+
};
|
|
63
|
+
if (errors.length) {
|
|
64
|
+
throw new ResponseError(apiKey, apiVersion, Object.fromEntries(errors), response);
|
|
65
|
+
}
|
|
66
|
+
return response;
|
|
67
|
+
}
|
|
68
|
+
export const api = createAPI(2, 8, createRequest, parseResponse);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
2
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
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.ts").API<[replica: number, isolationLevel: number, topics: ListOffsetsRequestTopic[]], ListOffsetsResponse>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ResponseError } from "../../errors.js";
|
|
2
|
+
import { protocolAPIsById } from "../../protocol/apis.js";
|
|
3
|
+
import { Writer } from "../../protocol/writer.js";
|
|
4
|
+
import { createAPI } from "../definitions.js";
|
|
5
|
+
/*
|
|
6
|
+
ApiVersions Request (Version: 3) => client_software_name client_software_version TAG_BUFFER
|
|
7
|
+
client_software_name => COMPACT_STRING
|
|
8
|
+
client_software_version => COMPACT_STRING
|
|
9
|
+
*/
|
|
10
|
+
export function createRequest(clientSoftwareName, clientSoftwareVersion) {
|
|
11
|
+
return Writer.create().appendString(clientSoftwareName).appendString(clientSoftwareVersion).appendTaggedFields();
|
|
12
|
+
}
|
|
13
|
+
/*
|
|
14
|
+
ApiVersions Response (Version: 3) => error_code [api_keys] throttle_time_ms TAG_BUFFER
|
|
15
|
+
error_code => INT16
|
|
16
|
+
api_keys => api_key min_version max_version TAG_BUFFER
|
|
17
|
+
api_key => INT16
|
|
18
|
+
min_version => INT16
|
|
19
|
+
max_version => INT16
|
|
20
|
+
throttle_time_ms => INT32
|
|
21
|
+
*/
|
|
22
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
23
|
+
const response = {
|
|
24
|
+
errorCode: reader.readInt16(),
|
|
25
|
+
apiKeys: reader.readArray(r => {
|
|
26
|
+
const apiKey = r.readInt16();
|
|
27
|
+
return {
|
|
28
|
+
apiKey,
|
|
29
|
+
name: protocolAPIsById[apiKey],
|
|
30
|
+
minVersion: r.readInt16(),
|
|
31
|
+
maxVersion: r.readInt16()
|
|
32
|
+
};
|
|
33
|
+
}),
|
|
34
|
+
throttleTimeMs: reader.readInt32()
|
|
35
|
+
};
|
|
36
|
+
if (response.errorCode !== 0) {
|
|
37
|
+
throw new ResponseError(apiKey, apiVersion, { '': response.errorCode }, response);
|
|
38
|
+
}
|
|
39
|
+
return response;
|
|
40
|
+
}
|
|
41
|
+
export const api = createAPI(18, 3, createRequest, parseResponse, true, false);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
2
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
3
|
+
export type ApiVersionsRequest = Parameters<typeof createRequest>;
|
|
4
|
+
export interface ApiVersionsResponseApi {
|
|
5
|
+
apiKey: number;
|
|
6
|
+
name: string;
|
|
7
|
+
minVersion: number;
|
|
8
|
+
maxVersion: number;
|
|
9
|
+
}
|
|
10
|
+
export type ApiVersionsResponse = {
|
|
11
|
+
errorCode: number;
|
|
12
|
+
apiKeys: ApiVersionsResponseApi[];
|
|
13
|
+
throttleTimeMs: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function createRequest(clientSoftwareName: string, clientSoftwareVersion: string): Writer;
|
|
16
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): ApiVersionsResponse;
|
|
17
|
+
export declare const api: import("../definitions.ts").API<[clientSoftwareName: string, clientSoftwareVersion: string], ApiVersionsResponse>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ResponseError } from "../../errors.js";
|
|
2
|
+
import { Writer } from "../../protocol/writer.js";
|
|
3
|
+
import { createAPI } from "../definitions.js";
|
|
4
|
+
/*
|
|
5
|
+
FindCoordinator Request (Version: 4) => key_type [coordinator_keys] TAG_BUFFER
|
|
6
|
+
key_type => INT8
|
|
7
|
+
coordinator_keys => COMPACT_STRING
|
|
8
|
+
*/
|
|
9
|
+
export function createRequest(keyType, coordinatorKeys) {
|
|
10
|
+
return Writer.create()
|
|
11
|
+
.appendInt8(keyType)
|
|
12
|
+
.appendArray(coordinatorKeys, (w, k) => w.appendString(k), true, false)
|
|
13
|
+
.appendTaggedFields();
|
|
14
|
+
}
|
|
15
|
+
/*
|
|
16
|
+
FindCoordinator Response (Version: 4) => throttle_time_ms [coordinators] TAG_BUFFER
|
|
17
|
+
throttle_time_ms => INT32
|
|
18
|
+
coordinators => key node_id host port error_code error_message TAG_BUFFER
|
|
19
|
+
key => COMPACT_STRING
|
|
20
|
+
node_id => INT32
|
|
21
|
+
host => COMPACT_STRING
|
|
22
|
+
port => INT32
|
|
23
|
+
error_code => INT16
|
|
24
|
+
error_message => COMPACT_NULLABLE_STRING
|
|
25
|
+
*/
|
|
26
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
27
|
+
const errors = [];
|
|
28
|
+
const response = {
|
|
29
|
+
throttleTimeMs: reader.readInt32(),
|
|
30
|
+
coordinators: reader.readArray((r, i) => {
|
|
31
|
+
const coordinator = {
|
|
32
|
+
key: r.readString(),
|
|
33
|
+
nodeId: r.readInt32(),
|
|
34
|
+
host: r.readString(),
|
|
35
|
+
port: r.readInt32(),
|
|
36
|
+
errorCode: r.readInt16(),
|
|
37
|
+
errorMessage: r.readNullableString()
|
|
38
|
+
};
|
|
39
|
+
if (coordinator.errorCode !== 0) {
|
|
40
|
+
errors.push([`/coordinators/${i}`, coordinator.errorCode]);
|
|
41
|
+
}
|
|
42
|
+
return coordinator;
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
if (errors.length) {
|
|
46
|
+
throw new ResponseError(apiKey, apiVersion, Object.fromEntries(errors), response);
|
|
47
|
+
}
|
|
48
|
+
return response;
|
|
49
|
+
}
|
|
50
|
+
export const api = createAPI(10, 4, createRequest, parseResponse);
|