@platformatic/kafka 1.23.0 → 1.24.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/alter-client-quotas-v1.d.ts +4 -4
- package/dist/apis/admin/alter-configs-v2.d.ts +3 -2
- package/dist/apis/admin/alter-partition-reassignments-v0.js +1 -1
- package/dist/apis/admin/create-acls-v3.d.ts +3 -11
- package/dist/apis/admin/create-partitions-v3.d.ts +2 -2
- package/dist/apis/admin/delete-acls-v3.d.ts +4 -19
- package/dist/apis/admin/delete-acls-v3.js +6 -6
- package/dist/apis/admin/describe-acls-v3.d.ts +5 -13
- package/dist/apis/admin/describe-acls-v3.js +9 -9
- package/dist/apis/admin/describe-client-quotas-v0.d.ts +5 -5
- package/dist/apis/admin/describe-configs-v4.d.ts +7 -6
- package/dist/apis/admin/describe-configs-v4.js +1 -1
- package/dist/apis/admin/incremental-alter-configs-v1.d.ts +12 -5
- package/dist/apis/admin/incremental-alter-configs-v1.js +3 -1
- package/dist/apis/admin/list-groups-v4.d.ts +2 -2
- package/dist/apis/admin/list-groups-v5.d.ts +2 -2
- package/dist/apis/admin/offset-delete-v0.js +3 -3
- package/dist/apis/callbacks.d.ts +3 -1
- package/dist/apis/consumer/offset-commit-v9.d.ts +2 -2
- package/dist/apis/consumer/offset-fetch-v8.d.ts +2 -2
- package/dist/apis/consumer/offset-fetch-v9.d.ts +2 -2
- package/dist/apis/definitions.d.ts +2 -2
- package/dist/apis/enumerations.d.ts +134 -42
- package/dist/apis/enumerations.js +42 -6
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/apis/producer/add-offsets-to-txn-v3.d.ts +10 -0
- package/dist/apis/producer/add-offsets-to-txn-v3.js +34 -0
- package/dist/apis/producer/add-partitions-to-txn-v3.d.ts +34 -0
- package/dist/apis/producer/add-partitions-to-txn-v3.js +67 -0
- package/dist/apis/producer/add-partitions-to-txn-v4.d.ts +34 -0
- package/dist/apis/producer/add-partitions-to-txn-v4.js +79 -0
- package/dist/apis/producer/end-txn-v3.d.ts +10 -0
- package/dist/apis/producer/end-txn-v3.js +34 -0
- package/dist/apis/producer/index.d.ts +5 -0
- package/dist/apis/producer/index.js +5 -0
- package/dist/apis/producer/txn-offset-commit-v3.d.ts +29 -0
- package/dist/apis/producer/txn-offset-commit-v3.js +74 -0
- package/dist/apis/types.d.ts +16 -0
- package/dist/apis/types.js +1 -0
- package/dist/clients/admin/admin.d.ts +31 -1
- package/dist/clients/admin/admin.js +732 -50
- package/dist/clients/admin/options.d.ts +577 -0
- package/dist/clients/admin/options.js +359 -2
- package/dist/clients/admin/types.d.ts +105 -3
- package/dist/clients/base/base.js +29 -26
- package/dist/clients/base/options.d.ts +2 -5
- package/dist/clients/base/options.js +0 -1
- package/dist/clients/base/types.d.ts +8 -2
- package/dist/clients/consumer/consumer.d.ts +58 -2
- package/dist/clients/consumer/consumer.js +116 -47
- package/dist/clients/consumer/messages-stream.d.ts +1 -0
- package/dist/clients/consumer/messages-stream.js +48 -17
- package/dist/clients/consumer/options.d.ts +6 -6
- package/dist/clients/consumer/options.js +3 -3
- package/dist/clients/consumer/types.d.ts +26 -3
- package/dist/clients/index.d.ts +1 -1
- package/dist/clients/index.js +1 -1
- package/dist/clients/producer/options.d.ts +12 -3
- package/dist/clients/producer/options.js +1 -0
- package/dist/clients/producer/producer.d.ts +19 -2
- package/dist/clients/producer/producer.js +335 -37
- package/dist/clients/producer/transaction.d.ts +30 -0
- package/dist/clients/producer/transaction.js +172 -0
- package/dist/clients/producer/types.d.ts +2 -0
- package/dist/diagnostic.d.ts +5 -0
- package/dist/diagnostic.js +5 -0
- package/dist/errors.js +1 -0
- package/dist/network/connection-pool.js +4 -4
- package/dist/network/connection.js +3 -2
- package/dist/protocol/records.d.ts +12 -0
- package/dist/protocol/records.js +6 -4
- package/dist/protocol/sasl/oauth-bearer.js +4 -4
- package/dist/protocol/sasl/plain.js +2 -2
- package/dist/protocol/sasl/scram-sha.js +8 -8
- package/dist/protocol/sasl/utils.js +5 -5
- package/dist/symbols.d.ts +8 -0
- package/dist/symbols.js +8 -0
- package/dist/typescript-4/dist/apis/admin/alter-client-quotas-v1.d.ts +4 -4
- package/dist/typescript-4/dist/apis/admin/alter-configs-v2.d.ts +3 -2
- package/dist/typescript-4/dist/apis/admin/create-acls-v3.d.ts +3 -11
- package/dist/typescript-4/dist/apis/admin/create-partitions-v3.d.ts +2 -2
- package/dist/typescript-4/dist/apis/admin/delete-acls-v3.d.ts +4 -19
- package/dist/typescript-4/dist/apis/admin/describe-acls-v3.d.ts +5 -13
- package/dist/typescript-4/dist/apis/admin/describe-client-quotas-v0.d.ts +5 -5
- package/dist/typescript-4/dist/apis/admin/describe-configs-v4.d.ts +7 -6
- package/dist/typescript-4/dist/apis/admin/incremental-alter-configs-v1.d.ts +13 -6
- package/dist/typescript-4/dist/apis/admin/list-groups-v4.d.ts +2 -2
- package/dist/typescript-4/dist/apis/admin/list-groups-v5.d.ts +2 -2
- package/dist/typescript-4/dist/apis/callbacks.d.ts +3 -1
- package/dist/typescript-4/dist/apis/consumer/offset-commit-v9.d.ts +2 -2
- package/dist/typescript-4/dist/apis/consumer/offset-fetch-v8.d.ts +2 -2
- package/dist/typescript-4/dist/apis/consumer/offset-fetch-v9.d.ts +2 -2
- package/dist/typescript-4/dist/apis/definitions.d.ts +2 -2
- package/dist/typescript-4/dist/apis/enumerations.d.ts +134 -42
- package/dist/typescript-4/dist/apis/index.d.ts +1 -0
- package/dist/typescript-4/dist/apis/producer/add-offsets-to-txn-v3.d.ts +10 -0
- package/dist/typescript-4/dist/apis/producer/add-partitions-to-txn-v3.d.ts +34 -0
- package/dist/typescript-4/dist/apis/producer/add-partitions-to-txn-v4.d.ts +34 -0
- package/dist/typescript-4/dist/apis/producer/end-txn-v3.d.ts +10 -0
- package/dist/typescript-4/dist/apis/producer/index.d.ts +5 -0
- package/dist/typescript-4/dist/apis/producer/txn-offset-commit-v3.d.ts +29 -0
- package/dist/typescript-4/dist/apis/types.d.ts +14 -0
- package/dist/typescript-4/dist/clients/admin/admin.d.ts +31 -1
- package/dist/typescript-4/dist/clients/admin/options.d.ts +577 -0
- package/dist/typescript-4/dist/clients/admin/types.d.ts +105 -3
- package/dist/typescript-4/dist/clients/base/options.d.ts +2 -5
- package/dist/typescript-4/dist/clients/base/types.d.ts +8 -2
- package/dist/typescript-4/dist/clients/consumer/consumer.d.ts +58 -2
- package/dist/typescript-4/dist/clients/consumer/messages-stream.d.ts +1 -0
- package/dist/typescript-4/dist/clients/consumer/options.d.ts +6 -6
- package/dist/typescript-4/dist/clients/consumer/types.d.ts +27 -4
- package/dist/typescript-4/dist/clients/index.d.ts +1 -1
- package/dist/typescript-4/dist/clients/producer/options.d.ts +12 -3
- package/dist/typescript-4/dist/clients/producer/producer.d.ts +19 -2
- package/dist/typescript-4/dist/clients/producer/transaction.d.ts +30 -0
- package/dist/typescript-4/dist/clients/producer/types.d.ts +2 -0
- package/dist/typescript-4/dist/diagnostic.d.ts +5 -0
- package/dist/typescript-4/dist/protocol/records.d.ts +12 -0
- package/dist/typescript-4/dist/symbols.d.ts +9 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { allowedIncrementalAlterConfigOperationTypes, allowedResourceTypes, ConsumerGroupStates, IncrementalAlterConfigOperationTypes, allowedAclOperations, allowedAclPermissionTypes, allowedResourcePatternTypes, allowedFetchIsolationLevels, allowedClientQuotaMatchTypes } from "../../apis/enumerations.js";
|
|
2
2
|
import { ajv, listErrorMessage } from "../../utils.js";
|
|
3
3
|
import { idProperty } from "../base/options.js";
|
|
4
4
|
export const groupsProperties = {
|
|
@@ -46,6 +46,38 @@ export const deleteTopicOptionsSchema = {
|
|
|
46
46
|
required: ['topics'],
|
|
47
47
|
additionalProperties: false
|
|
48
48
|
};
|
|
49
|
+
export const createPartitionsOptionsSchema = {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
topics: {
|
|
53
|
+
type: 'array',
|
|
54
|
+
items: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
name: idProperty,
|
|
58
|
+
count: { type: 'number', minimum: 1 },
|
|
59
|
+
assignments: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
items: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
properties: {
|
|
64
|
+
brokerIds: { type: 'array', items: { type: 'number' }, minItems: 1 }
|
|
65
|
+
},
|
|
66
|
+
required: ['brokerIds'],
|
|
67
|
+
additionalProperties: false
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
required: ['name', 'count'],
|
|
72
|
+
additionalProperties: false
|
|
73
|
+
},
|
|
74
|
+
minItems: 1
|
|
75
|
+
},
|
|
76
|
+
validateOnly: { type: 'boolean', default: false }
|
|
77
|
+
},
|
|
78
|
+
required: ['topics'],
|
|
79
|
+
additionalProperties: false
|
|
80
|
+
};
|
|
49
81
|
export const listGroupsOptionsSchema = {
|
|
50
82
|
type: 'object',
|
|
51
83
|
properties: {
|
|
@@ -113,7 +145,7 @@ export const describeClientQuotasOptionsSchema = {
|
|
|
113
145
|
type: 'object',
|
|
114
146
|
properties: {
|
|
115
147
|
entityType: { type: 'string', minLength: 1 },
|
|
116
|
-
matchType: { type: 'number', enum:
|
|
148
|
+
matchType: { type: 'number', enum: allowedClientQuotaMatchTypes },
|
|
117
149
|
match: { type: 'string' }
|
|
118
150
|
},
|
|
119
151
|
required: ['entityType', 'matchType'],
|
|
@@ -209,7 +241,322 @@ export const describeLogDirsOptionsSchema = {
|
|
|
209
241
|
required: ['topics'],
|
|
210
242
|
additionalProperties: false
|
|
211
243
|
};
|
|
244
|
+
export const listConsumerGroupOffsetsOptionsSchema = {
|
|
245
|
+
type: 'object',
|
|
246
|
+
properties: {
|
|
247
|
+
groups: {
|
|
248
|
+
type: 'array',
|
|
249
|
+
items: {
|
|
250
|
+
oneOf: [
|
|
251
|
+
{ type: 'string', minLength: 1 },
|
|
252
|
+
{
|
|
253
|
+
type: 'object',
|
|
254
|
+
properties: {
|
|
255
|
+
groupId: { type: 'string', minLength: 1 },
|
|
256
|
+
topics: {
|
|
257
|
+
type: ['array', 'null'],
|
|
258
|
+
items: {
|
|
259
|
+
type: 'object',
|
|
260
|
+
properties: {
|
|
261
|
+
name: { type: 'string', minLength: 1 },
|
|
262
|
+
partitionIndexes: {
|
|
263
|
+
type: 'array',
|
|
264
|
+
items: { type: 'number', minimum: 0 },
|
|
265
|
+
minItems: 1
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
required: ['name', 'partitionIndexes'],
|
|
269
|
+
additionalProperties: false
|
|
270
|
+
},
|
|
271
|
+
minItems: 1
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
required: ['groupId'],
|
|
275
|
+
additionalProperties: false
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
minItems: 1
|
|
280
|
+
},
|
|
281
|
+
requireStable: {
|
|
282
|
+
type: 'boolean'
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
required: ['groups'],
|
|
286
|
+
additionalProperties: false
|
|
287
|
+
};
|
|
288
|
+
export const alterConsumerGroupOffsetsOptionsSchema = {
|
|
289
|
+
type: 'object',
|
|
290
|
+
properties: {
|
|
291
|
+
groupId: { type: 'string', minLength: 1 },
|
|
292
|
+
topics: {
|
|
293
|
+
type: 'array',
|
|
294
|
+
items: {
|
|
295
|
+
type: 'object',
|
|
296
|
+
properties: {
|
|
297
|
+
name: { type: 'string', minLength: 1 },
|
|
298
|
+
partitionOffsets: {
|
|
299
|
+
type: 'array',
|
|
300
|
+
items: {
|
|
301
|
+
type: 'object',
|
|
302
|
+
properties: {
|
|
303
|
+
partition: { type: 'number', minimum: 0 },
|
|
304
|
+
offset: { bigint: true }
|
|
305
|
+
},
|
|
306
|
+
required: ['partition', 'offset'],
|
|
307
|
+
additionalProperties: false
|
|
308
|
+
},
|
|
309
|
+
minItems: 1
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
required: ['name', 'partitionOffsets'],
|
|
313
|
+
additionalProperties: false
|
|
314
|
+
},
|
|
315
|
+
minItems: 1
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
required: ['groupId', 'topics'],
|
|
319
|
+
additionalProperties: false
|
|
320
|
+
};
|
|
321
|
+
export const deleteConsumerGroupOffsetsOptionsSchema = {
|
|
322
|
+
type: 'object',
|
|
323
|
+
properties: {
|
|
324
|
+
groupId: { type: 'string', minLength: 1 },
|
|
325
|
+
topics: {
|
|
326
|
+
type: 'array',
|
|
327
|
+
items: {
|
|
328
|
+
type: 'object',
|
|
329
|
+
properties: {
|
|
330
|
+
name: { type: 'string', minLength: 1 },
|
|
331
|
+
partitionIndexes: {
|
|
332
|
+
type: 'array',
|
|
333
|
+
items: { type: 'number', minimum: 0 },
|
|
334
|
+
minItems: 1
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
required: ['name', 'partitionIndexes'],
|
|
338
|
+
additionalProperties: false
|
|
339
|
+
},
|
|
340
|
+
minItems: 1
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
required: ['groupId', 'topics'],
|
|
344
|
+
additionalProperties: false
|
|
345
|
+
};
|
|
346
|
+
export const describeConfigsOptionsSchema = {
|
|
347
|
+
type: 'object',
|
|
348
|
+
properties: {
|
|
349
|
+
resources: {
|
|
350
|
+
type: 'array',
|
|
351
|
+
items: {
|
|
352
|
+
type: 'object',
|
|
353
|
+
properties: {
|
|
354
|
+
resourceType: { type: 'number', enum: allowedResourceTypes },
|
|
355
|
+
resourceName: { type: 'string', minLength: 1 },
|
|
356
|
+
configurationKeys: {
|
|
357
|
+
type: ['array', 'null'],
|
|
358
|
+
items: { type: 'string', minLength: 1 }
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
required: ['resourceType', 'resourceName'],
|
|
362
|
+
additionalProperties: false
|
|
363
|
+
},
|
|
364
|
+
minItems: 1
|
|
365
|
+
},
|
|
366
|
+
includeSynonyms: { type: 'boolean' },
|
|
367
|
+
includeDocumentation: { type: 'boolean' }
|
|
368
|
+
},
|
|
369
|
+
required: ['resources'],
|
|
370
|
+
additionalProperties: false
|
|
371
|
+
};
|
|
372
|
+
export const alterConfigsOptionsSchema = {
|
|
373
|
+
type: 'object',
|
|
374
|
+
properties: {
|
|
375
|
+
resources: {
|
|
376
|
+
type: 'array',
|
|
377
|
+
items: {
|
|
378
|
+
type: 'object',
|
|
379
|
+
properties: {
|
|
380
|
+
resourceType: { type: 'number', enum: allowedResourceTypes },
|
|
381
|
+
resourceName: { type: 'string', minLength: 1 },
|
|
382
|
+
configs: {
|
|
383
|
+
type: 'array',
|
|
384
|
+
items: {
|
|
385
|
+
type: 'object',
|
|
386
|
+
properties: {
|
|
387
|
+
name: { type: 'string', minLength: 1 },
|
|
388
|
+
value: { type: ['string', 'null'] }
|
|
389
|
+
},
|
|
390
|
+
required: ['name'],
|
|
391
|
+
additionalProperties: false
|
|
392
|
+
},
|
|
393
|
+
minItems: 1
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
required: ['resourceType', 'resourceName', 'configs'],
|
|
397
|
+
additionalProperties: false
|
|
398
|
+
},
|
|
399
|
+
minItems: 1
|
|
400
|
+
},
|
|
401
|
+
validateOnly: { type: 'boolean' }
|
|
402
|
+
},
|
|
403
|
+
required: ['resources'],
|
|
404
|
+
additionalProperties: false
|
|
405
|
+
};
|
|
406
|
+
export const incrementalAlterConfigsOptionsSchema = {
|
|
407
|
+
type: 'object',
|
|
408
|
+
properties: {
|
|
409
|
+
resources: {
|
|
410
|
+
type: 'array',
|
|
411
|
+
items: {
|
|
412
|
+
type: 'object',
|
|
413
|
+
properties: {
|
|
414
|
+
resourceType: { type: 'number', enum: allowedResourceTypes },
|
|
415
|
+
resourceName: { type: 'string', minLength: 1 },
|
|
416
|
+
configs: {
|
|
417
|
+
type: 'array',
|
|
418
|
+
items: {
|
|
419
|
+
oneOf: [
|
|
420
|
+
{
|
|
421
|
+
type: 'object',
|
|
422
|
+
properties: {
|
|
423
|
+
name: { type: 'string', minLength: 1 },
|
|
424
|
+
configOperation: {
|
|
425
|
+
type: 'number',
|
|
426
|
+
enum: [
|
|
427
|
+
...allowedIncrementalAlterConfigOperationTypes.filter(v => v !== IncrementalAlterConfigOperationTypes.DELETE)
|
|
428
|
+
]
|
|
429
|
+
},
|
|
430
|
+
value: { type: 'string' }
|
|
431
|
+
},
|
|
432
|
+
required: ['name', 'configOperation', 'value'],
|
|
433
|
+
additionalProperties: false
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
type: 'object',
|
|
437
|
+
properties: {
|
|
438
|
+
name: { type: 'string', minLength: 1 },
|
|
439
|
+
configOperation: { type: 'number', enum: [IncrementalAlterConfigOperationTypes.DELETE] }
|
|
440
|
+
},
|
|
441
|
+
required: ['name', 'configOperation'],
|
|
442
|
+
additionalProperties: false
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
minItems: 1
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
required: ['resourceType', 'resourceName', 'configs'],
|
|
450
|
+
additionalProperties: false
|
|
451
|
+
},
|
|
452
|
+
minItems: 1
|
|
453
|
+
},
|
|
454
|
+
validateOnly: { type: 'boolean' }
|
|
455
|
+
},
|
|
456
|
+
required: ['resources'],
|
|
457
|
+
additionalProperties: false
|
|
458
|
+
};
|
|
459
|
+
const aclSchema = {
|
|
460
|
+
type: 'object',
|
|
461
|
+
properties: {
|
|
462
|
+
resourceType: { type: 'number', enum: allowedResourceTypes },
|
|
463
|
+
resourceName: { type: 'string', minLength: 1 },
|
|
464
|
+
resourcePatternType: { type: 'number', enum: allowedResourcePatternTypes },
|
|
465
|
+
principal: { type: 'string', minLength: 1 },
|
|
466
|
+
host: { type: 'string', minLength: 1 },
|
|
467
|
+
operation: { type: 'number', enum: allowedAclOperations },
|
|
468
|
+
permissionType: { type: 'number', enum: allowedAclPermissionTypes }
|
|
469
|
+
},
|
|
470
|
+
required: ['resourceType', 'resourceName', 'resourcePatternType', 'principal', 'host', 'operation', 'permissionType'],
|
|
471
|
+
additionalProperties: false
|
|
472
|
+
};
|
|
473
|
+
const aclFilterSchema = {
|
|
474
|
+
type: 'object',
|
|
475
|
+
properties: {
|
|
476
|
+
resourceType: { type: 'number', enum: allowedResourceTypes },
|
|
477
|
+
resourceName: {
|
|
478
|
+
anyOf: [{ type: 'string', minLength: 1 }, { type: 'null' }]
|
|
479
|
+
},
|
|
480
|
+
resourcePatternType: { type: 'number', enum: allowedResourcePatternTypes },
|
|
481
|
+
principal: {
|
|
482
|
+
anyOf: [{ type: 'string', minLength: 1 }, { type: 'null' }]
|
|
483
|
+
},
|
|
484
|
+
host: {
|
|
485
|
+
anyOf: [{ type: 'string', minLength: 1 }, { type: 'null' }]
|
|
486
|
+
},
|
|
487
|
+
operation: { type: 'number', enum: allowedAclOperations },
|
|
488
|
+
permissionType: { type: 'number', enum: allowedAclPermissionTypes }
|
|
489
|
+
},
|
|
490
|
+
required: ['resourceType', 'resourcePatternType', 'operation', 'permissionType'],
|
|
491
|
+
additionalProperties: false
|
|
492
|
+
};
|
|
493
|
+
export const createAclsOptionsSchema = {
|
|
494
|
+
type: 'object',
|
|
495
|
+
properties: {
|
|
496
|
+
creations: {
|
|
497
|
+
type: 'array',
|
|
498
|
+
items: aclSchema,
|
|
499
|
+
minItems: 1
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
required: ['creations'],
|
|
503
|
+
additionalProperties: false
|
|
504
|
+
};
|
|
505
|
+
export const describeAclsOptionsSchema = {
|
|
506
|
+
type: 'object',
|
|
507
|
+
properties: {
|
|
508
|
+
filter: aclFilterSchema
|
|
509
|
+
},
|
|
510
|
+
required: ['filter'],
|
|
511
|
+
additionalProperties: false
|
|
512
|
+
};
|
|
513
|
+
export const deleteAclsOptionsSchema = {
|
|
514
|
+
type: 'object',
|
|
515
|
+
properties: {
|
|
516
|
+
filters: {
|
|
517
|
+
type: 'array',
|
|
518
|
+
items: aclFilterSchema,
|
|
519
|
+
minItems: 1
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
required: ['filters'],
|
|
523
|
+
additionalProperties: false
|
|
524
|
+
};
|
|
525
|
+
export const listOffsetsOptionsSchema = {
|
|
526
|
+
type: 'object',
|
|
527
|
+
properties: {
|
|
528
|
+
topics: {
|
|
529
|
+
type: 'array',
|
|
530
|
+
items: {
|
|
531
|
+
type: 'object',
|
|
532
|
+
properties: {
|
|
533
|
+
name: { type: 'string', minLength: 1 },
|
|
534
|
+
partitions: {
|
|
535
|
+
type: 'array',
|
|
536
|
+
items: {
|
|
537
|
+
type: 'object',
|
|
538
|
+
properties: {
|
|
539
|
+
partitionIndex: { type: 'number', minimum: 0 },
|
|
540
|
+
timestamp: { bigint: true }
|
|
541
|
+
},
|
|
542
|
+
required: ['partitionIndex', 'timestamp'],
|
|
543
|
+
additionalProperties: false
|
|
544
|
+
},
|
|
545
|
+
minItems: 1
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
required: ['name', 'partitions'],
|
|
549
|
+
additionalProperties: false
|
|
550
|
+
},
|
|
551
|
+
minItems: 1
|
|
552
|
+
},
|
|
553
|
+
isolationLevel: { type: ['number', 'null'], enum: [null, ...allowedFetchIsolationLevels] }
|
|
554
|
+
},
|
|
555
|
+
required: ['topics'],
|
|
556
|
+
additionalProperties: false
|
|
557
|
+
};
|
|
212
558
|
export const createTopicsOptionsValidator = ajv.compile(createTopicOptionsSchema);
|
|
559
|
+
export const createPartitionsOptionsValidator = ajv.compile(createPartitionsOptionsSchema);
|
|
213
560
|
export const listTopicsOptionsValidator = ajv.compile(listTopicOptionsSchema);
|
|
214
561
|
export const deleteTopicsOptionsValidator = ajv.compile(deleteTopicOptionsSchema);
|
|
215
562
|
export const listGroupsOptionsValidator = ajv.compile(listGroupsOptionsSchema);
|
|
@@ -219,3 +566,13 @@ export const removeMembersFromConsumerGroupOptionsValidator = ajv.compile(remove
|
|
|
219
566
|
export const describeClientQuotasOptionsValidator = ajv.compile(describeClientQuotasOptionsSchema);
|
|
220
567
|
export const alterClientQuotasOptionsValidator = ajv.compile(alterClientQuotasOptionsSchema);
|
|
221
568
|
export const describeLogDirsOptionsValidator = ajv.compile(describeLogDirsOptionsSchema);
|
|
569
|
+
export const alterConsumerGroupOffsetsOptionsValidator = ajv.compile(alterConsumerGroupOffsetsOptionsSchema);
|
|
570
|
+
export const deleteConsumerGroupOffsetsOptionsValidator = ajv.compile(deleteConsumerGroupOffsetsOptionsSchema);
|
|
571
|
+
export const listConsumerGroupOffsetsOptionsValidator = ajv.compile(listConsumerGroupOffsetsOptionsSchema);
|
|
572
|
+
export const describeConfigsOptionsValidator = ajv.compile(describeConfigsOptionsSchema);
|
|
573
|
+
export const alterConfigsOptionsValidator = ajv.compile(alterConfigsOptionsSchema);
|
|
574
|
+
export const incrementalAlterConfigsOptionsValidator = ajv.compile(incrementalAlterConfigsOptionsSchema);
|
|
575
|
+
export const createAclsOptionsValidator = ajv.compile(createAclsOptionsSchema);
|
|
576
|
+
export const describeAclsOptionsValidator = ajv.compile(describeAclsOptionsSchema);
|
|
577
|
+
export const deleteAclsOptionsValidator = ajv.compile(deleteAclsOptionsSchema);
|
|
578
|
+
export const listOffsetsOptionsValidator = ajv.compile(listOffsetsOptionsSchema);
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { type AlterClientQuotasRequestEntry } from '../../apis/admin/alter-client-quotas-v1.ts';
|
|
2
|
+
import { type CreatePartitionsRequestTopic } from '../../apis/admin/create-partitions-v3.ts';
|
|
2
3
|
import { type CreateTopicsRequestTopicConfig } from '../../apis/admin/create-topics-v7.ts';
|
|
4
|
+
import { type AlterConfigsRequestResource } from '../../apis/admin/alter-configs-v2.ts';
|
|
5
|
+
import { type DescribeConfigsRequestResource, type DescribeConfigsResponseConfig } from '../../apis/admin/describe-configs-v4.ts';
|
|
3
6
|
import { type DescribeClientQuotasRequestComponent } from '../../apis/admin/describe-client-quotas-v0.ts';
|
|
4
7
|
import { type DescribeLogDirsRequestTopic, type DescribeLogDirsResponse, type DescribeLogDirsResponseResult } from '../../apis/admin/describe-log-dirs-v4.ts';
|
|
5
|
-
import { type
|
|
8
|
+
import { type IncrementalAlterConfigsRequestResource } from '../../apis/admin/incremental-alter-configs-v1.ts';
|
|
9
|
+
import { type FetchIsolationLevelValue, type ConfigResourceTypeValue, type ConsumerGroupStateValue } from '../../apis/enumerations.ts';
|
|
6
10
|
import { type Nullable, type NullableString } from '../../protocol/definitions.ts';
|
|
7
11
|
import { type BaseOptions } from '../base/types.ts';
|
|
8
12
|
import { type ExtendedGroupProtocolSubscription, type GroupAssignment } from '../consumer/types.ts';
|
|
13
|
+
import { type Acl, type AclFilter } from '../../apis/types.ts';
|
|
9
14
|
export interface BrokerAssignment {
|
|
10
15
|
partition: number;
|
|
11
16
|
brokers: number[];
|
|
@@ -27,7 +32,7 @@ export interface GroupMember {
|
|
|
27
32
|
}
|
|
28
33
|
export interface GroupBase {
|
|
29
34
|
id: string;
|
|
30
|
-
state:
|
|
35
|
+
state: ConsumerGroupStateValue;
|
|
31
36
|
groupType: string;
|
|
32
37
|
protocolType: string;
|
|
33
38
|
}
|
|
@@ -51,8 +56,12 @@ export interface ListTopicsOptions {
|
|
|
51
56
|
export interface DeleteTopicsOptions {
|
|
52
57
|
topics: string[];
|
|
53
58
|
}
|
|
59
|
+
export interface CreatePartitionsOptions {
|
|
60
|
+
topics: CreatePartitionsRequestTopic[];
|
|
61
|
+
validateOnly?: boolean;
|
|
62
|
+
}
|
|
54
63
|
export interface ListGroupsOptions {
|
|
55
|
-
states?:
|
|
64
|
+
states?: ConsumerGroupStateValue[];
|
|
56
65
|
types?: string[];
|
|
57
66
|
}
|
|
58
67
|
export interface DescribeGroupsOptions {
|
|
@@ -86,4 +95,97 @@ export interface BrokerLogDirDescription {
|
|
|
86
95
|
throttleTimeMs: DescribeLogDirsResponse['throttleTimeMs'];
|
|
87
96
|
results: Omit<DescribeLogDirsResponseResult, 'errorCode'>[];
|
|
88
97
|
}
|
|
98
|
+
interface GroupWithTopicPartitions {
|
|
99
|
+
groupId: string;
|
|
100
|
+
topics?: Nullable<{
|
|
101
|
+
name: string;
|
|
102
|
+
partitionIndexes: number[];
|
|
103
|
+
}[]>;
|
|
104
|
+
}
|
|
105
|
+
export interface ListConsumerGroupOffsetsOptions {
|
|
106
|
+
groups: (string | GroupWithTopicPartitions)[];
|
|
107
|
+
requireStable?: boolean;
|
|
108
|
+
}
|
|
109
|
+
interface ListConsumerGroupOffsetsPartition {
|
|
110
|
+
partitionIndex: number;
|
|
111
|
+
committedOffset: bigint;
|
|
112
|
+
committedLeaderEpoch: number;
|
|
113
|
+
metadata: NullableString;
|
|
114
|
+
}
|
|
115
|
+
interface ListConsumerGroupOffsetsTopic {
|
|
116
|
+
name: string;
|
|
117
|
+
partitions: ListConsumerGroupOffsetsPartition[];
|
|
118
|
+
}
|
|
119
|
+
export interface ListConsumerGroupOffsetsGroup {
|
|
120
|
+
groupId: string;
|
|
121
|
+
topics: ListConsumerGroupOffsetsTopic[];
|
|
122
|
+
}
|
|
123
|
+
interface PartitionOffset {
|
|
124
|
+
partition: number;
|
|
125
|
+
offset: bigint;
|
|
126
|
+
}
|
|
127
|
+
interface AlterConsumerGroupOffsetsTopic {
|
|
128
|
+
name: string;
|
|
129
|
+
partitionOffsets: PartitionOffset[];
|
|
130
|
+
}
|
|
131
|
+
export interface AlterConsumerGroupOffsetsOptions {
|
|
132
|
+
groupId: string;
|
|
133
|
+
topics: AlterConsumerGroupOffsetsTopic[];
|
|
134
|
+
}
|
|
135
|
+
export interface DeleteConsumerGroupOffsetsOptions {
|
|
136
|
+
groupId: string;
|
|
137
|
+
topics: {
|
|
138
|
+
name: string;
|
|
139
|
+
partitionIndexes: number[];
|
|
140
|
+
}[];
|
|
141
|
+
}
|
|
142
|
+
export interface DescribeConfigsOptions {
|
|
143
|
+
resources: DescribeConfigsRequestResource[];
|
|
144
|
+
includeSynonyms?: boolean;
|
|
145
|
+
includeDocumentation?: boolean;
|
|
146
|
+
}
|
|
147
|
+
export interface ConfigDescription {
|
|
148
|
+
resourceType: ConfigResourceTypeValue;
|
|
149
|
+
resourceName: string;
|
|
150
|
+
configs: DescribeConfigsResponseConfig[];
|
|
151
|
+
}
|
|
152
|
+
export interface AlterConfigsOptions {
|
|
153
|
+
resources: AlterConfigsRequestResource[];
|
|
154
|
+
validateOnly?: boolean;
|
|
155
|
+
}
|
|
156
|
+
export interface IncrementalAlterConfigsOptions {
|
|
157
|
+
resources: IncrementalAlterConfigsRequestResource[];
|
|
158
|
+
validateOnly?: boolean;
|
|
159
|
+
}
|
|
160
|
+
export interface CreateAclsOptions {
|
|
161
|
+
creations: Acl[];
|
|
162
|
+
}
|
|
163
|
+
export interface DescribeAclsOptions {
|
|
164
|
+
filter: AclFilter;
|
|
165
|
+
}
|
|
166
|
+
export interface DeleteAclsOptions {
|
|
167
|
+
filters: AclFilter[];
|
|
168
|
+
}
|
|
169
|
+
export interface PartitionTimestamp {
|
|
170
|
+
partitionIndex: number;
|
|
171
|
+
timestamp: bigint;
|
|
172
|
+
}
|
|
173
|
+
export interface TopicOffsetRequest {
|
|
174
|
+
name: string;
|
|
175
|
+
partitions: PartitionTimestamp[];
|
|
176
|
+
}
|
|
177
|
+
export interface ListOffsetsOptions {
|
|
178
|
+
topics: TopicOffsetRequest[];
|
|
179
|
+
isolationLevel?: Nullable<FetchIsolationLevelValue>;
|
|
180
|
+
}
|
|
181
|
+
export interface ListedOffsetsPartition {
|
|
182
|
+
partitionIndex: number;
|
|
183
|
+
timestamp: bigint;
|
|
184
|
+
offset: bigint;
|
|
185
|
+
leaderEpoch: number;
|
|
186
|
+
}
|
|
187
|
+
export interface ListedOffsetsTopic {
|
|
188
|
+
name: string;
|
|
189
|
+
partitions: ListedOffsetsPartition[];
|
|
190
|
+
}
|
|
89
191
|
export {};
|