/* * 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 { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListMember = { /** * The unique identifier of the record that belongs to the List, as returned by the downstream connector. */ id: string; /** * The type of CRM record this member is. Normalized to a lowercase plural noun for the vendor's standard object types (e.g. contacts, companies, opportunities, leads, tickets, campaigns, tasks, events); for vendor-specific or custom object types the raw downstream identifier is passed through unchanged, mirroring the semantics of `List.object_type`. This field is intentionally open-ended — no closed enum is enforced. */ objectType?: string | null | undefined; }; /** @internal */ export const ListMember$inboundSchema: z.ZodType< ListMember, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ id: types.string(), object_type: z.nullable(types.string()).optional(), }).transform((v) => { return remap$(v, { "object_type": "objectType", }); }) ); export function listMemberFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListMember$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListMember' from JSON`, ); }