ddnet
Version:
A typescript npm package for interacting with data from ddnet.org
43 lines (42 loc) • 1.36 kB
TypeScript
import { z } from 'zod';
/**
* The zod schema for server status data.
*
* @see
* https://ddnet.org/status/json/stats.json
*
* @remarks
* I'm not sure where the code reponsible for these types lives, so I simply analyzed the output to create the schema.
*
* @internal
*/
export declare const _Schema_status: z.ZodObject<{
servers: z.ZodArray<z.ZodObject<{
name: z.ZodString;
type: z.ZodString;
host: z.ZodString;
location: z.ZodString;
online4: z.ZodBoolean;
online6: z.ZodBoolean;
uptime: z.ZodOptional<z.ZodString>;
load: z.ZodOptional<z.ZodNumber>;
network_rx: z.ZodOptional<z.ZodNumber>;
network_tx: z.ZodOptional<z.ZodNumber>;
packets_rx: z.ZodOptional<z.ZodNumber>;
packets_tx: z.ZodOptional<z.ZodNumber>;
cpu: z.ZodOptional<z.ZodNumber>;
memory_total: z.ZodOptional<z.ZodNumber>;
memory_used: z.ZodOptional<z.ZodNumber>;
swap_total: z.ZodOptional<z.ZodNumber>;
swap_used: z.ZodOptional<z.ZodNumber>;
hdd_total: z.ZodOptional<z.ZodNumber>;
hdd_used: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>>;
updated: z.ZodString;
}, z.core.$strip>;
/**
* Releases data type, inferred from {@link _Schema_status}
*
* @internal
*/
export type _ServerStatus = z.infer<typeof _Schema_status>;