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>

55 lines 2.21 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 TokenType = { Oauth2Token: "oauth2-token", }; /** @internal */ export const RotateInstallationCredentialRequestBody$outboundSchema = z.object({ clientSecret: z.string(), clientId: z.string().optional(), }).transform((v) => { return remap$(v, { clientSecret: "client_secret", clientId: "client_id", }); }); export function rotateInstallationCredentialRequestBodyToJSON(rotateInstallationCredentialRequestBody) { return JSON.stringify(RotateInstallationCredentialRequestBody$outboundSchema.parse(rotateInstallationCredentialRequestBody)); } /** @internal */ export const RotateInstallationCredentialRequest$outboundSchema = z.object({ integrationConfigurationId: z.string(), requestBody: z.lazy(() => RotateInstallationCredentialRequestBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function rotateInstallationCredentialRequestToJSON(rotateInstallationCredentialRequest) { return JSON.stringify(RotateInstallationCredentialRequest$outboundSchema.parse(rotateInstallationCredentialRequest)); } /** @internal */ export const TokenType$inboundSchema = z .nativeEnum(TokenType); /** @internal */ export const RotateInstallationCredentialResponseBody$inboundSchema = z.object({ scope: types.string(), expires_in: types.number(), access_token: types.string(), token_type: TokenType$inboundSchema, }).transform((v) => { return remap$(v, { "expires_in": "expiresIn", "access_token": "accessToken", "token_type": "tokenType", }); }); export function rotateInstallationCredentialResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => RotateInstallationCredentialResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RotateInstallationCredentialResponseBody' from JSON`); } //# sourceMappingURL=rotateinstallationcredentialop.js.map