/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type PartnerAnalyticsCount = { /** * The total number of clicks */ clicks: number; /** * The total number of leads */ leads: number; /** * The total number of sales */ sales: number; /** * The total amount of sales, in cents */ saleAmount: number; earnings: number; }; /** @internal */ export const PartnerAnalyticsCount$inboundSchema: z.ZodType< PartnerAnalyticsCount, z.ZodTypeDef, unknown > = z.object({ clicks: z.number().default(0), leads: z.number().default(0), sales: z.number().default(0), saleAmount: z.number().default(0), earnings: z.number().default(0), }); export function partnerAnalyticsCountFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PartnerAnalyticsCount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PartnerAnalyticsCount' from JSON`, ); }