/* * 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 IncidentTimestampValuePayloadV2 = { /** * The id of the incident timestamp that this incident timestamp value is associated with. */ incidentTimestampId: string; /** * The current value of this timestamp, for this incident */ value?: Date | undefined; }; /** @internal */ export const IncidentTimestampValuePayloadV2$inboundSchema: z.ZodType< IncidentTimestampValuePayloadV2, z.ZodTypeDef, unknown > = z.object({ incident_timestamp_id: z.string(), value: z.string().datetime({ offset: true }).transform(v => new Date(v)) .optional(), }).transform((v) => { return remap$(v, { "incident_timestamp_id": "incidentTimestampId", }); }); /** @internal */ export type IncidentTimestampValuePayloadV2$Outbound = { incident_timestamp_id: string; value?: string | undefined; }; /** @internal */ export const IncidentTimestampValuePayloadV2$outboundSchema: z.ZodType< IncidentTimestampValuePayloadV2$Outbound, z.ZodTypeDef, IncidentTimestampValuePayloadV2 > = z.object({ incidentTimestampId: z.string(), value: z.date().transform(v => v.toISOString()).optional(), }).transform((v) => { return remap$(v, { incidentTimestampId: "incident_timestamp_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncidentTimestampValuePayloadV2$ { /** @deprecated use `IncidentTimestampValuePayloadV2$inboundSchema` instead. */ export const inboundSchema = IncidentTimestampValuePayloadV2$inboundSchema; /** @deprecated use `IncidentTimestampValuePayloadV2$outboundSchema` instead. */ export const outboundSchema = IncidentTimestampValuePayloadV2$outboundSchema; /** @deprecated use `IncidentTimestampValuePayloadV2$Outbound` instead. */ export type Outbound = IncidentTimestampValuePayloadV2$Outbound; }