@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
53 lines (47 loc) • 1.54 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 PatchAgreementByDocumentIdRequest = {
accountId?: string | undefined;
/**
* The unique document storage identifier associated with the agreement to be updated. This ID is used to locate the agreement.
*/
documentId?: string | undefined;
/**
* JSON payload containing the fields to be updated in the agreement.
*/
agreement: components.Agreement;
};
/** @internal */
export type PatchAgreementByDocumentIdRequest$Outbound = {
accountId: string;
document_id?: string | undefined;
Agreement: components.Agreement$Outbound;
};
/** @internal */
export const PatchAgreementByDocumentIdRequest$outboundSchema: z.ZodType<
PatchAgreementByDocumentIdRequest$Outbound,
z.ZodTypeDef,
PatchAgreementByDocumentIdRequest
> = z.object({
accountId: z.string().default("00000000-0000-0000-0000-000000000000"),
documentId: z.string().optional(),
agreement: components.Agreement$outboundSchema,
}).transform((v) => {
return remap$(v, {
documentId: "document_id",
agreement: "Agreement",
});
});
export function patchAgreementByDocumentIdRequestToJSON(
patchAgreementByDocumentIdRequest: PatchAgreementByDocumentIdRequest,
): string {
return JSON.stringify(
PatchAgreementByDocumentIdRequest$outboundSchema.parse(
patchAgreementByDocumentIdRequest,
),
);
}