/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { UserV1, UserV1$inboundSchema, UserV1$Outbound, UserV1$outboundSchema, } from "./userv1.js"; export type IncidentMembership = { /** * When the membership was created */ createdAt: Date; /** * Unique identifier of this incident membership */ id: string; /** * Unique identifier of the incident */ incidentId: string; /** * When the membership was last updated */ updatedAt: Date; user: UserV1; }; /** @internal */ export const IncidentMembership$inboundSchema: z.ZodType< IncidentMembership, z.ZodTypeDef, unknown > = z.object({ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), id: z.string(), incident_id: z.string(), updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), user: UserV1$inboundSchema, }).transform((v) => { return remap$(v, { "created_at": "createdAt", "incident_id": "incidentId", "updated_at": "updatedAt", }); }); /** @internal */ export type IncidentMembership$Outbound = { created_at: string; id: string; incident_id: string; updated_at: string; user: UserV1$Outbound; }; /** @internal */ export const IncidentMembership$outboundSchema: z.ZodType< IncidentMembership$Outbound, z.ZodTypeDef, IncidentMembership > = z.object({ createdAt: z.date().transform(v => v.toISOString()), id: z.string(), incidentId: z.string(), updatedAt: z.date().transform(v => v.toISOString()), user: UserV1$outboundSchema, }).transform((v) => { return remap$(v, { createdAt: "created_at", incidentId: "incident_id", updatedAt: "updated_at", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace IncidentMembership$ { /** @deprecated use `IncidentMembership$inboundSchema` instead. */ export const inboundSchema = IncidentMembership$inboundSchema; /** @deprecated use `IncidentMembership$outboundSchema` instead. */ export const outboundSchema = IncidentMembership$outboundSchema; /** @deprecated use `IncidentMembership$Outbound` instead. */ export type Outbound = IncidentMembership$Outbound; }