@vzeta/camunda-api-zod-schemas
Version:
Zod schemas and TypeScript types for Camunda 8 unified API
79 lines (78 loc) • 2.67 kB
TypeScript
import { z } from 'zod';
import { Endpoint } from './common';
declare const partitionRoleSchema: z.ZodEnum<{
leader: "leader";
follower: "follower";
inactive: "inactive";
}>;
type PartitionRole = z.infer<typeof partitionRoleSchema>;
declare const partitionHealthSchema: z.ZodEnum<{
healthy: "healthy";
unhealthy: "unhealthy";
dead: "dead";
}>;
type PartitionHealth = z.infer<typeof partitionHealthSchema>;
declare const partitionSchema: z.ZodObject<{
partitionId: z.ZodNumber;
role: z.ZodEnum<{
leader: "leader";
follower: "follower";
inactive: "inactive";
}>;
health: z.ZodEnum<{
healthy: "healthy";
unhealthy: "unhealthy";
dead: "dead";
}>;
}, z.core.$strip>;
type Partition = z.infer<typeof partitionSchema>;
declare const brokerInfoSchema: z.ZodObject<{
nodeId: z.ZodNumber;
host: z.ZodString;
port: z.ZodNumber;
partitions: z.ZodArray<z.ZodObject<{
partitionId: z.ZodNumber;
role: z.ZodEnum<{
leader: "leader";
follower: "follower";
inactive: "inactive";
}>;
health: z.ZodEnum<{
healthy: "healthy";
unhealthy: "unhealthy";
dead: "dead";
}>;
}, z.core.$strip>>;
version: z.ZodString;
}, z.core.$strip>;
type BrokerInfo = z.infer<typeof brokerInfoSchema>;
declare const getTopologyResponseBodySchema: z.ZodObject<{
brokers: z.ZodNullable<z.ZodArray<z.ZodObject<{
nodeId: z.ZodNumber;
host: z.ZodString;
port: z.ZodNumber;
partitions: z.ZodArray<z.ZodObject<{
partitionId: z.ZodNumber;
role: z.ZodEnum<{
leader: "leader";
follower: "follower";
inactive: "inactive";
}>;
health: z.ZodEnum<{
healthy: "healthy";
unhealthy: "unhealthy";
dead: "dead";
}>;
}, z.core.$strip>>;
version: z.ZodString;
}, z.core.$strip>>>;
clusterSize: z.ZodNullable<z.ZodNumber>;
partitionsCount: z.ZodNullable<z.ZodNumber>;
replicationFactor: z.ZodNullable<z.ZodNumber>;
gatewayVersion: z.ZodNullable<z.ZodString>;
lastCompletedChangeId: z.ZodNullable<z.ZodString>;
}, z.core.$strip>;
type GetTopologyResponseBody = z.infer<typeof getTopologyResponseBodySchema>;
declare const getTopology: Endpoint;
export { partitionRoleSchema, partitionHealthSchema, partitionSchema, brokerInfoSchema, getTopologyResponseBodySchema, getTopology, };
export type { PartitionRole, PartitionHealth, Partition, BrokerInfo, GetTopologyResponseBody };