@docusign/iam-sdk
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@docusign/iam-sdk* API.
79 lines (70 loc) • 2.38 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
export type DeleteAgreementRequest = {
accountId?: string | null | undefined;
agreementId?: string | null | undefined;
};
/** @internal */
export const DeleteAgreementRequest$inboundSchema: z.ZodType<
DeleteAgreementRequest,
z.ZodTypeDef,
unknown
> = z.object({
accountId: z.nullable(
z.string().default("00000000-0000-0000-0000-000000000000"),
),
agreementId: z.nullable(
z.string().default("00000000-0000-0000-0000-000000000000"),
),
});
/** @internal */
export type DeleteAgreementRequest$Outbound = {
accountId: string | null;
agreementId: string | null;
};
/** @internal */
export const DeleteAgreementRequest$outboundSchema: z.ZodType<
DeleteAgreementRequest$Outbound,
z.ZodTypeDef,
DeleteAgreementRequest
> = z.object({
accountId: z.nullable(
z.string().default("00000000-0000-0000-0000-000000000000"),
),
agreementId: z.nullable(
z.string().default("00000000-0000-0000-0000-000000000000"),
),
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export namespace DeleteAgreementRequest$ {
/** @deprecated use `DeleteAgreementRequest$inboundSchema` instead. */
export const inboundSchema = DeleteAgreementRequest$inboundSchema;
/** @deprecated use `DeleteAgreementRequest$outboundSchema` instead. */
export const outboundSchema = DeleteAgreementRequest$outboundSchema;
/** @deprecated use `DeleteAgreementRequest$Outbound` instead. */
export type Outbound = DeleteAgreementRequest$Outbound;
}
export function deleteAgreementRequestToJSON(
deleteAgreementRequest: DeleteAgreementRequest,
): string {
return JSON.stringify(
DeleteAgreementRequest$outboundSchema.parse(deleteAgreementRequest),
);
}
export function deleteAgreementRequestFromJSON(
jsonString: string,
): SafeParseResult<DeleteAgreementRequest, SDKValidationError> {
return safeParse(
jsonString,
(x) => DeleteAgreementRequest$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'DeleteAgreementRequest' from JSON`,
);
}