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>

35 lines 1.41 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import * as types from "../types/primitives.js"; import { APIKeyQuota$inboundSchema } from "./apikeyquota.js"; /** @internal */ export const APIKeyMetadata$inboundSchema = z.object({}); export function apiKeyMetadataFromJSON(jsonString) { return safeParse(jsonString, (x) => APIKeyMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'APIKeyMetadata' from JSON`); } /** @internal */ export const APIKey$inboundSchema = z .object({ id: types.string(), name: types.string(), partialKey: types.string(), teamId: types.string(), purpose: types.string(), projectId: types.nullable(types.string()), expiresAt: types.nullable(types.number()), activeAt: types.number(), createdAt: types.number(), createdBy: types.string(), leakedAt: types.nullable(types.number()), leakedUrl: types.nullable(types.string()), createdByAppId: types.nullable(types.string()), quota: types.optional(APIKeyQuota$inboundSchema), metadata: types.optional(z.lazy(() => APIKeyMetadata$inboundSchema)), }); export function apiKeyFromJSON(jsonString) { return safeParse(jsonString, (x) => APIKey$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'APIKey' from JSON`); } //# sourceMappingURL=apikey.js.map