/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type LogsFilter = { connectorId?: string | null | undefined; statusCode?: number | null | undefined; excludeUnifiedApis?: string | null | undefined; }; /** @internal */ export const LogsFilter$inboundSchema: z.ZodType< LogsFilter, z.ZodTypeDef, unknown > = z.object({ connector_id: z.nullable(z.string()).optional(), status_code: z.nullable(z.number()).optional(), exclude_unified_apis: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "connector_id": "connectorId", "status_code": "statusCode", "exclude_unified_apis": "excludeUnifiedApis", }); }); /** @internal */ export type LogsFilter$Outbound = { connector_id?: string | null | undefined; status_code?: number | null | undefined; exclude_unified_apis?: string | null | undefined; }; /** @internal */ export const LogsFilter$outboundSchema: z.ZodType< LogsFilter$Outbound, z.ZodTypeDef, LogsFilter > = z.object({ connectorId: z.nullable(z.string()).optional(), statusCode: z.nullable(z.number()).optional(), excludeUnifiedApis: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { connectorId: "connector_id", statusCode: "status_code", excludeUnifiedApis: "exclude_unified_apis", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace LogsFilter$ { /** @deprecated use `LogsFilter$inboundSchema` instead. */ export const inboundSchema = LogsFilter$inboundSchema; /** @deprecated use `LogsFilter$outboundSchema` instead. */ export const outboundSchema = LogsFilter$outboundSchema; /** @deprecated use `LogsFilter$Outbound` instead. */ export type Outbound = LogsFilter$Outbound; } export function logsFilterToJSON(logsFilter: LogsFilter): string { return JSON.stringify(LogsFilter$outboundSchema.parse(logsFilter)); } export function logsFilterFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => LogsFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'LogsFilter' from JSON`, ); }