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>

157 lines 6.78 kB
/* * 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 * as types from "../types/primitives.js"; export const GetAllChecksConclusion = { Canceled: "canceled", Failed: "failed", Neutral: "neutral", Skipped: "skipped", Stale: "stale", Succeeded: "succeeded", }; export const GetAllChecksSource = { WebVitals: "web-vitals", }; export const GetAllChecksChecksSource = { WebVitals: "web-vitals", }; export const GetAllChecksChecksResponseSource = { WebVitals: "web-vitals", }; export const GetAllChecksChecksResponse200Source = { WebVitals: "web-vitals", }; export const GetAllChecksChecksResponse200ApplicationJSONSource = { WebVitals: "web-vitals", }; export const GetAllChecksStatus = { Completed: "completed", Registered: "registered", Running: "running", }; /** @internal */ export const GetAllChecksRequest$outboundSchema = z.object({ deploymentId: z.string(), teamId: z.string().optional(), slug: z.string().optional(), }); export function getAllChecksRequestToJSON(getAllChecksRequest) { return JSON.stringify(GetAllChecksRequest$outboundSchema.parse(getAllChecksRequest)); } /** @internal */ export const GetAllChecksConclusion$inboundSchema = z.nativeEnum(GetAllChecksConclusion); /** @internal */ export const GetAllChecksSource$inboundSchema = z.nativeEnum(GetAllChecksSource); /** @internal */ export const GetAllChecksFCP$inboundSchema = z.object({ value: types.nullable(types.number()), previousValue: types.optional(types.number()), source: GetAllChecksSource$inboundSchema, }); export function getAllChecksFCPFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksFCP$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksFCP' from JSON`); } /** @internal */ export const GetAllChecksChecksSource$inboundSchema = z.nativeEnum(GetAllChecksChecksSource); /** @internal */ export const GetAllChecksLCP$inboundSchema = z.object({ value: types.nullable(types.number()), previousValue: types.optional(types.number()), source: GetAllChecksChecksSource$inboundSchema, }); export function getAllChecksLCPFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksLCP$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksLCP' from JSON`); } /** @internal */ export const GetAllChecksChecksResponseSource$inboundSchema = z.nativeEnum(GetAllChecksChecksResponseSource); /** @internal */ export const GetAllChecksCLS$inboundSchema = z.object({ value: types.nullable(types.number()), previousValue: types.optional(types.number()), source: GetAllChecksChecksResponseSource$inboundSchema, }); export function getAllChecksCLSFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksCLS$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksCLS' from JSON`); } /** @internal */ export const GetAllChecksChecksResponse200Source$inboundSchema = z.nativeEnum(GetAllChecksChecksResponse200Source); /** @internal */ export const GetAllChecksTBT$inboundSchema = z.object({ value: types.nullable(types.number()), previousValue: types.optional(types.number()), source: GetAllChecksChecksResponse200Source$inboundSchema, }); export function getAllChecksTBTFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksTBT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksTBT' from JSON`); } /** @internal */ export const GetAllChecksChecksResponse200ApplicationJSONSource$inboundSchema = z .nativeEnum(GetAllChecksChecksResponse200ApplicationJSONSource); /** @internal */ export const GetAllChecksVirtualExperienceScore$inboundSchema = z.object({ value: types.nullable(types.number()), previousValue: types.optional(types.number()), source: GetAllChecksChecksResponse200ApplicationJSONSource$inboundSchema, }); export function getAllChecksVirtualExperienceScoreFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksVirtualExperienceScore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksVirtualExperienceScore' from JSON`); } /** @internal */ export const GetAllChecksMetrics$inboundSchema = z.object({ FCP: z.lazy(() => GetAllChecksFCP$inboundSchema), LCP: z.lazy(() => GetAllChecksLCP$inboundSchema), CLS: z.lazy(() => GetAllChecksCLS$inboundSchema), TBT: z.lazy(() => GetAllChecksTBT$inboundSchema), virtualExperienceScore: types.optional(z.lazy(() => GetAllChecksVirtualExperienceScore$inboundSchema)), }).transform((v) => { return remap$(v, { "FCP": "fcp", "LCP": "lcp", "CLS": "cls", "TBT": "tbt", }); }); export function getAllChecksMetricsFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksMetrics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksMetrics' from JSON`); } /** @internal */ export const GetAllChecksOutput$inboundSchema = z.object({ metrics: types.optional(z.lazy(() => GetAllChecksMetrics$inboundSchema)), }); export function getAllChecksOutputFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksOutput' from JSON`); } /** @internal */ export const GetAllChecksStatus$inboundSchema = z.nativeEnum(GetAllChecksStatus); /** @internal */ export const GetAllChecksChecks$inboundSchema = z.object({ completedAt: types.optional(types.number()), conclusion: types.optional(GetAllChecksConclusion$inboundSchema), createdAt: types.number(), detailsUrl: types.optional(types.string()), id: types.string(), integrationId: types.string(), name: types.string(), output: types.optional(z.lazy(() => GetAllChecksOutput$inboundSchema)), path: types.optional(types.string()), rerequestable: types.boolean(), blocking: types.boolean(), startedAt: types.optional(types.number()), status: GetAllChecksStatus$inboundSchema, updatedAt: types.number(), }); export function getAllChecksChecksFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksChecks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksChecks' from JSON`); } /** @internal */ export const GetAllChecksResponseBody$inboundSchema = z.object({ checks: z.array(z.lazy(() => GetAllChecksChecks$inboundSchema)), }); export function getAllChecksResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetAllChecksResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllChecksResponseBody' from JSON`); } //# sourceMappingURL=getallchecksop.js.map