/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; export type GetApiV1LogRequest = { page?: number | undefined; pageSize?: number | undefined; sortKey?: string | undefined; sortDirection?: models.SortDirection | undefined; level?: string | undefined; }; /** @internal */ export const GetApiV1LogRequest$inboundSchema: z.ZodType< GetApiV1LogRequest, z.ZodTypeDef, unknown > = z.object({ page: z.number().int().default(1), pageSize: z.number().int().default(10), sortKey: z.string().optional(), sortDirection: models.SortDirection$inboundSchema.optional(), level: z.string().optional(), }); /** @internal */ export type GetApiV1LogRequest$Outbound = { page: number; pageSize: number; sortKey?: string | undefined; sortDirection?: string | undefined; level?: string | undefined; }; /** @internal */ export const GetApiV1LogRequest$outboundSchema: z.ZodType< GetApiV1LogRequest$Outbound, z.ZodTypeDef, GetApiV1LogRequest > = z.object({ page: z.number().int().default(1), pageSize: z.number().int().default(10), sortKey: z.string().optional(), sortDirection: models.SortDirection$outboundSchema.optional(), level: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetApiV1LogRequest$ { /** @deprecated use `GetApiV1LogRequest$inboundSchema` instead. */ export const inboundSchema = GetApiV1LogRequest$inboundSchema; /** @deprecated use `GetApiV1LogRequest$outboundSchema` instead. */ export const outboundSchema = GetApiV1LogRequest$outboundSchema; /** @deprecated use `GetApiV1LogRequest$Outbound` instead. */ export type Outbound = GetApiV1LogRequest$Outbound; } export function getApiV1LogRequestToJSON( getApiV1LogRequest: GetApiV1LogRequest, ): string { return JSON.stringify( GetApiV1LogRequest$outboundSchema.parse(getApiV1LogRequest), ); } export function getApiV1LogRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetApiV1LogRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetApiV1LogRequest' from JSON`, ); }