@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>
60 lines • 2.48 kB
JavaScript
/*
* 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";
export const GetEdgeConfigsType = {
Flags: "flags",
};
/** @internal */
export const GetEdgeConfigsRequest$outboundSchema = z.object({
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getEdgeConfigsRequestToJSON(getEdgeConfigsRequest) {
return JSON.stringify(GetEdgeConfigsRequest$outboundSchema.parse(getEdgeConfigsRequest));
}
/** @internal */
export const Transfer$inboundSchema = z.object({
fromAccountId: types.string(),
startedAt: types.number(),
doneAt: types.nullable(types.number()),
});
export function transferFromJSON(jsonString) {
return safeParse(jsonString, (x) => Transfer$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Transfer' from JSON`);
}
/** @internal */
export const Schema$inboundSchema = z
.object({});
export function schemaFromJSON(jsonString) {
return safeParse(jsonString, (x) => Schema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema' from JSON`);
}
/** @internal */
export const GetEdgeConfigsType$inboundSchema = z.nativeEnum(GetEdgeConfigsType);
/** @internal */
export const Purpose$inboundSchema = z.object({
type: GetEdgeConfigsType$inboundSchema,
projectId: types.string(),
});
export function purposeFromJSON(jsonString) {
return safeParse(jsonString, (x) => Purpose$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Purpose' from JSON`);
}
/** @internal */
export const GetEdgeConfigsResponseBody$inboundSchema = z.object({
id: types.optional(types.string()),
createdAt: types.optional(types.number()),
ownerId: types.optional(types.string()),
slug: types.optional(types.string()),
updatedAt: types.optional(types.number()),
digest: types.optional(types.string()),
transfer: types.optional(z.lazy(() => Transfer$inboundSchema)),
schema: types.optional(z.lazy(() => Schema$inboundSchema)),
purpose: types.optional(z.lazy(() => Purpose$inboundSchema)),
sizeInBytes: types.number(),
itemCount: types.number(),
});
export function getEdgeConfigsResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetEdgeConfigsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetEdgeConfigsResponseBody' from JSON`);
}
//# sourceMappingURL=getedgeconfigsop.js.map