/* * 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 CtRecord = { /** * An RFC-3339-formatted timestamp indicating when the certificate was entered into the CT log. */ addedToCtAt?: string | undefined; /** * An RFC-3339-formated timestamp indicating when the certificate was ingested from the CT log into the Censys dataset. */ ctToCensysAt?: string | undefined; /** * Numerical marker of the certificate's place in the CT log. */ index?: number | undefined; }; /** @internal */ export const CtRecord$inboundSchema: z.ZodType< CtRecord, z.ZodTypeDef, unknown > = z.object({ added_to_ct_at: z.string().optional(), ct_to_censys_at: z.string().optional(), index: z.number().int().optional(), }).transform((v) => { return remap$(v, { "added_to_ct_at": "addedToCtAt", "ct_to_censys_at": "ctToCensysAt", }); }); export function ctRecordFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CtRecord$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CtRecord' from JSON`, ); }