/* * 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 { 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 DeleteMemoryEntryRequest = { memoryStoreId: string; entryId: string; ifMatch?: string | undefined; /** * Optional external end-user identifier forwarded by the API gateway. */ xOnBehalfOf?: string | undefined; deleteMemoryEntryRequest?: components.DeleteMemoryEntryRequest | undefined; }; /** @internal */ export const DeleteMemoryEntryRequest$inboundSchema: z.ZodType< DeleteMemoryEntryRequest, z.ZodTypeDef, unknown > = z.object({ memory_store_id: z.string(), entry_id: z.string(), if_match: z.string().optional(), "X-On-Behalf-Of": z.string().optional(), DeleteMemoryEntryRequest: components.DeleteMemoryEntryRequest$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "memory_store_id": "memoryStoreId", "entry_id": "entryId", "if_match": "ifMatch", "X-On-Behalf-Of": "xOnBehalfOf", "DeleteMemoryEntryRequest": "deleteMemoryEntryRequest", }); }); /** @internal */ export type DeleteMemoryEntryRequest$Outbound = { memory_store_id: string; entry_id: string; if_match?: string | undefined; "X-On-Behalf-Of"?: string | undefined; DeleteMemoryEntryRequest?: | components.DeleteMemoryEntryRequest$Outbound | undefined; }; /** @internal */ export const DeleteMemoryEntryRequest$outboundSchema: z.ZodType< DeleteMemoryEntryRequest$Outbound, z.ZodTypeDef, DeleteMemoryEntryRequest > = z.object({ memoryStoreId: z.string(), entryId: z.string(), ifMatch: z.string().optional(), xOnBehalfOf: z.string().optional(), deleteMemoryEntryRequest: components.DeleteMemoryEntryRequest$outboundSchema .optional(), }).transform((v) => { return remap$(v, { memoryStoreId: "memory_store_id", entryId: "entry_id", ifMatch: "if_match", xOnBehalfOf: "X-On-Behalf-Of", deleteMemoryEntryRequest: "DeleteMemoryEntryRequest", }); }); export function deleteMemoryEntryRequestToJSON( deleteMemoryEntryRequest: DeleteMemoryEntryRequest, ): string { return JSON.stringify( DeleteMemoryEntryRequest$outboundSchema.parse(deleteMemoryEntryRequest), ); } export function deleteMemoryEntryRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteMemoryEntryRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteMemoryEntryRequest' from JSON`, ); }