UNPKG

@code-pushup/models

Version:

Model definitions and validators for the Code PushUp CLI

204 lines (203 loc) 9.25 kB
import { z } from 'zod'; export declare const auditValueSchema: z.ZodNumber; export declare const auditDisplayValueSchema: z.ZodOptional<z.ZodString>; export declare const auditDetailsSchema: z.ZodObject<{ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{ message: z.ZodString; severity: z.ZodEnum<{ error: "error"; info: "info"; warning: "warning"; }>; source: z.ZodOptional<z.ZodObject<{ file: z.ZodString; position: z.ZodOptional<z.ZodObject<{ startLine: z.ZodNumber; startColumn: z.ZodOptional<z.ZodNumber>; endLine: z.ZodOptional<z.ZodNumber>; endColumn: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; table: z.ZodOptional<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>]>>; trees: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ title: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodLiteral<"basic">>; root: z.ZodType<import("./tree.js").BasicTreeNode, unknown, z.core.$ZodTypeInternals<import("./tree.js").BasicTreeNode, unknown>>; }, z.core.$strip>, z.ZodObject<{ title: z.ZodOptional<z.ZodString>; type: z.ZodLiteral<"coverage">; root: z.ZodType<import("./tree.js").CoverageTreeNode, unknown, z.core.$ZodTypeInternals<import("./tree.js").CoverageTreeNode, unknown>>; }, z.core.$strip>]>>>; }, z.core.$strip>; /** * Type Definition: `AuditDetails` * * This type is derived from a Zod schema and represents * the validated structure of `AuditDetails` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#auditdetails} */ export type AuditDetails = z.infer<typeof auditDetailsSchema>; export declare const auditOutputSchema: z.ZodObject<{ slug: z.ZodString; displayValue: z.ZodOptional<z.ZodString>; value: z.ZodNumber; score: z.ZodNumber; scoreTarget: z.ZodOptional<z.ZodNumber>; details: z.ZodOptional<z.ZodObject<{ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{ message: z.ZodString; severity: z.ZodEnum<{ error: "error"; info: "info"; warning: "warning"; }>; source: z.ZodOptional<z.ZodObject<{ file: z.ZodString; position: z.ZodOptional<z.ZodObject<{ startLine: z.ZodNumber; startColumn: z.ZodOptional<z.ZodNumber>; endLine: z.ZodOptional<z.ZodNumber>; endColumn: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; table: z.ZodOptional<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>]>>; trees: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ title: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodLiteral<"basic">>; root: z.ZodType<import("./tree.js").BasicTreeNode, unknown, z.core.$ZodTypeInternals<import("./tree.js").BasicTreeNode, unknown>>; }, z.core.$strip>, z.ZodObject<{ title: z.ZodOptional<z.ZodString>; type: z.ZodLiteral<"coverage">; root: z.ZodType<import("./tree.js").CoverageTreeNode, unknown, z.core.$ZodTypeInternals<import("./tree.js").CoverageTreeNode, unknown>>; }, z.core.$strip>]>>>; }, z.core.$strip>>; }, z.core.$strip>; /** * Type Definition: `AuditOutput` * * This type is derived from a Zod schema and represents * the validated structure of `AuditOutput` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#auditoutput} */ export type AuditOutput = z.infer<typeof auditOutputSchema>; export declare const auditOutputsSchema: z.ZodArray<z.ZodObject<{ slug: z.ZodString; displayValue: z.ZodOptional<z.ZodString>; value: z.ZodNumber; score: z.ZodNumber; scoreTarget: z.ZodOptional<z.ZodNumber>; details: z.ZodOptional<z.ZodObject<{ issues: z.ZodOptional<z.ZodArray<z.ZodObject<{ message: z.ZodString; severity: z.ZodEnum<{ error: "error"; info: "info"; warning: "warning"; }>; source: z.ZodOptional<z.ZodObject<{ file: z.ZodString; position: z.ZodOptional<z.ZodObject<{ startLine: z.ZodNumber; startColumn: z.ZodOptional<z.ZodNumber>; endLine: z.ZodOptional<z.ZodNumber>; endColumn: z.ZodOptional<z.ZodNumber>; }, z.core.$strip>>; }, z.core.$strip>>; }, z.core.$strip>>>; table: z.ZodOptional<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>]>>; trees: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{ title: z.ZodOptional<z.ZodString>; type: z.ZodOptional<z.ZodLiteral<"basic">>; root: z.ZodType<import("./tree.js").BasicTreeNode, unknown, z.core.$ZodTypeInternals<import("./tree.js").BasicTreeNode, unknown>>; }, z.core.$strip>, z.ZodObject<{ title: z.ZodOptional<z.ZodString>; type: z.ZodLiteral<"coverage">; root: z.ZodType<import("./tree.js").CoverageTreeNode, unknown, z.core.$ZodTypeInternals<import("./tree.js").CoverageTreeNode, unknown>>; }, z.core.$strip>]>>>; }, z.core.$strip>>; }, z.core.$strip>>; /** * Type Definition: `AuditOutputs` * * This type is derived from a Zod schema and represents * the validated structure of `AuditOutputs` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#auditoutputs} */ export type AuditOutputs = z.infer<typeof auditOutputsSchema>;