@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
49 lines • 2 kB
JavaScript
/*
* 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";
/** @internal */
export const AgreementActionsChangeType$inboundSchema = z.object({
href: types.optional(types.string()),
method: types.optional(types.string()),
description: types.optional(types.string()),
});
/** @internal */
export const AgreementActionsChangeType$outboundSchema = z.object({
href: z.string().optional(),
method: z.string().optional(),
description: z.string().optional(),
});
export function agreementActionsChangeTypeToJSON(agreementActionsChangeType) {
return JSON.stringify(AgreementActionsChangeType$outboundSchema.parse(agreementActionsChangeType));
}
export function agreementActionsChangeTypeFromJSON(jsonString) {
return safeParse(jsonString, (x) => AgreementActionsChangeType$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgreementActionsChangeType' from JSON`);
}
/** @internal */
export const AgreementActions$inboundSchema = z.object({
change_type: types.optional(z.lazy(() => AgreementActionsChangeType$inboundSchema)),
}).transform((v) => {
return remap$(v, {
"change_type": "changeType",
});
});
/** @internal */
export const AgreementActions$outboundSchema = z.object({
changeType: z.lazy(() => AgreementActionsChangeType$outboundSchema)
.optional(),
}).transform((v) => {
return remap$(v, {
changeType: "change_type",
});
});
export function agreementActionsToJSON(agreementActions) {
return JSON.stringify(AgreementActions$outboundSchema.parse(agreementActions));
}
export function agreementActionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => AgreementActions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgreementActions' from JSON`);
}
//# sourceMappingURL=agreementactions.js.map