/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { PaginationResponse, PaginationResponse$inboundSchema, } from "./pagination-response.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { UsageRecordResponse, UsageRecordResponse$inboundSchema, } from "./usage-record-response.js"; export type ListUsageRecordsResponse = { items?: Array | undefined; pagination?: PaginationResponse | undefined; }; /** @internal */ export const ListUsageRecordsResponse$inboundSchema: z.ZodMiniType< ListUsageRecordsResponse, unknown > = z.object({ items: types.optional(z.array(UsageRecordResponse$inboundSchema)), pagination: types.optional(PaginationResponse$inboundSchema), }); export function listUsageRecordsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListUsageRecordsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListUsageRecordsResponse' from JSON`, ); }