/* * 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 { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type OrganizationPreferences = { /** * Whether the organization has opted into AI features. */ aiOptIn?: boolean | undefined; /** * Whether the organization has opted into AI training. */ aiTraining?: boolean | undefined; /** * Whether the organization has opted into multi-factor authentication. */ mfaRequired?: boolean | undefined; }; /** @internal */ export const OrganizationPreferences$inboundSchema: z.ZodType< OrganizationPreferences, z.ZodTypeDef, unknown > = z.object({ ai_opt_in: z.boolean().optional(), ai_training: z.boolean().optional(), mfa_required: z.boolean().optional(), }).transform((v) => { return remap$(v, { "ai_opt_in": "aiOptIn", "ai_training": "aiTraining", "mfa_required": "mfaRequired", }); }); export function organizationPreferencesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => OrganizationPreferences$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OrganizationPreferences' from JSON`, ); }