/* * 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$ } from "../../lib/schemas.js"; import { Address, Address$Outbound, Address$outboundSchema, } from "./address.js"; import { Email, Email$Outbound, Email$outboundSchema } from "./email.js"; import { PassThroughBody, PassThroughBody$Outbound, PassThroughBody$outboundSchema, } from "./passthroughbody.js"; import { PhoneNumber, PhoneNumber$Outbound, PhoneNumber$outboundSchema, } from "./phonenumber.js"; export type UserInput = { /** * The parent user id */ parentId?: string | null | undefined; /** * The username of the user */ username?: string | null | undefined; /** * The name of the resource. */ name?: string | null | undefined; /** * The first name of the person. */ firstName?: string | null | undefined; /** * The last name of the person. */ lastName?: string | null | undefined; /** * The job title of the person. */ title?: string | null | undefined; /** * The division the person is currently in. Usually a collection of departments or teams or regions. */ division?: string | null | undefined; /** * The department the person is currently in. [Deprecated](https://developers.apideck.com/changelog) in favor of the dedicated department_id and department_name field. * * @deprecated field: Deprecated. Use department_id instead.. */ department?: string | null | undefined; /** * The name of the company. */ companyName?: string | null | undefined; /** * An Employee Number, Employee ID or Employee Code, is a unique number that has been assigned to each individual staff member within a company. */ employeeNumber?: string | null | undefined; /** * A description of the object. */ description?: string | null | undefined; /** * The URL of the user's avatar */ image?: string | null | undefined; /** * language code according to ISO 639-1. For the United States - EN */ language?: string | null | undefined; /** * The status of the user */ status?: string | null | undefined; /** * The password of the user */ password?: string | null | undefined; addresses?: Array
| undefined; phoneNumbers?: Array | undefined; emails: Array; /** * The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources. */ passThrough?: Array | undefined; }; /** @internal */ export type UserInput$Outbound = { parent_id?: string | null | undefined; username?: string | null | undefined; name?: string | null | undefined; first_name?: string | null | undefined; last_name?: string | null | undefined; title?: string | null | undefined; division?: string | null | undefined; department?: string | null | undefined; company_name?: string | null | undefined; employee_number?: string | null | undefined; description?: string | null | undefined; image?: string | null | undefined; language?: string | null | undefined; status?: string | null | undefined; password?: string | null | undefined; addresses?: Array | undefined; phone_numbers?: Array | undefined; emails: Array; pass_through?: Array | undefined; }; /** @internal */ export const UserInput$outboundSchema: z.ZodType< UserInput$Outbound, z.ZodTypeDef, UserInput > = /* @__PURE__ */ lazySchema$(() => z.object({ parentId: z.nullable(z.string()).optional(), username: z.nullable(z.string()).optional(), name: z.nullable(z.string()).optional(), firstName: z.nullable(z.string()).optional(), lastName: z.nullable(z.string()).optional(), title: z.nullable(z.string()).optional(), division: z.nullable(z.string()).optional(), department: z.nullable(z.string()).optional(), companyName: z.nullable(z.string()).optional(), employeeNumber: z.nullable(z.string()).optional(), description: z.nullable(z.string()).optional(), image: z.nullable(z.string()).optional(), language: z.nullable(z.string()).optional(), status: z.nullable(z.string()).optional(), password: z.nullable(z.string()).optional(), addresses: z.array(Address$outboundSchema).optional(), phoneNumbers: z.array(PhoneNumber$outboundSchema).optional(), emails: z.array(Email$outboundSchema), passThrough: z.array(PassThroughBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { parentId: "parent_id", firstName: "first_name", lastName: "last_name", companyName: "company_name", employeeNumber: "employee_number", phoneNumbers: "phone_numbers", passThrough: "pass_through", }); }) ); export function userInputToJSON(userInput: UserInput): string { return JSON.stringify(UserInput$outboundSchema.parse(userInput)); }