@code-pushup/models
Version:
Model definitions and validators for the Code PushUp CLI
180 lines (179 loc) • 8.37 kB
TypeScript
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>;
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>;
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>>;
export type AuditOutputs = z.infer<typeof auditOutputsSchema>;