apache-iggy 0.5.0-edge.1
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/LICENSE +201 -0
- package/README.md +81 -0
- package/dist/src/bdd/auth.d.ts +20 -0
- package/dist/src/bdd/auth.js +38 -0
- package/dist/src/bdd/message.d.ts +20 -0
- package/dist/src/bdd/message.js +70 -0
- package/dist/src/bdd/stream.d.ts +20 -0
- package/dist/src/bdd/stream.js +39 -0
- package/dist/src/bdd/topic.d.ts +20 -0
- package/dist/src/bdd/topic.js +36 -0
- package/dist/src/bdd/world.d.ts +30 -0
- package/dist/src/bdd/world.js +21 -0
- package/dist/src/client/client.connection.d.ts +40 -0
- package/dist/src/client/client.connection.js +171 -0
- package/dist/src/client/client.d.ts +38 -0
- package/dist/src/client/client.debug.d.ts +21 -0
- package/dist/src/client/client.debug.js +21 -0
- package/dist/src/client/client.js +97 -0
- package/dist/src/client/client.socket.d.ts +48 -0
- package/dist/src/client/client.socket.js +156 -0
- package/dist/src/client/client.type.d.ts +69 -0
- package/dist/src/client/client.type.js +20 -0
- package/dist/src/client/client.utils.d.ts +29 -0
- package/dist/src/client/client.utils.js +54 -0
- package/dist/src/client/index.d.ts +23 -0
- package/dist/src/client/index.js +23 -0
- package/dist/src/client.e2e.d.ts +20 -0
- package/dist/src/client.e2e.js +54 -0
- package/dist/src/debug-send.d.ts +20 -0
- package/dist/src/debug-send.js +117 -0
- package/dist/src/debug.d.ts +20 -0
- package/dist/src/debug.js +107 -0
- package/dist/src/e2e/tcp.client.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.client.e2e.js +45 -0
- package/dist/src/e2e/tcp.consumer-group.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.consumer-group.e2e.js +111 -0
- package/dist/src/e2e/tcp.consumer-stream.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.consumer-stream.e2e.js +92 -0
- package/dist/src/e2e/tcp.parallel.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.parallel.e2e.js +59 -0
- package/dist/src/e2e/tcp.send-message.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.send-message.e2e.js +118 -0
- package/dist/src/e2e/tcp.stream.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.stream.e2e.js +59 -0
- package/dist/src/e2e/tcp.system.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.system.e2e.js +46 -0
- package/dist/src/e2e/tcp.token.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.token.e2e.js +43 -0
- package/dist/src/e2e/tcp.topic.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.topic.e2e.js +83 -0
- package/dist/src/e2e/tcp.user.e2e.d.ts +20 -0
- package/dist/src/e2e/tcp.user.e2e.js +95 -0
- package/dist/src/e2e/test-client.utils.d.ts +21 -0
- package/dist/src/e2e/test-client.utils.js +28 -0
- package/dist/src/index.d.ts +22 -0
- package/dist/src/index.js +22 -0
- package/dist/src/stream/consumer-stream.d.ts +40 -0
- package/dist/src/stream/consumer-stream.js +79 -0
- package/dist/src/stream/index.d.ts +20 -0
- package/dist/src/stream/index.js +20 -0
- package/dist/src/tcp.e2e.d.ts +20 -0
- package/dist/src/tcp.e2e.js +106 -0
- package/dist/src/tcp.sm.utils.d.ts +97 -0
- package/dist/src/tcp.sm.utils.js +66 -0
- package/dist/src/tls.system.e2e.d.ts +20 -0
- package/dist/src/tls.system.e2e.js +49 -0
- package/dist/src/type.utils.d.ts +21 -0
- package/dist/src/type.utils.js +25 -0
- package/dist/src/wire/client/client.utils.d.ts +32 -0
- package/dist/src/wire/client/client.utils.js +48 -0
- package/dist/src/wire/client/get-client.command.d.ts +30 -0
- package/dist/src/wire/client/get-client.command.js +33 -0
- package/dist/src/wire/client/get-clients.command.d.ts +27 -0
- package/dist/src/wire/client/get-clients.command.js +38 -0
- package/dist/src/wire/client/get-me.command.d.ts +27 -0
- package/dist/src/wire/client/get-me.command.js +28 -0
- package/dist/src/wire/client/index.d.ts +22 -0
- package/dist/src/wire/client/index.js +22 -0
- package/dist/src/wire/command-set.d.ts +128 -0
- package/dist/src/wire/command-set.js +157 -0
- package/dist/src/wire/command.code.d.ts +68 -0
- package/dist/src/wire/command.code.js +72 -0
- package/dist/src/wire/command.utils.d.ts +26 -0
- package/dist/src/wire/command.utils.js +29 -0
- package/dist/src/wire/consumer-group/create-group.command.d.ts +34 -0
- package/dist/src/wire/consumer-group/create-group.command.js +44 -0
- package/dist/src/wire/consumer-group/create-group.command.test.d.ts +20 -0
- package/dist/src/wire/consumer-group/create-group.command.test.js +47 -0
- package/dist/src/wire/consumer-group/delete-group.command.d.ts +31 -0
- package/dist/src/wire/consumer-group/delete-group.command.js +31 -0
- package/dist/src/wire/consumer-group/get-group.command.d.ts +33 -0
- package/dist/src/wire/consumer-group/get-group.command.js +32 -0
- package/dist/src/wire/consumer-group/get-groups.command.d.ts +32 -0
- package/dist/src/wire/consumer-group/get-groups.command.js +36 -0
- package/dist/src/wire/consumer-group/group.command.test.d.ts +20 -0
- package/dist/src/wire/consumer-group/group.command.test.js +50 -0
- package/dist/src/wire/consumer-group/group.utils.d.ts +34 -0
- package/dist/src/wire/consumer-group/group.utils.js +53 -0
- package/dist/src/wire/consumer-group/index.d.ts +25 -0
- package/dist/src/wire/consumer-group/index.js +25 -0
- package/dist/src/wire/consumer-group/join-group.command.d.ts +31 -0
- package/dist/src/wire/consumer-group/join-group.command.js +31 -0
- package/dist/src/wire/consumer-group/leave-group.command.d.ts +31 -0
- package/dist/src/wire/consumer-group/leave-group.command.js +31 -0
- package/dist/src/wire/error.code.d.ts +20 -0
- package/dist/src/wire/error.code.js +202 -0
- package/dist/src/wire/error.utils.d.ts +20 -0
- package/dist/src/wire/error.utils.js +23 -0
- package/dist/src/wire/identifier.utils.d.ts +21 -0
- package/dist/src/wire/identifier.utils.js +49 -0
- package/dist/src/wire/identifier.utils.test.d.ts +20 -0
- package/dist/src/wire/identifier.utils.test.js +40 -0
- package/dist/src/wire/index.d.ts +32 -0
- package/dist/src/wire/index.js +31 -0
- package/dist/src/wire/message/flush-unsaved-buffers.command.d.ts +31 -0
- package/dist/src/wire/message/flush-unsaved-buffers.command.js +31 -0
- package/dist/src/wire/message/header.type.d.ts +101 -0
- package/dist/src/wire/message/header.type.js +55 -0
- package/dist/src/wire/message/header.utils.d.ts +67 -0
- package/dist/src/wire/message/header.utils.js +248 -0
- package/dist/src/wire/message/header.utils.test.d.ts +20 -0
- package/dist/src/wire/message/header.utils.test.js +39 -0
- package/dist/src/wire/message/iggy-header.utils.d.ts +32 -0
- package/dist/src/wire/message/iggy-header.utils.js +50 -0
- package/dist/src/wire/message/index.d.ts +25 -0
- package/dist/src/wire/message/index.js +25 -0
- package/dist/src/wire/message/message.utils.d.ts +35 -0
- package/dist/src/wire/message/message.utils.js +112 -0
- package/dist/src/wire/message/partitioning.utils.d.ts +51 -0
- package/dist/src/wire/message/partitioning.utils.js +77 -0
- package/dist/src/wire/message/poll-messages.command.d.ts +43 -0
- package/dist/src/wire/message/poll-messages.command.js +32 -0
- package/dist/src/wire/message/poll.utils.d.ts +93 -0
- package/dist/src/wire/message/poll.utils.js +135 -0
- package/dist/src/wire/message/send-messages.command.d.ts +34 -0
- package/dist/src/wire/message/send-messages.command.js +31 -0
- package/dist/src/wire/message/send-messages.command.test.d.ts +20 -0
- package/dist/src/wire/message/send-messages.command.test.js +88 -0
- package/dist/src/wire/number.utils.d.ts +32 -0
- package/dist/src/wire/number.utils.js +85 -0
- package/dist/src/wire/offset/delete-offset.command.d.ts +28 -0
- package/dist/src/wire/offset/delete-offset.command.js +31 -0
- package/dist/src/wire/offset/get-offset.command.d.ts +34 -0
- package/dist/src/wire/offset/get-offset.command.js +41 -0
- package/dist/src/wire/offset/index.d.ts +22 -0
- package/dist/src/wire/offset/index.js +22 -0
- package/dist/src/wire/offset/offset.utils.d.ts +54 -0
- package/dist/src/wire/offset/offset.utils.js +60 -0
- package/dist/src/wire/offset/store-offset.command.d.ts +34 -0
- package/dist/src/wire/offset/store-offset.command.js +29 -0
- package/dist/src/wire/partition/create-partition.command.d.ts +31 -0
- package/dist/src/wire/partition/create-partition.command.js +31 -0
- package/dist/src/wire/partition/delete-partition.command.d.ts +31 -0
- package/dist/src/wire/partition/delete-partition.command.js +31 -0
- package/dist/src/wire/partition/index.d.ts +21 -0
- package/dist/src/wire/partition/index.js +21 -0
- package/dist/src/wire/partition/partition.utils.d.ts +21 -0
- package/dist/src/wire/partition/partition.utils.js +33 -0
- package/dist/src/wire/partition/partition.utils.test.d.ts +20 -0
- package/dist/src/wire/partition/partition.utils.test.js +33 -0
- package/dist/src/wire/segment/delete-segments.command.d.ts +32 -0
- package/dist/src/wire/segment/delete-segments.command.js +31 -0
- package/dist/src/wire/segment/index.d.ts +20 -0
- package/dist/src/wire/segment/index.js +20 -0
- package/dist/src/wire/segment/segment.utils.d.ts +21 -0
- package/dist/src/wire/segment/segment.utils.js +35 -0
- package/dist/src/wire/serialize.utils.d.ts +22 -0
- package/dist/src/wire/serialize.utils.js +27 -0
- package/dist/src/wire/session/index.d.ts +23 -0
- package/dist/src/wire/session/index.js +22 -0
- package/dist/src/wire/session/login-with-token.command.d.ts +32 -0
- package/dist/src/wire/session/login-with-token.command.js +30 -0
- package/dist/src/wire/session/login-with-token.command.test.d.ts +20 -0
- package/dist/src/wire/session/login-with-token.command.test.js +38 -0
- package/dist/src/wire/session/login.command.d.ts +29 -0
- package/dist/src/wire/session/login.command.js +30 -0
- package/dist/src/wire/session/login.command.test.d.ts +20 -0
- package/dist/src/wire/session/login.command.test.js +52 -0
- package/dist/src/wire/session/login.utils.d.ts +30 -0
- package/dist/src/wire/session/login.utils.js +54 -0
- package/dist/src/wire/session/logout.command.d.ts +25 -0
- package/dist/src/wire/session/logout.command.js +30 -0
- package/dist/src/wire/stream/create-stream.command.d.ts +31 -0
- package/dist/src/wire/stream/create-stream.command.js +41 -0
- package/dist/src/wire/stream/create-stream.command.test.d.ts +20 -0
- package/dist/src/wire/stream/create-stream.command.test.js +45 -0
- package/dist/src/wire/stream/delete-stream.command.d.ts +29 -0
- package/dist/src/wire/stream/delete-stream.command.js +31 -0
- package/dist/src/wire/stream/get-stream.command.d.ts +31 -0
- package/dist/src/wire/stream/get-stream.command.js +33 -0
- package/dist/src/wire/stream/get-streams.command.d.ts +27 -0
- package/dist/src/wire/stream/get-streams.command.js +38 -0
- package/dist/src/wire/stream/index.d.ts +25 -0
- package/dist/src/wire/stream/index.js +25 -0
- package/dist/src/wire/stream/purge-stream.command.d.ts +29 -0
- package/dist/src/wire/stream/purge-stream.command.js +31 -0
- package/dist/src/wire/stream/stream.utils.d.ts +33 -0
- package/dist/src/wire/stream/stream.utils.js +35 -0
- package/dist/src/wire/stream/update-stream.command.d.ts +30 -0
- package/dist/src/wire/stream/update-stream.command.js +40 -0
- package/dist/src/wire/system/get-stats.command.d.ts +50 -0
- package/dist/src/wire/system/get-stats.command.js +83 -0
- package/dist/src/wire/system/index.d.ts +21 -0
- package/dist/src/wire/system/index.js +21 -0
- package/dist/src/wire/system/ping.command.d.ts +25 -0
- package/dist/src/wire/system/ping.command.js +30 -0
- package/dist/src/wire/token/create-token.command.d.ts +31 -0
- package/dist/src/wire/token/create-token.command.js +37 -0
- package/dist/src/wire/token/create-token.command.test.d.ts +20 -0
- package/dist/src/wire/token/create-token.command.test.js +45 -0
- package/dist/src/wire/token/delete-token.command.d.ts +28 -0
- package/dist/src/wire/token/delete-token.command.js +38 -0
- package/dist/src/wire/token/delete-token.command.test.d.ts +20 -0
- package/dist/src/wire/token/delete-token.command.test.js +42 -0
- package/dist/src/wire/token/get-tokens.command.d.ts +27 -0
- package/dist/src/wire/token/get-tokens.command.js +28 -0
- package/dist/src/wire/token/index.d.ts +22 -0
- package/dist/src/wire/token/index.js +22 -0
- package/dist/src/wire/token/token.utils.d.ts +38 -0
- package/dist/src/wire/token/token.utils.js +53 -0
- package/dist/src/wire/topic/create-topic.command.d.ts +38 -0
- package/dist/src/wire/topic/create-topic.command.js +53 -0
- package/dist/src/wire/topic/create-topic.command.test.d.ts +20 -0
- package/dist/src/wire/topic/create-topic.command.test.js +67 -0
- package/dist/src/wire/topic/delete-topic.command.d.ts +32 -0
- package/dist/src/wire/topic/delete-topic.command.js +36 -0
- package/dist/src/wire/topic/get-topic.command.d.ts +33 -0
- package/dist/src/wire/topic/get-topic.command.js +36 -0
- package/dist/src/wire/topic/get-topics.command.d.ts +31 -0
- package/dist/src/wire/topic/get-topics.command.js +33 -0
- package/dist/src/wire/topic/index.d.ts +25 -0
- package/dist/src/wire/topic/index.js +25 -0
- package/dist/src/wire/topic/purge-topic.command.d.ts +30 -0
- package/dist/src/wire/topic/purge-topic.command.js +34 -0
- package/dist/src/wire/topic/topic.utils.d.ts +71 -0
- package/dist/src/wire/topic/topic.utils.js +91 -0
- package/dist/src/wire/topic/update-topic.command.d.ts +36 -0
- package/dist/src/wire/topic/update-topic.command.js +50 -0
- package/dist/src/wire/user/change-password.command.d.ts +30 -0
- package/dist/src/wire/user/change-password.command.js +45 -0
- package/dist/src/wire/user/create-user.command.d.ts +34 -0
- package/dist/src/wire/user/create-user.command.js +48 -0
- package/dist/src/wire/user/create-user.command.test.d.ts +20 -0
- package/dist/src/wire/user/create-user.command.test.js +60 -0
- package/dist/src/wire/user/delete-user.command.d.ts +29 -0
- package/dist/src/wire/user/delete-user.command.js +31 -0
- package/dist/src/wire/user/get-user.command.d.ts +31 -0
- package/dist/src/wire/user/get-user.command.js +31 -0
- package/dist/src/wire/user/get-users.command.d.ts +27 -0
- package/dist/src/wire/user/get-users.command.js +28 -0
- package/dist/src/wire/user/index.d.ts +26 -0
- package/dist/src/wire/user/index.js +26 -0
- package/dist/src/wire/user/permissions.utils.d.ts +77 -0
- package/dist/src/wire/user/permissions.utils.js +161 -0
- package/dist/src/wire/user/permissions.utils.test.d.ts +20 -0
- package/dist/src/wire/user/permissions.utils.test.js +44 -0
- package/dist/src/wire/user/update-permissions.command.d.ts +31 -0
- package/dist/src/wire/user/update-permissions.command.js +39 -0
- package/dist/src/wire/user/update-user.command.d.ts +32 -0
- package/dist/src/wire/user/update-user.command.js +54 -0
- package/dist/src/wire/user/user.utils.d.ts +41 -0
- package/dist/src/wire/user/user.utils.js +74 -0
- package/dist/src/wire/uuid.utils.d.ts +22 -0
- package/dist/src/wire/uuid.utils.js +23 -0
- package/package.json +70 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { getRawClient } from './client/index.js';
|
|
20
|
+
import { login, logout, getStats, ping } from './wire/index.js';
|
|
21
|
+
try {
|
|
22
|
+
// create socket
|
|
23
|
+
const cli = getRawClient({
|
|
24
|
+
transport: 'TCP',
|
|
25
|
+
options: {
|
|
26
|
+
host: '127.0.0.1',
|
|
27
|
+
port: 8090
|
|
28
|
+
},
|
|
29
|
+
credentials: { username: 'iggy', password: 'iggy' }
|
|
30
|
+
});
|
|
31
|
+
const s = () => Promise.resolve(cli);
|
|
32
|
+
// PING
|
|
33
|
+
const r2 = await ping(s)();
|
|
34
|
+
console.log('RESPONSE PING', r2);
|
|
35
|
+
// LOGIN
|
|
36
|
+
const r = await login(s)({ username: 'iggy', password: 'iggy' });
|
|
37
|
+
console.log('RESPONSE_login', r);
|
|
38
|
+
// GET_STATS
|
|
39
|
+
const r_stats = await getStats(s)();
|
|
40
|
+
console.log('RESPONSE_stats', r_stats);
|
|
41
|
+
// LOGOUT
|
|
42
|
+
const rOut = await logout(s)();
|
|
43
|
+
console.log('RESPONSE LOGOUT', rOut);
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
console.error('FAILED!', err);
|
|
47
|
+
}
|
|
48
|
+
process.exit(0);
|
|
49
|
+
//# sourceMappingURL=tls.system.e2e.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
export declare function reverseRecord<T extends PropertyKey, U extends PropertyKey>(input: Record<T, U>): Record<U, T>;
|
|
20
|
+
export type ValueOf<T> = T[keyof T];
|
|
21
|
+
//# sourceMappingURL=type.utils.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
export function reverseRecord(input) {
|
|
20
|
+
return Object.fromEntries(Object.entries(input).map(([key, value]) => [
|
|
21
|
+
value,
|
|
22
|
+
key,
|
|
23
|
+
]));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=type.utils.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
export type Client = {
|
|
20
|
+
clientId: number;
|
|
21
|
+
userId: number;
|
|
22
|
+
transport: string;
|
|
23
|
+
address: string;
|
|
24
|
+
consumerGroupCount: number;
|
|
25
|
+
};
|
|
26
|
+
type ClientDeserialized = {
|
|
27
|
+
bytesRead: number;
|
|
28
|
+
data: Client;
|
|
29
|
+
};
|
|
30
|
+
export declare const deserializeClient: (r: Buffer, pos?: number) => ClientDeserialized;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=client.utils.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
const transportString = (t) => {
|
|
20
|
+
switch (t.toString()) {
|
|
21
|
+
case '1': return 'tcp';
|
|
22
|
+
case '2': return 'quic';
|
|
23
|
+
default: return `unknown_transport_${t}`;
|
|
24
|
+
// default: throw new Error(`unknown_transport_${t}`);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export const deserializeClient = (r, pos = 0) => {
|
|
28
|
+
/**
|
|
29
|
+
* 0 - 4 u32 - client_id
|
|
30
|
+
* 4 - 8 u32 - user_id
|
|
31
|
+
* 8 - 9 u8 - transport
|
|
32
|
+
* 9 - 13 u32 - adress length x
|
|
33
|
+
* 13 - x string - adress
|
|
34
|
+
* x - x+4 u32 - consumerGroupCount
|
|
35
|
+
*/
|
|
36
|
+
const addressLength = r.readUInt32LE(pos + 9);
|
|
37
|
+
return {
|
|
38
|
+
bytesRead: 13 + addressLength + 4,
|
|
39
|
+
data: {
|
|
40
|
+
clientId: r.readUInt32LE(pos),
|
|
41
|
+
userId: r.readUInt32LE(pos + 4),
|
|
42
|
+
transport: transportString(r.readUInt8(pos + 8)), // { 1: tcp, 2: quic }
|
|
43
|
+
address: r.subarray(pos + 13, pos + 13 + addressLength).toString(),
|
|
44
|
+
consumerGroupCount: r.readUInt32LE(pos + 13 + addressLength)
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=client.utils.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import type { CommandResponse } from '../../client/client.type.js';
|
|
20
|
+
import { type Client } from './client.utils.js';
|
|
21
|
+
export type GetClient = {
|
|
22
|
+
clientId: number;
|
|
23
|
+
};
|
|
24
|
+
export declare const GET_CLIENT: {
|
|
25
|
+
code: number;
|
|
26
|
+
serialize: ({ clientId }: GetClient) => Buffer;
|
|
27
|
+
deserialize: (r: CommandResponse) => Client;
|
|
28
|
+
};
|
|
29
|
+
export declare const getClient: (getClient: import("../../client/client.type.js").ClientProvider) => (arg: GetClient) => Promise<Client>;
|
|
30
|
+
//# sourceMappingURL=get-client.command.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { deserializeClient } from './client.utils.js';
|
|
20
|
+
import { wrapCommand } from '../command.utils.js';
|
|
21
|
+
import { COMMAND_CODE } from '../command.code.js';
|
|
22
|
+
// GET CLIENT by id
|
|
23
|
+
export const GET_CLIENT = {
|
|
24
|
+
code: COMMAND_CODE.GetClient,
|
|
25
|
+
serialize: ({ clientId }) => {
|
|
26
|
+
const b = Buffer.alloc(4);
|
|
27
|
+
b.writeUInt32LE(clientId);
|
|
28
|
+
return b;
|
|
29
|
+
},
|
|
30
|
+
deserialize: (r) => deserializeClient(r.data).data
|
|
31
|
+
};
|
|
32
|
+
export const getClient = wrapCommand(GET_CLIENT);
|
|
33
|
+
//# sourceMappingURL=get-client.command.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import type { CommandResponse } from '../../client/client.type.js';
|
|
20
|
+
import { type Client } from './client.utils.js';
|
|
21
|
+
export declare const GET_CLIENTS: {
|
|
22
|
+
code: number;
|
|
23
|
+
serialize: () => Buffer<ArrayBuffer>;
|
|
24
|
+
deserialize: (r: CommandResponse) => Client[];
|
|
25
|
+
};
|
|
26
|
+
export declare const getClients: (getClient: import("../../client/client.type.js").ClientProvider) => (arg: void) => Promise<Client[]>;
|
|
27
|
+
//# sourceMappingURL=get-clients.command.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { deserializeClient } from './client.utils.js';
|
|
20
|
+
import { wrapCommand } from '../command.utils.js';
|
|
21
|
+
import { COMMAND_CODE } from '../command.code.js';
|
|
22
|
+
export const GET_CLIENTS = {
|
|
23
|
+
code: COMMAND_CODE.GetClients,
|
|
24
|
+
serialize: () => Buffer.alloc(0),
|
|
25
|
+
deserialize: (r) => {
|
|
26
|
+
const payloadSize = r.data.length;
|
|
27
|
+
const clients = [];
|
|
28
|
+
let pos = 0;
|
|
29
|
+
while (pos < payloadSize) {
|
|
30
|
+
const { bytesRead, data } = deserializeClient(r.data, pos);
|
|
31
|
+
clients.push(data);
|
|
32
|
+
pos += bytesRead;
|
|
33
|
+
}
|
|
34
|
+
return clients;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export const getClients = wrapCommand(GET_CLIENTS);
|
|
38
|
+
//# sourceMappingURL=get-clients.command.js.map
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import type { CommandResponse } from '../../client/client.type.js';
|
|
20
|
+
import { type Client } from './client.utils.js';
|
|
21
|
+
export declare const GET_ME: {
|
|
22
|
+
code: number;
|
|
23
|
+
serialize: () => Buffer<ArrayBuffer>;
|
|
24
|
+
deserialize: (r: CommandResponse) => Client;
|
|
25
|
+
};
|
|
26
|
+
export declare const getMe: (getClient: import("../../client/client.type.js").ClientProvider) => (arg: void) => Promise<Client>;
|
|
27
|
+
//# sourceMappingURL=get-me.command.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { deserializeClient } from './client.utils.js';
|
|
20
|
+
import { wrapCommand } from '../command.utils.js';
|
|
21
|
+
import { COMMAND_CODE } from '../command.code.js';
|
|
22
|
+
export const GET_ME = {
|
|
23
|
+
code: COMMAND_CODE.GetMe,
|
|
24
|
+
serialize: () => Buffer.alloc(0),
|
|
25
|
+
deserialize: (r) => deserializeClient(r.data).data
|
|
26
|
+
};
|
|
27
|
+
export const getMe = wrapCommand(GET_ME);
|
|
28
|
+
//# sourceMappingURL=get-me.command.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
export * from './get-client.command.js';
|
|
20
|
+
export * from './get-clients.command.js';
|
|
21
|
+
export * from './get-me.command.js';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
export * from './get-client.command.js';
|
|
20
|
+
export * from './get-clients.command.js';
|
|
21
|
+
export * from './get-me.command.js';
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import type { ClientProvider } from '../client/client.type.js';
|
|
20
|
+
declare const userAPI: (c: ClientProvider) => {
|
|
21
|
+
get: (arg: import("./user/get-user.command.js").GetUser) => Promise<import("./user/user.utils.js").User>;
|
|
22
|
+
list: (arg: void) => Promise<import("./user/user.utils.js").BaseUser[]>;
|
|
23
|
+
create: (arg: import("./user/create-user.command.js").CreateUser) => Promise<import("./user/user.utils.js").User>;
|
|
24
|
+
update: (arg: import("./user/update-user.command.js").UpdateUser) => Promise<boolean>;
|
|
25
|
+
updatePermissions: (arg: import("./user/update-permissions.command.js").UpdatePermissions) => Promise<boolean>;
|
|
26
|
+
changePassword: (arg: import("./user/change-password.command.js").ChangePassword) => Promise<boolean>;
|
|
27
|
+
delete: (arg: import("./user/delete-user.command.js").DeleteUser) => Promise<boolean>;
|
|
28
|
+
};
|
|
29
|
+
type UserAPI = ReturnType<typeof userAPI>;
|
|
30
|
+
declare const sessionAPI: (c: ClientProvider) => {
|
|
31
|
+
login: (arg: import("./index.js").LoginCredentials) => Promise<import("./index.js").LoginResponse>;
|
|
32
|
+
loginWithToken: (arg: import("./session/login-with-token.command.js").LoginWithTokenParam) => Promise<import("./index.js").LoginResponse>;
|
|
33
|
+
logout: (arg: void) => Promise<boolean>;
|
|
34
|
+
};
|
|
35
|
+
type SessionAPI = ReturnType<typeof sessionAPI>;
|
|
36
|
+
declare const clientAPI: (c: ClientProvider) => {
|
|
37
|
+
get: (arg: import("./client/get-client.command.js").GetClient) => Promise<import("./client/client.utils.js").Client>;
|
|
38
|
+
getMe: (arg: void) => Promise<import("./client/client.utils.js").Client>;
|
|
39
|
+
list: (arg: void) => Promise<import("./client/client.utils.js").Client[]>;
|
|
40
|
+
};
|
|
41
|
+
type ClientAPI = ReturnType<typeof clientAPI>;
|
|
42
|
+
declare const tokenAPI: (c: ClientProvider) => {
|
|
43
|
+
list: (arg: void) => Promise<import("./token/token.utils.js").Token[]>;
|
|
44
|
+
create: (arg: import("./token/create-token.command.js").CreateToken) => Promise<import("./token/token.utils.js").CreateTokenResponse>;
|
|
45
|
+
delete: (arg: import("./token/delete-token.command.js").DeleteToken) => Promise<boolean>;
|
|
46
|
+
};
|
|
47
|
+
type TokenAPI = ReturnType<typeof tokenAPI>;
|
|
48
|
+
declare const streamAPI: (c: ClientProvider) => {
|
|
49
|
+
get: (arg: import("./stream/get-stream.command.js").GetStream) => Promise<import("./stream/stream.utils.js").Stream>;
|
|
50
|
+
list: (arg: void) => Promise<import("./stream/stream.utils.js").Stream[]>;
|
|
51
|
+
create: (arg: import("./stream/create-stream.command.js").CreateStream) => Promise<import("./stream/stream.utils.js").Stream>;
|
|
52
|
+
update: (arg: import("./stream/update-stream.command.js").UpdateStream) => Promise<boolean>;
|
|
53
|
+
delete: (arg: import("./stream/delete-stream.command.js").DeleteStream) => Promise<boolean>;
|
|
54
|
+
purge: (arg: import("./stream/purge-stream.command.js").PurgeStream) => Promise<boolean>;
|
|
55
|
+
};
|
|
56
|
+
type StreamAPI = ReturnType<typeof streamAPI>;
|
|
57
|
+
declare const topicAPI: (c: ClientProvider) => {
|
|
58
|
+
get: (arg: {
|
|
59
|
+
streamId: import("./identifier.utils.js").Id;
|
|
60
|
+
topicId: import("./identifier.utils.js").Id;
|
|
61
|
+
}) => Promise<import("./topic/topic.utils.js").Topic>;
|
|
62
|
+
list: (arg: import("./topic/get-topics.command.js").GetTopics) => Promise<import("./topic/topic.utils.js").Topic[]>;
|
|
63
|
+
create: (arg: import("./topic/create-topic.command.js").CreateTopic) => Promise<import("./topic/topic.utils.js").Topic>;
|
|
64
|
+
update: (arg: import("./topic/update-topic.command.js").UpdateTopic) => Promise<boolean>;
|
|
65
|
+
delete: (arg: {
|
|
66
|
+
streamId: import("./identifier.utils.js").Id;
|
|
67
|
+
topicId: import("./identifier.utils.js").Id;
|
|
68
|
+
partitionsCount: number;
|
|
69
|
+
}) => Promise<boolean>;
|
|
70
|
+
purge: (arg: import("./topic/purge-topic.command.js").PurgeTopic) => Promise<boolean>;
|
|
71
|
+
};
|
|
72
|
+
type TopicAPI = ReturnType<typeof topicAPI>;
|
|
73
|
+
declare const partitionAPI: (c: ClientProvider) => {
|
|
74
|
+
create: (arg: import("./partition/create-partition.command.js").CreatePartition) => Promise<boolean>;
|
|
75
|
+
delete: (arg: import("./partition/delete-partition.command.js").DeletePartition) => Promise<boolean>;
|
|
76
|
+
};
|
|
77
|
+
type PartitionAPI = ReturnType<typeof partitionAPI>;
|
|
78
|
+
declare const segmentAPI: (c: ClientProvider) => {
|
|
79
|
+
delete: (arg: import("./segment/delete-segments.command.js").DeleteSegments) => Promise<boolean>;
|
|
80
|
+
};
|
|
81
|
+
type SegmentAPI = ReturnType<typeof segmentAPI>;
|
|
82
|
+
declare const groupAPI: (c: ClientProvider) => {
|
|
83
|
+
get: (arg: import("./consumer-group/get-group.command.js").GetGroup) => Promise<import("./consumer-group/group.utils.js").ConsumerGroup>;
|
|
84
|
+
list: (arg: import("./consumer-group/get-groups.command.js").GetGroups) => Promise<import("./consumer-group/group.utils.js").ConsumerGroup[]>;
|
|
85
|
+
create: (arg: import("./consumer-group/create-group.command.js").CreateGroup) => Promise<import("./consumer-group/group.utils.js").ConsumerGroup>;
|
|
86
|
+
join: (arg: import("./consumer-group/join-group.command.js").JoinGroup) => Promise<boolean>;
|
|
87
|
+
leave: (arg: import("./consumer-group/leave-group.command.js").LeaveGroup) => Promise<boolean>;
|
|
88
|
+
delete: (arg: import("./consumer-group/delete-group.command.js").DeleteGroup) => Promise<boolean>;
|
|
89
|
+
};
|
|
90
|
+
type GroupAPI = ReturnType<typeof groupAPI>;
|
|
91
|
+
declare const offsetAPI: (c: ClientProvider) => {
|
|
92
|
+
get: (arg: import("./offset/get-offset.command.js").GetOffset) => Promise<import("./offset/offset.utils.js").OffsetResponse>;
|
|
93
|
+
store: (arg: import("./offset/store-offset.command.js").StoreOffset) => Promise<boolean>;
|
|
94
|
+
delete: (arg: import("./offset/get-offset.command.js").GetOffset) => Promise<boolean>;
|
|
95
|
+
};
|
|
96
|
+
type OffsetAPI = ReturnType<typeof offsetAPI>;
|
|
97
|
+
declare const messageAPI: (c: ClientProvider) => {
|
|
98
|
+
poll: (arg: import("./message/poll-messages.command.js").PollMessages) => Promise<import("./index.js").PollMessagesResponse>;
|
|
99
|
+
send: (arg: import("./message/send-messages.command.js").SendMessages) => Promise<boolean>;
|
|
100
|
+
flushUnsavedBuffers: (arg: import("./message/flush-unsaved-buffers.command.js").FlushUnsavedBuffer) => Promise<boolean>;
|
|
101
|
+
};
|
|
102
|
+
type MessageAPI = ReturnType<typeof messageAPI>;
|
|
103
|
+
declare const systemAPI: (c: ClientProvider) => {
|
|
104
|
+
ping: (arg: void) => Promise<boolean>;
|
|
105
|
+
getStats: (arg: void) => Promise<import("./system/get-stats.command.js").Stats>;
|
|
106
|
+
};
|
|
107
|
+
type SystemAPI = ReturnType<typeof systemAPI>;
|
|
108
|
+
export declare abstract class AbstractAPI {
|
|
109
|
+
clientProvider: ClientProvider;
|
|
110
|
+
constructor(getClient: ClientProvider);
|
|
111
|
+
}
|
|
112
|
+
export declare abstract class CommandAPI extends AbstractAPI {
|
|
113
|
+
user: UserAPI;
|
|
114
|
+
session: SessionAPI;
|
|
115
|
+
client: ClientAPI;
|
|
116
|
+
token: TokenAPI;
|
|
117
|
+
stream: StreamAPI;
|
|
118
|
+
topic: TopicAPI;
|
|
119
|
+
partition: PartitionAPI;
|
|
120
|
+
segment: SegmentAPI;
|
|
121
|
+
group: GroupAPI;
|
|
122
|
+
offset: OffsetAPI;
|
|
123
|
+
message: MessageAPI;
|
|
124
|
+
system: SystemAPI;
|
|
125
|
+
constructor(c: ClientProvider);
|
|
126
|
+
}
|
|
127
|
+
export {};
|
|
128
|
+
//# sourceMappingURL=command-set.d.ts.map
|