/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The request to affirm Agreements for an Account. */ export type AffirmAgreementsRequestCreate = { /** * Repeated string of account_agreement_ids UUID for the specific account agreement(s) being affirmed */ accountAgreementIds: Array; }; /** @internal */ export const AffirmAgreementsRequestCreate$inboundSchema: z.ZodType< AffirmAgreementsRequestCreate, z.ZodTypeDef, unknown > = z.object({ account_agreement_ids: z.array(z.string()), }).transform((v) => { return remap$(v, { "account_agreement_ids": "accountAgreementIds", }); }); /** @internal */ export type AffirmAgreementsRequestCreate$Outbound = { account_agreement_ids: Array; }; /** @internal */ export const AffirmAgreementsRequestCreate$outboundSchema: z.ZodType< AffirmAgreementsRequestCreate$Outbound, z.ZodTypeDef, AffirmAgreementsRequestCreate > = z.object({ accountAgreementIds: z.array(z.string()), }).transform((v) => { return remap$(v, { accountAgreementIds: "account_agreement_ids", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AffirmAgreementsRequestCreate$ { /** @deprecated use `AffirmAgreementsRequestCreate$inboundSchema` instead. */ export const inboundSchema = AffirmAgreementsRequestCreate$inboundSchema; /** @deprecated use `AffirmAgreementsRequestCreate$outboundSchema` instead. */ export const outboundSchema = AffirmAgreementsRequestCreate$outboundSchema; /** @deprecated use `AffirmAgreementsRequestCreate$Outbound` instead. */ export type Outbound = AffirmAgreementsRequestCreate$Outbound; } export function affirmAgreementsRequestCreateToJSON( affirmAgreementsRequestCreate: AffirmAgreementsRequestCreate, ): string { return JSON.stringify( AffirmAgreementsRequestCreate$outboundSchema.parse( affirmAgreementsRequestCreate, ), ); } export function affirmAgreementsRequestCreateFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AffirmAgreementsRequestCreate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AffirmAgreementsRequestCreate' from JSON`, ); }