/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a89ccdd4324c */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; export const PeopleRequestIncludeField = { Badges: "BADGES", BusyEvents: "BUSY_EVENTS", DocumentActivity: "DOCUMENT_ACTIVITY", InviteInfo: "INVITE_INFO", PeopleDistance: "PEOPLE_DISTANCE", Permissions: "PERMISSIONS", PeopleDetails: "PEOPLE_DETAILS", ManagementDetails: "MANAGEMENT_DETAILS", PeopleProfileSettings: "PEOPLE_PROFILE_SETTINGS", PeopleWithoutManager: "PEOPLE_WITHOUT_MANAGER", } as const; export type PeopleRequestIncludeField = ClosedEnum< typeof PeopleRequestIncludeField >; export const IncludeType = { PeopleWithoutManager: "PEOPLE_WITHOUT_MANAGER", InvalidEntities: "INVALID_ENTITIES", } as const; export type IncludeType = ClosedEnum; export type PeopleRequest = { /** * The offset of the client's timezone in minutes from UTC. e.g. PDT is -420 because it's 7 hours behind UTC. */ timezoneOffset?: number | undefined; /** * The Person IDs to retrieve. If no IDs are requested, the current user's details are returned. */ obfuscatedIds?: Array | undefined; /** * The email IDs to retrieve. The result is the deduplicated union of emailIds and obfuscatedIds. */ emailIds?: Array | undefined; /** * List of PersonMetadata fields to return (that aren't returned by default) */ includeFields?: Array | undefined; /** * The types of people entities to include in the response in addition to those returned by default. */ includeTypes?: Array | undefined; /** * A string denoting the search surface from which the endpoint is called. */ source?: string | undefined; }; /** @internal */ export const PeopleRequestIncludeField$outboundSchema: z.ZodNativeEnum< typeof PeopleRequestIncludeField > = z.nativeEnum(PeopleRequestIncludeField); /** @internal */ export const IncludeType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(IncludeType); /** @internal */ export type PeopleRequest$Outbound = { timezoneOffset?: number | undefined; obfuscatedIds?: Array | undefined; emailIds?: Array | undefined; includeFields?: Array | undefined; includeTypes?: Array | undefined; source?: string | undefined; }; /** @internal */ export const PeopleRequest$outboundSchema: z.ZodType< PeopleRequest$Outbound, z.ZodTypeDef, PeopleRequest > = z.object({ timezoneOffset: z.number().int().optional(), obfuscatedIds: z.array(z.string()).optional(), emailIds: z.array(z.string()).optional(), includeFields: z.array(PeopleRequestIncludeField$outboundSchema).optional(), includeTypes: z.array(IncludeType$outboundSchema).optional(), source: z.string().optional(), }); export function peopleRequestToJSON(peopleRequest: PeopleRequest): string { return JSON.stringify(PeopleRequest$outboundSchema.parse(peopleRequest)); }