/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { IssueSnapshotMetadata, IssueSnapshotMetadata$inboundSchema, } from "./issuesnapshotmetadata.js"; import { PageInfo, PageInfo$inboundSchema } from "./pageinfo.js"; export type PaginatedIssueSnapshotMetadataResponseResults = { data: Array; /** * Provides information about the pagination of a dataset. */ pageInfo: PageInfo; }; export type PaginatedIssueSnapshotMetadataResponse = { results: PaginatedIssueSnapshotMetadataResponseResults; }; /** @internal */ export const PaginatedIssueSnapshotMetadataResponseResults$inboundSchema: z.ZodType< PaginatedIssueSnapshotMetadataResponseResults, z.ZodTypeDef, unknown > = z.object({ data: z.array(IssueSnapshotMetadata$inboundSchema), pageInfo: PageInfo$inboundSchema, }); export function paginatedIssueSnapshotMetadataResponseResultsFromJSON( jsonString: string, ): SafeParseResult< PaginatedIssueSnapshotMetadataResponseResults, SDKValidationError > { return safeParse( jsonString, (x) => PaginatedIssueSnapshotMetadataResponseResults$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PaginatedIssueSnapshotMetadataResponseResults' from JSON`, ); } /** @internal */ export const PaginatedIssueSnapshotMetadataResponse$inboundSchema: z.ZodType< PaginatedIssueSnapshotMetadataResponse, z.ZodTypeDef, unknown > = z.object({ results: z.lazy(() => PaginatedIssueSnapshotMetadataResponseResults$inboundSchema ), }); export function paginatedIssueSnapshotMetadataResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PaginatedIssueSnapshotMetadataResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaginatedIssueSnapshotMetadataResponse' from JSON`, ); }