UNPKG

@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>

54 lines (49 loc) 1.42 kB
/* * 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"; /** * A team's access grant to a Vercel Container Registry repository. */ export type VcrRepositoryPermission = { /** * Identifier of the repository the permission grants access to. */ repositoryId: string; /** * Identifier of the team that is granted access to the repository. */ teamId: string; /** * Slug of the team that is granted access to the repository. */ teamSlug: string; /** * ISO 8601 timestamp of when the permission was created. */ createdAt: string; }; /** @internal */ export const VcrRepositoryPermission$inboundSchema: z.ZodType< VcrRepositoryPermission, z.ZodTypeDef, unknown > = z.object({ repositoryId: types.string(), teamId: types.string(), teamSlug: types.string(), createdAt: types.string(), }); export function vcrRepositoryPermissionFromJSON( jsonString: string, ): SafeParseResult<VcrRepositoryPermission, SDKValidationError> { return safeParse( jsonString, (x) => VcrRepositoryPermission$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VcrRepositoryPermission' from JSON`, ); }