UNPKG

@code-pushup/models

Version:

Model definitions and validators for the Code PushUp CLI

255 lines (254 loc) 10.1 kB
import { z } from 'zod'; export declare const categoryDiffSchema: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; scores: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>; export declare const groupDiffSchema: z.ZodObject<{ scores: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; }, z.core.$strip>; export declare const auditDiffSchema: z.ZodObject<{ scores: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; values: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; displayValues: z.ZodObject<{ before: z.ZodOptional<z.ZodString>; after: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>; export declare const categoryResultSchema: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; score: z.ZodNumber; }, z.core.$strip>; export declare const groupResultSchema: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; score: z.ZodNumber; }, z.core.$strip>; export declare const auditResultSchema: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; value: z.ZodNumber; displayValue: z.ZodOptional<z.ZodString>; score: z.ZodNumber; }, z.core.$strip>; export type CategoryDiff = z.infer<typeof categoryDiffSchema>; export type GroupDiff = z.infer<typeof groupDiffSchema>; export type AuditDiff = z.infer<typeof auditDiffSchema>; export type CategoryResult = z.infer<typeof categoryResultSchema>; export type GroupResult = z.infer<typeof groupResultSchema>; export type AuditResult = z.infer<typeof auditResultSchema>; export declare const reportsDiffSchema: z.ZodObject<{ commits: z.ZodNullable<z.ZodObject<{ before: z.ZodObject<{ hash: z.ZodString; message: z.ZodString; date: z.ZodCoercedDate<unknown>; author: z.ZodString; }, z.core.$strip>; after: z.ZodObject<{ hash: z.ZodString; message: z.ZodString; date: z.ZodCoercedDate<unknown>; author: z.ZodString; }, z.core.$strip>; }, z.core.$strip>>; portalUrl: z.ZodOptional<z.ZodString>; label: z.ZodOptional<z.ZodString>; categories: z.ZodObject<{ changed: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; scores: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; }, z.core.$strip>>; unchanged: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; score: z.ZodNumber; }, z.core.$strip>>; added: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; score: z.ZodNumber; }, z.core.$strip>>; removed: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; score: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>; groups: z.ZodObject<{ changed: z.ZodArray<z.ZodObject<{ scores: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; }, z.core.$strip>>; unchanged: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; score: z.ZodNumber; }, z.core.$strip>>; added: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; score: z.ZodNumber; }, z.core.$strip>>; removed: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; score: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>; audits: z.ZodObject<{ changed: z.ZodArray<z.ZodObject<{ scores: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; values: z.ZodObject<{ before: z.ZodNumber; after: z.ZodNumber; diff: z.ZodNumber; }, z.core.$strip>; displayValues: z.ZodObject<{ before: z.ZodOptional<z.ZodString>; after: z.ZodOptional<z.ZodString>; }, z.core.$strip>; }, z.core.$strip>>; unchanged: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; value: z.ZodNumber; displayValue: z.ZodOptional<z.ZodString>; score: z.ZodNumber; }, z.core.$strip>>; added: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; value: z.ZodNumber; displayValue: z.ZodOptional<z.ZodString>; score: z.ZodNumber; }, z.core.$strip>>; removed: z.ZodArray<z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; plugin: z.ZodObject<{ slug: z.ZodString; title: z.ZodString; docsUrl: z.ZodCatch<z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>>; }, z.core.$strip>; value: z.ZodNumber; displayValue: z.ZodOptional<z.ZodString>; score: z.ZodNumber; }, z.core.$strip>>; }, z.core.$strip>; packageName: z.ZodString; version: z.ZodString; date: z.ZodString; duration: z.ZodNumber; }, z.core.$strip>; export type ReportsDiff = z.infer<typeof reportsDiffSchema>;