UNPKG

@docusign/iam-sdk

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.

47 lines 2.03 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"; import { Link$inboundSchema, Link$outboundSchema, } from "./link.js"; /** @internal */ export const AgreementLinksAgreementTypes$inboundSchema = z.object({ href: types.string(), }); /** @internal */ export const AgreementLinksAgreementTypes$outboundSchema = z.object({ href: z.string(), }); export function agreementLinksAgreementTypesToJSON(agreementLinksAgreementTypes) { return JSON.stringify(AgreementLinksAgreementTypes$outboundSchema.parse(agreementLinksAgreementTypes)); } export function agreementLinksAgreementTypesFromJSON(jsonString) { return safeParse(jsonString, (x) => AgreementLinksAgreementTypes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgreementLinksAgreementTypes' from JSON`); } /** @internal */ export const AgreementLinks$inboundSchema = z.object({ document: z.nullable(Link$inboundSchema).optional(), agreement_types: z.nullable(z.lazy(() => AgreementLinksAgreementTypes$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "agreement_types": "agreementTypes", }); }); /** @internal */ export const AgreementLinks$outboundSchema = z.object({ document: z.nullable(Link$outboundSchema).optional(), agreementTypes: z.nullable(z.lazy(() => AgreementLinksAgreementTypes$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { agreementTypes: "agreement_types", }); }); export function agreementLinksToJSON(agreementLinks) { return JSON.stringify(AgreementLinks$outboundSchema.parse(agreementLinks)); } export function agreementLinksFromJSON(jsonString) { return safeParse(jsonString, (x) => AgreementLinks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgreementLinks' from JSON`); } //# sourceMappingURL=agreementlinks.js.map