@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>
65 lines (59 loc) • 1.73 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
export type DownloadArtifactRequest = {
/**
* The continuous integration or delivery environment where this artifact is downloaded.
*/
xArtifactClientCi?: string | undefined;
/**
* 1 if the client is an interactive shell. Otherwise 0
*/
xArtifactClientInteractive?: number | undefined;
/**
* The artifact hash
*/
hash: string;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
/** @internal */
export type DownloadArtifactRequest$Outbound = {
"'x-Artifact-Client-Ci'"?: string | undefined;
"'x-Artifact-Client-Interactive'"?: number | undefined;
hash: string;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export const DownloadArtifactRequest$outboundSchema: z.ZodType<
DownloadArtifactRequest$Outbound,
z.ZodTypeDef,
DownloadArtifactRequest
> = z.object({
xArtifactClientCi: z.string().optional(),
xArtifactClientInteractive: z.number().int().optional(),
hash: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
}).transform((v) => {
return remap$(v, {
xArtifactClientCi: "'x-Artifact-Client-Ci'",
xArtifactClientInteractive: "'x-Artifact-Client-Interactive'",
});
});
export function downloadArtifactRequestToJSON(
downloadArtifactRequest: DownloadArtifactRequest,
): string {
return JSON.stringify(
DownloadArtifactRequest$outboundSchema.parse(downloadArtifactRequest),
);
}