/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { BillingPeriodInfo, BillingPeriodInfo$inboundSchema, } from "./billing-period-info.js"; import { FeatureUsageSummary, FeatureUsageSummary$inboundSchema, } from "./feature-usage-summary.js"; import { PaginationResponse, PaginationResponse$inboundSchema, } from "./pagination-response.js"; import { SDKValidationError } from "./sdk-validation-error.js"; export type CustomerUsageSummaryResponse = { customerId?: string | undefined; features?: Array | undefined; pagination?: PaginationResponse | undefined; period?: BillingPeriodInfo | undefined; }; /** @internal */ export const CustomerUsageSummaryResponse$inboundSchema: z.ZodMiniType< CustomerUsageSummaryResponse, unknown > = z.pipe( z.object({ customer_id: types.optional(types.string()), features: types.optional(z.array(FeatureUsageSummary$inboundSchema)), pagination: types.optional(PaginationResponse$inboundSchema), period: types.optional(BillingPeriodInfo$inboundSchema), }), z.transform((v) => { return remap$(v, { "customer_id": "customerId", }); }), ); export function customerUsageSummaryResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CustomerUsageSummaryResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CustomerUsageSummaryResponse' from JSON`, ); }