/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 81f94f065dc1 */ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; import { ApiError, ApiError$zodSchema } from "./apierror.js"; import { DirectionEnum, DirectionEnum$zodSchema } from "./directionenum.js"; import { PeopleListResponse, PeopleListResponse$zodSchema, } from "./peoplelistresponse.js"; import { PersonStatus, PersonStatus$zodSchema } from "./personstatus.js"; export type ListPeopleGlobals = { cloud_name?: string | undefined }; export const ListPeopleGlobals$zodSchema: z.ZodType = z .object({ cloud_name: z.string().describe( "The cloud name of your product environment.", ).optional(), }); /** * Filter by whether the person has been named. Default: all. */ export const NameStatus = { All: "all", Named: "named", Unnamed: "unnamed", } as const; /** * Filter by whether the person has been named. Default: all. */ export type NameStatus = ClosedEnum; export const NameStatus$zodSchema = z.enum([ "all", "named", "unnamed", ]).describe("Filter by whether the person has been named. Default: all."); /** * The field to sort results by. Default: name (ascending). * * @remarks */ export const ListPeopleSortBy = { Name: "name", CreatedAt: "created_at", UpdatedAt: "updated_at", } as const; /** * The field to sort results by. Default: name (ascending). * * @remarks */ export type ListPeopleSortBy = ClosedEnum; export const ListPeopleSortBy$zodSchema = z.enum([ "name", "created_at", "updated_at", ]).describe("The field to sort results by. Default: name (ascending).\n"); export type ListPeopleRequest = { max_results?: number | undefined; next_cursor?: string | undefined; name_status?: NameStatus | undefined; name_prefix?: string | undefined; status?: PersonStatus | undefined; sort_by?: ListPeopleSortBy | undefined; direction?: DirectionEnum | undefined; }; export const ListPeopleRequest$zodSchema: z.ZodType = z .object({ direction: DirectionEnum$zodSchema.optional().describe( "The sort direction for the results. Default is \"desc\".", ), max_results: z.int().default(50).describe( "The maximum number of people to return. Default: 50.", ), name_prefix: z.string().describe( "Filter people whose names start with the given prefix (case insensitive).", ).optional(), name_status: NameStatus$zodSchema.default("all").describe( "Filter by whether the person has been named. Default: all.", ), next_cursor: z.string().describe( "The cursor for pagination. Use the next_cursor value from a previous response to get the next page of results.", ).optional(), sort_by: ListPeopleSortBy$zodSchema.default("name").describe( "The field to sort results by. Default: name (ascending).\n", ), status: PersonStatus$zodSchema.optional().describe( "Filter by person status.", ), }); export type ListPeopleResponse = ApiError | PeopleListResponse; export const ListPeopleResponse$zodSchema: z.ZodType = z .union([ ApiError$zodSchema, PeopleListResponse$zodSchema, ]);