/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ZLint = { /** * Whether the certificate's attributes triggered any error lints for non-conformance to the X.509 standard. */ errorsPresent?: boolean | undefined; /** * A list of lint names which failed, if applicable. */ failedLints?: Array | null | undefined; /** * Whether the certificate's attributes triggered any fatal lints for non-conformance to the X.509 standard. */ fatalsPresent?: boolean | undefined; /** * Whether the certificate's attributes triggered any notice lints for non-conformance to the X.509 standard. */ noticesPresent?: boolean | undefined; /** * An RFC-3339-formated timestamp indicating when the certificate was linted. */ timestamp?: string | undefined; /** * The version of Zlint used to lint the certificate. */ version?: number | undefined; /** * Whether the certificate's attributes triggered any warning lints for non-conformance to the X.509 standard. */ warningsPresent?: boolean | undefined; }; /** @internal */ export const ZLint$inboundSchema: z.ZodType = z .object({ errors_present: z.boolean().optional(), failed_lints: z.nullable(z.array(z.string())).optional(), fatals_present: z.boolean().optional(), notices_present: z.boolean().optional(), timestamp: z.string().optional(), version: z.number().int().optional(), warnings_present: z.boolean().optional(), }).transform((v) => { return remap$(v, { "errors_present": "errorsPresent", "failed_lints": "failedLints", "fatals_present": "fatalsPresent", "notices_present": "noticesPresent", "warnings_present": "warningsPresent", }); }); export function zLintFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ZLint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ZLint' from JSON`, ); }