@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type NullableString } from '../../protocol/definitions.ts';
|
|
2
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
3
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
4
|
+
export type FindCoordinatorRequest = Parameters<typeof createRequest>;
|
|
5
|
+
export interface FindCoordinatorResponseCoordinator {
|
|
6
|
+
key: string;
|
|
7
|
+
nodeId: number;
|
|
8
|
+
host: string;
|
|
9
|
+
port: number;
|
|
10
|
+
errorCode: number;
|
|
11
|
+
errorMessage: NullableString;
|
|
12
|
+
}
|
|
13
|
+
export interface FindCoordinatorResponse {
|
|
14
|
+
throttleTimeMs: number;
|
|
15
|
+
coordinators: FindCoordinatorResponseCoordinator[];
|
|
16
|
+
}
|
|
17
|
+
export declare function createRequest(keyType: number, coordinatorKeys: string[]): Writer;
|
|
18
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): FindCoordinatorResponse;
|
|
19
|
+
export declare const api: import("../definitions.ts").API<[keyType: number, coordinatorKeys: string[]], FindCoordinatorResponse>;
|
|
@@ -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: 5) => 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: 5) => 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, 5, createRequest, parseResponse);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type NullableString } from '../../protocol/definitions.ts';
|
|
2
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
3
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
4
|
+
export type FindCoordinatorRequest = Parameters<typeof createRequest>;
|
|
5
|
+
export interface FindCoordinatorResponseCoordinator {
|
|
6
|
+
key: string;
|
|
7
|
+
nodeId: number;
|
|
8
|
+
host: string;
|
|
9
|
+
port: number;
|
|
10
|
+
errorCode: number;
|
|
11
|
+
errorMessage: NullableString;
|
|
12
|
+
}
|
|
13
|
+
export interface FindCoordinatorResponse {
|
|
14
|
+
throttleTimeMs: number;
|
|
15
|
+
coordinators: FindCoordinatorResponseCoordinator[];
|
|
16
|
+
}
|
|
17
|
+
export declare function createRequest(keyType: number, coordinatorKeys: string[]): Writer;
|
|
18
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): FindCoordinatorResponse;
|
|
19
|
+
export declare const api: import("../definitions.ts").API<[keyType: number, coordinatorKeys: string[]], FindCoordinatorResponse>;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
1
|
+
export * as apiVersionsV3 from './api-versions-v3.ts';
|
|
2
|
+
export * as apiVersionsV4 from './api-versions-v4.ts';
|
|
3
|
+
export * as findCoordinatorV4 from './find-coordinator-v4.ts';
|
|
4
|
+
export * as findCoordinatorV5 from './find-coordinator-v5.ts';
|
|
5
|
+
export * as findCoordinatorV6 from './find-coordinator-v6.ts';
|
|
6
|
+
export * as metadataV12 from './metadata-v12.ts';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
export * as
|
|
2
|
-
export * as
|
|
3
|
-
export * as
|
|
1
|
+
export * as apiVersionsV3 from "./api-versions-v3.js";
|
|
2
|
+
export * as apiVersionsV4 from "./api-versions-v4.js";
|
|
3
|
+
export * as findCoordinatorV4 from "./find-coordinator-v4.js";
|
|
4
|
+
export * as findCoordinatorV5 from "./find-coordinator-v5.js";
|
|
5
|
+
export * as findCoordinatorV6 from "./find-coordinator-v6.js";
|
|
6
|
+
export * as metadataV12 from "./metadata-v12.js";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * as addOffsetsToTxnV4 from './add-offsets-to-txn.ts';
|
|
2
|
-
export * as addPartitionsToTxnV5 from './add-partitions-to-txn.ts';
|
|
3
|
-
export * as endTxnV4 from './end-txn.ts';
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
6
|
-
export * as
|
|
1
|
+
export * as addOffsetsToTxnV4 from './add-offsets-to-txn-v4.ts';
|
|
2
|
+
export * as addPartitionsToTxnV5 from './add-partitions-to-txn-v5.ts';
|
|
3
|
+
export * as endTxnV4 from './end-txn-v4.ts';
|
|
4
|
+
export * as initProducerIdV4 from './init-producer-id-v4.ts';
|
|
5
|
+
export * as initProducerIdV5 from './init-producer-id-v5.ts';
|
|
6
|
+
export * as produceV10 from './produce-v10.ts';
|
|
7
|
+
export * as produceV11 from './produce-v11.ts';
|
|
8
|
+
export * as txnOffsetCommitV4 from './txn-offset-commit-v4.ts';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
export * as addOffsetsToTxnV4 from "./add-offsets-to-txn.js";
|
|
2
|
-
export * as addPartitionsToTxnV5 from "./add-partitions-to-txn.js";
|
|
3
|
-
export * as endTxnV4 from "./end-txn.js";
|
|
4
|
-
export * as
|
|
5
|
-
export * as
|
|
6
|
-
export * as
|
|
1
|
+
export * as addOffsetsToTxnV4 from "./add-offsets-to-txn-v4.js";
|
|
2
|
+
export * as addPartitionsToTxnV5 from "./add-partitions-to-txn-v5.js";
|
|
3
|
+
export * as endTxnV4 from "./end-txn-v4.js";
|
|
4
|
+
export * as initProducerIdV4 from "./init-producer-id-v4.js";
|
|
5
|
+
export * as initProducerIdV5 from "./init-producer-id-v5.js";
|
|
6
|
+
export * as produceV10 from "./produce-v10.js";
|
|
7
|
+
export * as produceV11 from "./produce-v11.js";
|
|
8
|
+
export * as txnOffsetCommitV4 from "./txn-offset-commit-v4.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ResponseError } from "../../errors.js";
|
|
2
|
+
import { Writer } from "../../protocol/writer.js";
|
|
3
|
+
import { createAPI } from "../definitions.js";
|
|
4
|
+
/*
|
|
5
|
+
InitProducerId Request (Version: 4) => transactional_id transaction_timeout_ms producer_id producer_epoch TAG_BUFFER
|
|
6
|
+
transactional_id => COMPACT_NULLABLE_STRING
|
|
7
|
+
transaction_timeout_ms => INT32
|
|
8
|
+
producer_id => INT64
|
|
9
|
+
producer_epoch => INT16
|
|
10
|
+
*/
|
|
11
|
+
export function createRequest(transactionalId, transactionTimeoutMs, producerId, producerEpoch) {
|
|
12
|
+
return Writer.create()
|
|
13
|
+
.appendString(transactionalId, true)
|
|
14
|
+
.appendInt32(transactionTimeoutMs)
|
|
15
|
+
.appendInt64(producerId)
|
|
16
|
+
.appendInt16(producerEpoch)
|
|
17
|
+
.appendTaggedFields();
|
|
18
|
+
}
|
|
19
|
+
/*
|
|
20
|
+
InitProducerId Response (Version: 4) => throttle_time_ms error_code producer_id producer_epoch TAG_BUFFER
|
|
21
|
+
throttle_time_ms => INT32
|
|
22
|
+
error_code => INT16
|
|
23
|
+
producer_id => INT64
|
|
24
|
+
producer_epoch => INT16
|
|
25
|
+
*/
|
|
26
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
27
|
+
const response = {
|
|
28
|
+
throttleTimeMs: reader.readInt32(),
|
|
29
|
+
errorCode: reader.readInt16(),
|
|
30
|
+
producerId: reader.readInt64(),
|
|
31
|
+
producerEpoch: reader.readInt16()
|
|
32
|
+
};
|
|
33
|
+
if (response.errorCode !== 0) {
|
|
34
|
+
throw new ResponseError(apiKey, apiVersion, { '': response.errorCode }, response);
|
|
35
|
+
}
|
|
36
|
+
return response;
|
|
37
|
+
}
|
|
38
|
+
export const api = createAPI(22, 4, createRequest, parseResponse);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type NullableString } from '../../protocol/definitions.ts';
|
|
2
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
3
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
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.ts").API<[transactionalId: NullableString, transactionTimeoutMs: number, producerId: bigint, producerEpoch: number], InitProducerIdResponse>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ResponseError } from "../../errors.js";
|
|
2
|
+
import { createRecordsBatch } from "../../protocol/records.js";
|
|
3
|
+
import { Writer } from "../../protocol/writer.js";
|
|
4
|
+
import { groupByProperty } from "../../utils.js";
|
|
5
|
+
import { createAPI } from "../definitions.js";
|
|
6
|
+
import { ProduceAcks } from "../enumerations.js";
|
|
7
|
+
/*
|
|
8
|
+
Produce Request (Version: 10) => transactional_id acks timeout_ms [topic_data] TAG_BUFFER
|
|
9
|
+
transactional_id => COMPACT_NULLABLE_STRING
|
|
10
|
+
acks => INT16
|
|
11
|
+
timeout_ms => INT32
|
|
12
|
+
topic_data => name [partition_data] TAG_BUFFER
|
|
13
|
+
name => COMPACT_STRING
|
|
14
|
+
partition_data => index records TAG_BUFFER
|
|
15
|
+
index => INT32
|
|
16
|
+
records => COMPACT_RECORDS
|
|
17
|
+
*/
|
|
18
|
+
export function createRequest(acks = 1, timeout = 0, topicData, options = {}) {
|
|
19
|
+
// Normalize the messages
|
|
20
|
+
const now = BigInt(Date.now());
|
|
21
|
+
for (const message of topicData) {
|
|
22
|
+
if (typeof message.partition === 'undefined') {
|
|
23
|
+
message.partition = 0;
|
|
24
|
+
}
|
|
25
|
+
if (typeof message.timestamp === 'undefined') {
|
|
26
|
+
message.timestamp = now;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const writer = Writer.create()
|
|
30
|
+
.appendString(options.transactionalId)
|
|
31
|
+
.appendInt16(acks)
|
|
32
|
+
.appendInt32(timeout)
|
|
33
|
+
.appendArray(groupByProperty(topicData, 'topic'), (w, [topic, messages]) => {
|
|
34
|
+
w.appendString(topic).appendArray(groupByProperty(messages, 'partition'), (w, [partition, messages]) => {
|
|
35
|
+
const records = createRecordsBatch(messages, options);
|
|
36
|
+
w.appendInt32(partition)
|
|
37
|
+
.appendUnsignedVarInt(records.length + 1)
|
|
38
|
+
.appendFrom(records);
|
|
39
|
+
});
|
|
40
|
+
})
|
|
41
|
+
.appendTaggedFields();
|
|
42
|
+
if (acks === ProduceAcks.NO_RESPONSE) {
|
|
43
|
+
writer.context.noResponse = true;
|
|
44
|
+
}
|
|
45
|
+
return writer;
|
|
46
|
+
}
|
|
47
|
+
/*
|
|
48
|
+
Produce Response (Version: 10) => [responses] throttle_time_ms TAG_BUFFER
|
|
49
|
+
responses => name [partition_responses] TAG_BUFFER
|
|
50
|
+
name => COMPACT_STRING
|
|
51
|
+
partition_responses => index error_code base_offset log_append_time_ms log_start_offset [record_errors] error_message TAG_BUFFER
|
|
52
|
+
index => INT32
|
|
53
|
+
error_code => INT16
|
|
54
|
+
base_offset => INT64
|
|
55
|
+
log_append_time_ms => INT64
|
|
56
|
+
log_start_offset => INT64
|
|
57
|
+
record_errors => batch_index batch_index_error_message TAG_BUFFER
|
|
58
|
+
batch_index => INT32
|
|
59
|
+
batch_index_error_message => COMPACT_NULLABLE_STRING
|
|
60
|
+
error_message => COMPACT_NULLABLE_STRING
|
|
61
|
+
throttle_time_ms => INT32
|
|
62
|
+
*/
|
|
63
|
+
export function parseResponse(_correlationId, apiKey, apiVersion, reader) {
|
|
64
|
+
const errors = [];
|
|
65
|
+
const response = {
|
|
66
|
+
responses: reader.readArray((r, i) => {
|
|
67
|
+
const topicResponse = {
|
|
68
|
+
name: r.readString(),
|
|
69
|
+
partitionResponses: r.readArray((r, j) => {
|
|
70
|
+
const index = r.readInt32();
|
|
71
|
+
const errorCode = r.readInt16();
|
|
72
|
+
if (errorCode !== 0) {
|
|
73
|
+
errors.push([`/responses/${i}/partition_responses/${j}`, errorCode]);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
index,
|
|
77
|
+
errorCode,
|
|
78
|
+
baseOffset: r.readInt64(),
|
|
79
|
+
logAppendTimeMs: r.readInt64(),
|
|
80
|
+
logStartOffset: r.readInt64(),
|
|
81
|
+
recordErrors: r.readArray((r, k) => {
|
|
82
|
+
const recordError = {
|
|
83
|
+
batchIndex: r.readInt32(),
|
|
84
|
+
batchIndexErrorMessage: r.readNullableString()
|
|
85
|
+
};
|
|
86
|
+
if (recordError.batchIndexErrorMessage) {
|
|
87
|
+
errors.push([`/responses/${i}/partition_responses/${j}/record_errors/${k}`, -1]);
|
|
88
|
+
}
|
|
89
|
+
return recordError;
|
|
90
|
+
}),
|
|
91
|
+
errorMessage: r.readNullableString()
|
|
92
|
+
};
|
|
93
|
+
})
|
|
94
|
+
};
|
|
95
|
+
return topicResponse;
|
|
96
|
+
}),
|
|
97
|
+
throttleTimeMs: reader.readInt32()
|
|
98
|
+
};
|
|
99
|
+
if (errors.length) {
|
|
100
|
+
throw new ResponseError(apiKey, apiVersion, Object.fromEntries(errors), response);
|
|
101
|
+
}
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
export const api = createAPI(0, 10, createRequest, parseResponse);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type NullableString } from '../../protocol/definitions.ts';
|
|
2
|
+
import { type Reader } from '../../protocol/reader.ts';
|
|
3
|
+
import { type CreateRecordsBatchOptions, type MessageRecord } from '../../protocol/records.ts';
|
|
4
|
+
import { Writer } from '../../protocol/writer.ts';
|
|
5
|
+
export type ProduceRequest = Parameters<typeof createRequest>;
|
|
6
|
+
export interface ProduceResponsePartitionRecordError {
|
|
7
|
+
batchIndex: number;
|
|
8
|
+
batchIndexErrorMessage: NullableString;
|
|
9
|
+
}
|
|
10
|
+
export interface ProduceResponsePartition {
|
|
11
|
+
index: number;
|
|
12
|
+
errorCode: number;
|
|
13
|
+
baseOffset: bigint;
|
|
14
|
+
logAppendTimeMs: bigint;
|
|
15
|
+
logStartOffset: bigint;
|
|
16
|
+
recordErrors: ProduceResponsePartitionRecordError[];
|
|
17
|
+
errorMessage: NullableString;
|
|
18
|
+
}
|
|
19
|
+
export interface ProduceResponseTopic {
|
|
20
|
+
name: string;
|
|
21
|
+
partitionResponses: ProduceResponsePartition[];
|
|
22
|
+
}
|
|
23
|
+
export interface ProduceResponse {
|
|
24
|
+
responses: ProduceResponseTopic[];
|
|
25
|
+
throttleTimeMs: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function createRequest(acks: number | undefined, timeout: number | undefined, topicData: MessageRecord[], options?: Partial<CreateRecordsBatchOptions>): Writer;
|
|
28
|
+
export declare function parseResponse(_correlationId: number, apiKey: number, apiVersion: number, reader: Reader): ProduceResponse;
|
|
29
|
+
export declare const api: import("../definitions.ts").API<[acks: number | undefined, timeout: number | undefined, topicData: MessageRecord[], options?: Partial<CreateRecordsBatchOptions> | undefined], boolean | ProduceResponse>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as saslAuthenticateV2 from './sasl-authenticate.ts';
|
|
2
|
-
export * as saslHandshakeV1 from './sasl-handshake.ts';
|
|
1
|
+
export * as saslAuthenticateV2 from './sasl-authenticate-v2.ts';
|
|
2
|
+
export * as saslHandshakeV1 from './sasl-handshake-v1.ts';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * as saslAuthenticateV2 from "./sasl-authenticate.js";
|
|
2
|
-
export * as saslHandshakeV1 from "./sasl-handshake.js";
|
|
1
|
+
export * as saslAuthenticateV2 from "./sasl-authenticate-v2.js";
|
|
2
|
+
export * as saslHandshakeV1 from "./sasl-handshake-v1.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * as getTelemetrySubscriptionsV0 from './get-telemetry-subscriptions.ts';
|
|
2
|
-
export * as listClientMetricsResourcesV0 from './list-client-metrics-resources.ts';
|
|
3
|
-
export * as pushTelemetryV0 from './push-telemetry.ts';
|
|
1
|
+
export * as getTelemetrySubscriptionsV0 from './get-telemetry-subscriptions-v0.ts';
|
|
2
|
+
export * as listClientMetricsResourcesV0 from './list-client-metrics-resources-v0.ts';
|
|
3
|
+
export * as pushTelemetryV0 from './push-telemetry-v0.ts';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * as getTelemetrySubscriptionsV0 from "./get-telemetry-subscriptions.js";
|
|
2
|
-
export * as listClientMetricsResourcesV0 from "./list-client-metrics-resources.js";
|
|
3
|
-
export * as pushTelemetryV0 from "./push-telemetry.js";
|
|
1
|
+
export * as getTelemetrySubscriptionsV0 from "./get-telemetry-subscriptions-v0.js";
|
|
2
|
+
export * as listClientMetricsResourcesV0 from "./list-client-metrics-resources-v0.js";
|
|
3
|
+
export * as pushTelemetryV0 from "./push-telemetry-v0.js";
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { api as createTopicsV7 } from "../../apis/admin/create-topics.js";
|
|
2
|
-
import { api as deleteGroupsV2 } from "../../apis/admin/delete-groups.js";
|
|
3
|
-
import { api as deleteTopicsV6 } from "../../apis/admin/delete-topics.js";
|
|
4
|
-
import { api as describeGroupsV5 } from "../../apis/admin/describe-groups.js";
|
|
5
|
-
import { api as listGroupsV5 } from "../../apis/admin/list-groups.js";
|
|
6
1
|
import { FindCoordinatorKeyTypes } from "../../apis/enumerations.js";
|
|
7
|
-
import { api as findCoordinatorV6 } from "../../apis/metadata/find-coordinator.js";
|
|
8
2
|
import { adminGroupsChannel, adminTopicsChannel, createDiagnosticContext } from "../../diagnostic.js";
|
|
9
3
|
import { Reader } from "../../protocol/reader.js";
|
|
10
|
-
import { Base, kAfterCreate, kBootstrapBrokers, kCheckNotClosed, kConnections, kMetadata, kOptions, kPerformDeduplicated, kPerformWithRetry, kValidateOptions } from "../base/base.js";
|
|
4
|
+
import { Base, kAfterCreate, kBootstrapBrokers, kCheckNotClosed, kConnections, kGetApi, kMetadata, kOptions, kPerformDeduplicated, kPerformWithRetry, kValidateOptions } from "../base/base.js";
|
|
11
5
|
import { createPromisifiedCallback, kCallbackPromise, runConcurrentCallbacks } from "../callbacks.js";
|
|
12
6
|
import { createTopicsOptionsValidator, deleteGroupsOptionsValidator, deleteTopicsOptionsValidator, describeGroupsOptionsValidator, listGroupsOptionsValidator } from "./options.js";
|
|
13
7
|
export class Admin extends Base {
|
|
@@ -118,7 +112,13 @@ export class Admin extends Base {
|
|
|
118
112
|
retryCallback(error, undefined);
|
|
119
113
|
return;
|
|
120
114
|
}
|
|
121
|
-
|
|
115
|
+
this[kGetApi]('CreateTopics', (error, api) => {
|
|
116
|
+
if (error) {
|
|
117
|
+
retryCallback(error, undefined);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
api(connection, requests, this[kOptions].timeout, false, retryCallback);
|
|
121
|
+
});
|
|
122
122
|
});
|
|
123
123
|
}, (error, response) => {
|
|
124
124
|
if (error) {
|
|
@@ -149,7 +149,13 @@ export class Admin extends Base {
|
|
|
149
149
|
for (const topic of options.topics) {
|
|
150
150
|
requests.push({ name: topic });
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
this[kGetApi]('DeleteTopics', (error, api) => {
|
|
153
|
+
if (error) {
|
|
154
|
+
retryCallback(error, undefined);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
api(connection, requests, this[kOptions].timeout, retryCallback);
|
|
158
|
+
});
|
|
153
159
|
});
|
|
154
160
|
}, deduplicateCallback, 0);
|
|
155
161
|
}, error => callback(error));
|
|
@@ -168,7 +174,19 @@ export class Admin extends Base {
|
|
|
168
174
|
return;
|
|
169
175
|
}
|
|
170
176
|
this[kPerformWithRetry]('listGroups', retryCallback => {
|
|
171
|
-
|
|
177
|
+
this[kGetApi]('ListGroups', (error, api) => {
|
|
178
|
+
if (error) {
|
|
179
|
+
retryCallback(error, undefined);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
/* c8 ignore next 5 */
|
|
183
|
+
if (api.version === 4) {
|
|
184
|
+
api(connection, options.states ?? [], retryCallback);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
api(connection, options.states ?? [], options.types, retryCallback);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
172
190
|
}, concurrentCallback, 0);
|
|
173
191
|
});
|
|
174
192
|
}, (error, results) => {
|
|
@@ -219,7 +237,13 @@ export class Admin extends Base {
|
|
|
219
237
|
return;
|
|
220
238
|
}
|
|
221
239
|
this[kPerformWithRetry]('describeGroups', retryCallback => {
|
|
222
|
-
|
|
240
|
+
this[kGetApi]('DescribeGroups', (error, api) => {
|
|
241
|
+
if (error) {
|
|
242
|
+
retryCallback(error, undefined);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
api(connection, groups, options.includeAuthorizedOperations ?? false, retryCallback);
|
|
246
|
+
});
|
|
223
247
|
}, concurrentCallback, 0);
|
|
224
248
|
});
|
|
225
249
|
}, (error, results) => {
|
|
@@ -295,7 +319,13 @@ export class Admin extends Base {
|
|
|
295
319
|
return;
|
|
296
320
|
}
|
|
297
321
|
this[kPerformWithRetry]('deleteGroups', retryCallback => {
|
|
298
|
-
|
|
322
|
+
this[kGetApi]('DeleteGroups', (error, api) => {
|
|
323
|
+
if (error) {
|
|
324
|
+
retryCallback(error, undefined);
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
api(connection, groups, retryCallback);
|
|
328
|
+
});
|
|
299
329
|
}, concurrentCallback, 0);
|
|
300
330
|
});
|
|
301
331
|
}, error => callback(error));
|
|
@@ -309,7 +339,13 @@ export class Admin extends Base {
|
|
|
309
339
|
retryCallback(error, undefined);
|
|
310
340
|
return;
|
|
311
341
|
}
|
|
312
|
-
|
|
342
|
+
this[kGetApi]('FindCoordinator', (error, api) => {
|
|
343
|
+
if (error) {
|
|
344
|
+
retryCallback(error, undefined);
|
|
345
|
+
return;
|
|
346
|
+
}
|
|
347
|
+
api(connection, FindCoordinatorKeyTypes.GROUP, groups, retryCallback);
|
|
348
|
+
});
|
|
313
349
|
});
|
|
314
350
|
}, (error, response) => {
|
|
315
351
|
if (error) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ValidateFunction } from 'ajv';
|
|
2
2
|
import { EventEmitter } from 'node:events';
|
|
3
|
-
import { type Callback } from '../../apis/definitions.ts';
|
|
3
|
+
import { type API, type Callback } from '../../apis/definitions.ts';
|
|
4
|
+
import { type ApiVersionsResponseApi } from '../../apis/metadata/api-versions-v3.ts';
|
|
4
5
|
import { type ClientType } from '../../diagnostic.ts';
|
|
5
6
|
import { ConnectionPool } from '../../network/connection-pool.ts';
|
|
6
7
|
import { type Broker } from '../../network/connection.ts';
|
|
@@ -10,11 +11,14 @@ import { type Metrics } from '../metrics.ts';
|
|
|
10
11
|
import { type BaseOptions, type ClusterMetadata, type MetadataOptions } from './types.ts';
|
|
11
12
|
export declare const kClientId: unique symbol;
|
|
12
13
|
export declare const kBootstrapBrokers: unique symbol;
|
|
14
|
+
export declare const kApis: unique symbol;
|
|
15
|
+
export declare const kGetApi: unique symbol;
|
|
13
16
|
export declare const kOptions: unique symbol;
|
|
14
17
|
export declare const kConnections: unique symbol;
|
|
15
18
|
export declare const kFetchConnections: unique symbol;
|
|
16
19
|
export declare const kCreateConnectionPool: unique symbol;
|
|
17
20
|
export declare const kClosed: unique symbol;
|
|
21
|
+
export declare const kListApis: unique symbol;
|
|
18
22
|
export declare const kMetadata: unique symbol;
|
|
19
23
|
export declare const kCheckNotClosed: unique symbol;
|
|
20
24
|
export declare const kClearMetadata: unique symbol;
|
|
@@ -33,6 +37,7 @@ export declare class Base<OptionsType extends BaseOptions = BaseOptions> extends
|
|
|
33
37
|
[kClientId]: string;
|
|
34
38
|
[kClientType]: ClientType;
|
|
35
39
|
[kBootstrapBrokers]: Broker[];
|
|
40
|
+
[kApis]: ApiVersionsResponseApi[];
|
|
36
41
|
[kOptions]: OptionsType;
|
|
37
42
|
[kConnections]: ConnectionPool;
|
|
38
43
|
[kClosed]: boolean;
|
|
@@ -45,15 +50,19 @@ export declare class Base<OptionsType extends BaseOptions = BaseOptions> extends
|
|
|
45
50
|
emitWithDebug(section: string | null, name: string, ...args: any[]): boolean;
|
|
46
51
|
close(callback: CallbackWithPromise<void>): void;
|
|
47
52
|
close(): Promise<void>;
|
|
53
|
+
listApis(callback: CallbackWithPromise<ApiVersionsResponseApi[]>): void;
|
|
54
|
+
listApis(): Promise<ApiVersionsResponseApi[]>;
|
|
48
55
|
metadata(options: MetadataOptions, callback: CallbackWithPromise<ClusterMetadata>): void;
|
|
49
56
|
metadata(options: MetadataOptions): Promise<ClusterMetadata>;
|
|
50
57
|
[kCreateConnectionPool](): ConnectionPool;
|
|
58
|
+
[kListApis](callback: CallbackWithPromise<ApiVersionsResponseApi[]>): void;
|
|
51
59
|
[kMetadata](options: MetadataOptions, callback: CallbackWithPromise<ClusterMetadata>): void;
|
|
52
60
|
[kCheckNotClosed](callback: CallbackWithPromise<any>): boolean;
|
|
53
61
|
[kClearMetadata](): void;
|
|
54
62
|
[kParseBroker](broker: Broker | string): Broker;
|
|
55
63
|
[kPerformWithRetry]<ReturnType>(operationId: string, operation: (callback: Callback<ReturnType>) => void, callback: CallbackWithPromise<ReturnType>, attempt?: number, errors?: Error[], shouldSkipRetry?: (e: Error) => boolean): void | Promise<ReturnType>;
|
|
56
64
|
[kPerformDeduplicated]<ReturnType>(operationId: string, operation: (callback: CallbackWithPromise<ReturnType>) => void, callback: CallbackWithPromise<ReturnType>): void | Promise<ReturnType>;
|
|
65
|
+
[kGetApi]<RequestArguments extends Array<unknown>, ResponseType>(name: string, callback: Callback<API<RequestArguments, ResponseType>>): void;
|
|
57
66
|
[kValidateOptions](target: unknown, validator: ValidateFunction<unknown>, targetName: string, throwOnErrors?: boolean): Error | null;
|
|
58
67
|
[kInspect](...args: unknown[]): void;
|
|
59
68
|
[kFormatValidationErrors](validator: ValidateFunction<unknown>, targetName: string): string;
|