/* * 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 { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Status of the attendee */ export const ActivityAttendeeStatus = { Accepted: "accepted", Tentative: "tentative", Declined: "declined", } as const; /** * Status of the attendee */ export type ActivityAttendeeStatus = OpenEnum; export type ActivityAttendee = { /** * Unique identifier for the attendee */ id?: string | null | undefined; /** * Full name of the attendee */ name?: string | null | undefined; /** * First name of the attendee */ firstName?: string | null | undefined; /** * Middle name of the attendee */ middleName?: string | null | undefined; /** * Last name of the attendee */ lastName?: string | null | undefined; /** * Prefix of the attendee */ prefix?: string | null | undefined; /** * Suffix of the attendee */ suffix?: string | null | undefined; /** * Email address of the attendee */ emailAddress?: string | null | undefined; /** * Whether the attendee is the organizer of the activity */ isOrganizer?: boolean | null | undefined; /** * Status of the attendee */ status?: ActivityAttendeeStatus | null | undefined; /** * The identifier for a related user */ userId?: string | null | undefined; /** * The identifier for a related contact */ contactId?: string | null | undefined; /** * The last time the attendee was updated (ISO 8601) */ updatedAt?: Date | null | undefined; /** * The time the attendee was created (ISO 8601) */ createdAt?: Date | null | undefined; }; export type ActivityAttendeeInput = { /** * Full name of the attendee */ name?: string | null | undefined; /** * First name of the attendee */ firstName?: string | null | undefined; /** * Middle name of the attendee */ middleName?: string | null | undefined; /** * Last name of the attendee */ lastName?: string | null | undefined; /** * Prefix of the attendee */ prefix?: string | null | undefined; /** * Suffix of the attendee */ suffix?: string | null | undefined; /** * Email address of the attendee */ emailAddress?: string | null | undefined; /** * Whether the attendee is the organizer of the activity */ isOrganizer?: boolean | null | undefined; /** * Status of the attendee */ status?: ActivityAttendeeStatus | null | undefined; }; /** @internal */ export const ActivityAttendeeStatus$inboundSchema: z.ZodType< ActivityAttendeeStatus, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => openEnums.inboundSchema(ActivityAttendeeStatus) ); /** @internal */ export const ActivityAttendeeStatus$outboundSchema: z.ZodType< string, z.ZodTypeDef, ActivityAttendeeStatus > = /* @__PURE__ */ lazySchema$(() => openEnums.outboundSchema(ActivityAttendeeStatus) ); /** @internal */ export const ActivityAttendee$inboundSchema: z.ZodType< ActivityAttendee, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ id: z.nullable(types.string()).optional(), name: z.nullable(types.string()).optional(), first_name: z.nullable(types.string()).optional(), middle_name: z.nullable(types.string()).optional(), last_name: z.nullable(types.string()).optional(), prefix: z.nullable(types.string()).optional(), suffix: z.nullable(types.string()).optional(), email_address: z.nullable(types.string()).optional(), is_organizer: z.nullable(types.boolean()).optional(), status: z.nullable(ActivityAttendeeStatus$inboundSchema).optional(), user_id: z.nullable(types.string()).optional(), contact_id: z.nullable(types.string()).optional(), updated_at: z.nullable(types.date()).optional(), created_at: z.nullable(types.date()).optional(), }).transform((v) => { return remap$(v, { "first_name": "firstName", "middle_name": "middleName", "last_name": "lastName", "email_address": "emailAddress", "is_organizer": "isOrganizer", "user_id": "userId", "contact_id": "contactId", "updated_at": "updatedAt", "created_at": "createdAt", }); }) ); export function activityAttendeeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ActivityAttendee$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActivityAttendee' from JSON`, ); } /** @internal */ export type ActivityAttendeeInput$Outbound = { name?: string | null | undefined; first_name?: string | null | undefined; middle_name?: string | null | undefined; last_name?: string | null | undefined; prefix?: string | null | undefined; suffix?: string | null | undefined; email_address?: string | null | undefined; is_organizer?: boolean | null | undefined; status?: string | null | undefined; }; /** @internal */ export const ActivityAttendeeInput$outboundSchema: z.ZodType< ActivityAttendeeInput$Outbound, z.ZodTypeDef, ActivityAttendeeInput > = /* @__PURE__ */ lazySchema$(() => z.object({ name: z.nullable(z.string()).optional(), firstName: z.nullable(z.string()).optional(), middleName: z.nullable(z.string()).optional(), lastName: z.nullable(z.string()).optional(), prefix: z.nullable(z.string()).optional(), suffix: z.nullable(z.string()).optional(), emailAddress: z.nullable(z.string()).optional(), isOrganizer: z.nullable(z.boolean()).optional(), status: z.nullable(ActivityAttendeeStatus$outboundSchema).optional(), }).transform((v) => { return remap$(v, { firstName: "first_name", middleName: "middle_name", lastName: "last_name", emailAddress: "email_address", isOrganizer: "is_organizer", }); }) ); export function activityAttendeeInputToJSON( activityAttendeeInput: ActivityAttendeeInput, ): string { return JSON.stringify( ActivityAttendeeInput$outboundSchema.parse(activityAttendeeInput), ); }