@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
45 lines (40 loc) • 1.16 kB
text/typescript
/*
* 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 * as types from "../types/primitives.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import {
VcrImageListItem,
VcrImageListItem$inboundSchema,
} from "./vcrimagelistitem.js";
/**
* A paginated list of images for a repository.
*/
export type VcrImageList = {
images: Array<VcrImageListItem>;
/**
* Cursor to fetch the next page of results, when more are available.
*/
nextCursor?: string | undefined;
};
/** @internal */
export const VcrImageList$inboundSchema: z.ZodType<
VcrImageList,
z.ZodTypeDef,
unknown
> = z.object({
images: z.array(VcrImageListItem$inboundSchema),
nextCursor: types.optional(types.string()),
});
export function vcrImageListFromJSON(
jsonString: string,
): SafeParseResult<VcrImageList, SDKValidationError> {
return safeParse(
jsonString,
(x) => VcrImageList$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'VcrImageList' from JSON`,
);
}