/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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"; /** * An account represents a customer at Wistia. Each account can own media, folders * * @remarks * channels, etc. */ export type GetAccountDetailsResponse = { /** * Numeric id of the account */ id: number; /** * Account name */ name: string; /** * Account’s main Wistia URL (e.g. http://brendan.wistia.com) */ url: string; /** * The total number of medias in this account */ mediaCount: number; /** * The account's video limit */ videoLimit: number | null; /** * The total number of folders in this account */ folderCount: number; /** * The total number of channels in this account */ channelCount: number; }; /** @internal */ export const GetAccountDetailsResponse$inboundSchema: z.ZodType< GetAccountDetailsResponse, z.ZodTypeDef, unknown > = z.object({ id: z.number().int(), name: z.string(), url: z.string(), media_count: z.number().int(), video_limit: z.nullable(z.number().int()), folder_count: z.number().int(), channel_count: z.number().int(), }).transform((v) => { return remap$(v, { "media_count": "mediaCount", "video_limit": "videoLimit", "folder_count": "folderCount", "channel_count": "channelCount", }); }); export function getAccountDetailsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetAccountDetailsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAccountDetailsResponse' from JSON`, ); }