@code-pushup/models
Version:
Model definitions and validators for the Code PushUp CLI
102 lines (101 loc) • 4.09 kB
TypeScript
import { z } from 'zod';
export declare const tableAlignmentSchema: z.ZodEnum<{
left: "left";
center: "center";
right: "right";
}>;
/**
* Type Definition: `TableAlignment`
*
* This type is derived from a Zod schema and represents
* the validated structure of `TableAlignment` used within the application.
*
* @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#tablealignment}
*/
export type TableAlignment = z.infer<typeof tableAlignmentSchema>;
export declare const tableColumnPrimitiveSchema: z.ZodEnum<{
left: "left";
center: "center";
right: "right";
}>;
/**
* Type Definition: `TableColumnPrimitive`
*
* This type is derived from a Zod schema and represents
* the validated structure of `TableColumnPrimitive` used within the application.
*
* @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#tablecolumnprimitive}
*/
export type TableColumnPrimitive = z.infer<typeof tableColumnPrimitiveSchema>;
export declare const tableColumnObjectSchema: z.ZodObject<{
key: z.ZodString;
label: z.ZodOptional<z.ZodString>;
align: z.ZodOptional<z.ZodEnum<{
left: "left";
center: "center";
right: "right";
}>>;
}, z.core.$strip>;
/**
* Type Definition: `TableColumnObject`
*
* This type is derived from a Zod schema and represents
* the validated structure of `TableColumnObject` used within the application.
*
* @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#tablecolumnobject}
*/
export type TableColumnObject = z.infer<typeof tableColumnObjectSchema>;
export declare const tableRowObjectSchema: z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
/**
* Type Definition: `TableRowObject`
*
* This type is derived from a Zod schema and represents
* the validated structure of `TableRowObject` used within the application.
*
* @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#tablerowobject}
*/
export type TableRowObject = z.infer<typeof tableRowObjectSchema>;
export declare const tableRowPrimitiveSchema: z.ZodArray<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
/**
* Type Definition: `TableRowPrimitive`
*
* This type is derived from a Zod schema and represents
* the validated structure of `TableRowPrimitive` used within the application.
*
* @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#tablerowprimitive}
*/
export type TableRowPrimitive = z.infer<typeof tableRowPrimitiveSchema>;
export declare const tableSchema: (description?: string) => z.ZodUnion<readonly [z.ZodObject<{
title: z.ZodOptional<z.ZodString>;
columns: z.ZodOptional<z.ZodArray<z.ZodEnum<{
left: "left";
center: "center";
right: "right";
}>>>;
rows: z.ZodArray<z.ZodArray<z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>>;
}, z.core.$strip>, z.ZodObject<{
title: z.ZodOptional<z.ZodString>;
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodEnum<{
left: "left";
center: "center";
right: "right";
}>>, z.ZodArray<z.ZodObject<{
key: z.ZodString;
label: z.ZodOptional<z.ZodString>;
align: z.ZodOptional<z.ZodEnum<{
left: "left";
center: "center";
right: "right";
}>>;
}, z.core.$strip>>]>>;
rows: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodDefault<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>>;
}, z.core.$strip>]>;
/**
* Type Definition: `Table`
*
* This type is derived from a Zod schema and represents
* the validated structure of `Table` used within the application.
*
* @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#table}
*/
export type Table = z.infer<ReturnType<typeof tableSchema>>;