/* * 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 { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Whether the meeting type is currently assignable. `active` types can be assigned to meetings going forward; `inactive` types are no longer assigned going forward but may still appear on historical meetings. * * @remarks */ export const Status = { Active: "active", Inactive: "inactive", } as const; /** * Whether the meeting type is currently assignable. `active` types can be assigned to meetings going forward; `inactive` types are no longer assigned going forward but may still appear on historical meetings. * * @remarks */ export type Status = ClosedEnum; export type MeetingType = { name: string; /** * Whether the meeting type is currently assignable. `active` types can be assigned to meetings going forward; `inactive` types are no longer assigned going forward but may still appear on historical meetings. * * @remarks */ status: Status; createdAt: Date; }; /** @internal */ export const Status$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Status); /** @internal */ export const MeetingType$inboundSchema: z.ZodType< MeetingType, z.ZodTypeDef, unknown > = z.object({ name: z.string(), status: Status$inboundSchema, created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), }).transform((v) => { return remap$(v, { "created_at": "createdAt", }); }); export function meetingTypeFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MeetingType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MeetingType' from JSON`, ); }