/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: c0cb101cddca */ import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; import { FacetFilter, FacetFilter$Outbound, FacetFilter$outboundSchema, } from "./facetfilter.js"; import { SortOptions, SortOptions$Outbound, SortOptions$outboundSchema, } from "./sortoptions.js"; export const ListShortcutsPaginatedRequestIncludeField = { Facets: "FACETS", PeopleDetails: "PEOPLE_DETAILS", } as const; export type ListShortcutsPaginatedRequestIncludeField = ClosedEnum< typeof ListShortcutsPaginatedRequestIncludeField >; export type ListShortcutsPaginatedRequest = { /** * Array of fields/data to be included in response that are not included by default */ includeFields?: Array | undefined; pageSize: number; /** * A token specifying the position in the overall results to start at. Received from the endpoint and iterated back. Currently being used as page no (as we implement offset pagination) */ cursor?: string | undefined; /** * A list of filters for the query. An AND is assumed between different filters. We support filters on Go Link name, author, department and type. */ filters?: Array | undefined; sort?: SortOptions | undefined; /** * Search query that should be a substring in atleast one of the fields (alias , inputAlias, destinationUrl, description). Empty query does not filter shortcuts. */ query?: string | undefined; }; /** @internal */ export const ListShortcutsPaginatedRequestIncludeField$outboundSchema: z.ZodNativeEnum = z .nativeEnum(ListShortcutsPaginatedRequestIncludeField); /** @internal */ export type ListShortcutsPaginatedRequest$Outbound = { includeFields?: Array | undefined; pageSize: number; cursor?: string | undefined; filters?: Array | undefined; sort?: SortOptions$Outbound | undefined; query?: string | undefined; }; /** @internal */ export const ListShortcutsPaginatedRequest$outboundSchema: z.ZodType< ListShortcutsPaginatedRequest$Outbound, z.ZodTypeDef, ListShortcutsPaginatedRequest > = z.object({ includeFields: z.array( ListShortcutsPaginatedRequestIncludeField$outboundSchema, ).optional(), pageSize: z.number().int(), cursor: z.string().optional(), filters: z.array(FacetFilter$outboundSchema).optional(), sort: SortOptions$outboundSchema.optional(), query: z.string().optional(), }); export function listShortcutsPaginatedRequestToJSON( listShortcutsPaginatedRequest: ListShortcutsPaginatedRequest, ): string { return JSON.stringify( ListShortcutsPaginatedRequest$outboundSchema.parse( listShortcutsPaginatedRequest, ), ); }