/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 52d370526337 */ import * as z from "zod/v4"; 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 ListBillingAuditLogGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; export type ListBillingAuditLogRequest = { limit?: number | undefined; /** * Cursor: id from the previous page. */ before?: string | undefined; }; /** * Audit-log rows newest-first. */ export type ListBillingAuditLogResponse = { items: Array; nextCursor: string | null; }; /** @internal */ export type ListBillingAuditLogRequest$Outbound = { limit: number; before?: string | undefined; }; /** @internal */ export const ListBillingAuditLogRequest$outboundSchema: z.ZodType< ListBillingAuditLogRequest$Outbound, ListBillingAuditLogRequest > = z.object({ limit: z.number().default(50), before: z.string().optional(), }); export function listBillingAuditLogRequestToJSON( listBillingAuditLogRequest: ListBillingAuditLogRequest, ): string { return JSON.stringify( ListBillingAuditLogRequest$outboundSchema.parse(listBillingAuditLogRequest), ); } /** @internal */ export const ListBillingAuditLogResponse$inboundSchema: z.ZodType< ListBillingAuditLogResponse, unknown > = z.object({ items: z.array(models.BillingAuditLogRow$inboundSchema), nextCursor: z.nullable(z.string()), }); export function listBillingAuditLogResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListBillingAuditLogResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListBillingAuditLogResponse' from JSON`, ); }