/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; export type IncidentTimestampV1 = { /** * When this last occurred, if it did */ lastOccurredAt?: Date | undefined; /** * Name of the lifecycle event */ name: string; }; /** @internal */ export const IncidentTimestampV1$inboundSchema: z.ZodType< IncidentTimestampV1, z.ZodTypeDef, unknown > = z.object({ last_occurred_at: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), name: z.string(), }).transform((v) => { return remap$(v, { "last_occurred_at": "lastOccurredAt", }); }); /** @internal */ export type IncidentTimestampV1$Outbound = { last_occurred_at?: string | undefined; name: string; }; /** @internal */ export const IncidentTimestampV1$outboundSchema: z.ZodType< IncidentTimestampV1$Outbound, z.ZodTypeDef, IncidentTimestampV1 > = z.object({ lastOccurredAt: z.date().transform(v => v.toISOString()).optional(), name: z.string(), }).transform((v) => { return remap$(v, { lastOccurredAt: "last_occurred_at", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncidentTimestampV1$ { /** @deprecated use `IncidentTimestampV1$inboundSchema` instead. */ export const inboundSchema = IncidentTimestampV1$inboundSchema; /** @deprecated use `IncidentTimestampV1$outboundSchema` instead. */ export const outboundSchema = IncidentTimestampV1$outboundSchema; /** @deprecated use `IncidentTimestampV1$Outbound` instead. */ export type Outbound = IncidentTimestampV1$Outbound; }