UNPKG

@code-pushup/models

Version:

Model definitions and validators for the Code PushUp CLI

311 lines (310 loc) 12.2 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>; /** * Type Definition: `CategoryDiff` * * This type is derived from a Zod schema and represents * the validated structure of `CategoryDiff` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#categorydiff} */ export type CategoryDiff = z.infer<typeof categoryDiffSchema>; /** * Type Definition: `GroupDiff` * * This type is derived from a Zod schema and represents * the validated structure of `GroupDiff` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#groupdiff} */ export type GroupDiff = z.infer<typeof groupDiffSchema>; /** * Type Definition: `AuditDiff` * * This type is derived from a Zod schema and represents * the validated structure of `AuditDiff` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#auditdiff} */ export type AuditDiff = z.infer<typeof auditDiffSchema>; /** * Type Definition: `CategoryResult` * * This type is derived from a Zod schema and represents * the validated structure of `CategoryResult` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#categoryresult} */ export type CategoryResult = z.infer<typeof categoryResultSchema>; /** * Type Definition: `GroupResult` * * This type is derived from a Zod schema and represents * the validated structure of `GroupResult` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#groupresult} */ export type GroupResult = z.infer<typeof groupResultSchema>; /** * Type Definition: `AuditResult` * * This type is derived from a Zod schema and represents * the validated structure of `AuditResult` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#auditresult} */ 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>; /** * Type Definition: `ReportsDiff` * * This type is derived from a Zod schema and represents * the validated structure of `ReportsDiff` used within the application. * * @see {@link https://github.com/code-pushup/cli/blob/main/packages/models/docs/models-reference.md#reportsdiff} */ export type ReportsDiff = z.infer<typeof reportsDiffSchema>;