@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
47 lines (41 loc) • 1.26 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";
import * as components from "../components/index.js";
export type PatchAgreementRequest = {
accountId?: string | undefined;
agreementId?: string | undefined;
/**
* JSON payload containing the fields to be updated in the agreement.
*/
agreement: components.Agreement;
};
/** @internal */
export type PatchAgreementRequest$Outbound = {
accountId: string;
agreementId: string;
Agreement: components.Agreement$Outbound;
};
/** @internal */
export const PatchAgreementRequest$outboundSchema: z.ZodType<
PatchAgreementRequest$Outbound,
z.ZodTypeDef,
PatchAgreementRequest
> = z.object({
accountId: z.string().default("00000000-0000-0000-0000-000000000000"),
agreementId: z.string().default("00000000-0000-0000-0000-000000000000"),
agreement: components.Agreement$outboundSchema,
}).transform((v) => {
return remap$(v, {
agreement: "Agreement",
});
});
export function patchAgreementRequestToJSON(
patchAgreementRequest: PatchAgreementRequest,
): string {
return JSON.stringify(
PatchAgreementRequest$outboundSchema.parse(patchAgreementRequest),
);
}