/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AccountsDeleteInterestedPartyRequest = { /** * The account id. */ accountId: string; /** * The interestedParty id. */ interestedPartyId: string; }; export type AccountsDeleteInterestedPartyResponse = { httpMeta: components.HTTPMetadata; /** * INVALID_ARGUMENT: The request is not valid, additional information may be present in the BadRequest details. */ status?: components.Status | undefined; }; /** @internal */ export const AccountsDeleteInterestedPartyRequest$inboundSchema: z.ZodType< AccountsDeleteInterestedPartyRequest, z.ZodTypeDef, unknown > = z.object({ account_id: z.string(), interestedParty_id: z.string(), }).transform((v) => { return remap$(v, { "account_id": "accountId", "interestedParty_id": "interestedPartyId", }); }); /** @internal */ export type AccountsDeleteInterestedPartyRequest$Outbound = { account_id: string; interestedParty_id: string; }; /** @internal */ export const AccountsDeleteInterestedPartyRequest$outboundSchema: z.ZodType< AccountsDeleteInterestedPartyRequest$Outbound, z.ZodTypeDef, AccountsDeleteInterestedPartyRequest > = z.object({ accountId: z.string(), interestedPartyId: z.string(), }).transform((v) => { return remap$(v, { accountId: "account_id", interestedPartyId: "interestedParty_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AccountsDeleteInterestedPartyRequest$ { /** @deprecated use `AccountsDeleteInterestedPartyRequest$inboundSchema` instead. */ export const inboundSchema = AccountsDeleteInterestedPartyRequest$inboundSchema; /** @deprecated use `AccountsDeleteInterestedPartyRequest$outboundSchema` instead. */ export const outboundSchema = AccountsDeleteInterestedPartyRequest$outboundSchema; /** @deprecated use `AccountsDeleteInterestedPartyRequest$Outbound` instead. */ export type Outbound = AccountsDeleteInterestedPartyRequest$Outbound; } export function accountsDeleteInterestedPartyRequestToJSON( accountsDeleteInterestedPartyRequest: AccountsDeleteInterestedPartyRequest, ): string { return JSON.stringify( AccountsDeleteInterestedPartyRequest$outboundSchema.parse( accountsDeleteInterestedPartyRequest, ), ); } export function accountsDeleteInterestedPartyRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AccountsDeleteInterestedPartyRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountsDeleteInterestedPartyRequest' from JSON`, ); } /** @internal */ export const AccountsDeleteInterestedPartyResponse$inboundSchema: z.ZodType< AccountsDeleteInterestedPartyResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Status": "status", }); }); /** @internal */ export type AccountsDeleteInterestedPartyResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AccountsDeleteInterestedPartyResponse$outboundSchema: z.ZodType< AccountsDeleteInterestedPartyResponse$Outbound, z.ZodTypeDef, AccountsDeleteInterestedPartyResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AccountsDeleteInterestedPartyResponse$ { /** @deprecated use `AccountsDeleteInterestedPartyResponse$inboundSchema` instead. */ export const inboundSchema = AccountsDeleteInterestedPartyResponse$inboundSchema; /** @deprecated use `AccountsDeleteInterestedPartyResponse$outboundSchema` instead. */ export const outboundSchema = AccountsDeleteInterestedPartyResponse$outboundSchema; /** @deprecated use `AccountsDeleteInterestedPartyResponse$Outbound` instead. */ export type Outbound = AccountsDeleteInterestedPartyResponse$Outbound; } export function accountsDeleteInterestedPartyResponseToJSON( accountsDeleteInterestedPartyResponse: AccountsDeleteInterestedPartyResponse, ): string { return JSON.stringify( AccountsDeleteInterestedPartyResponse$outboundSchema.parse( accountsDeleteInterestedPartyResponse, ), ); } export function accountsDeleteInterestedPartyResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AccountsDeleteInterestedPartyResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountsDeleteInterestedPartyResponse' from JSON`, ); }