/* * 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteTerminalApplicationGlobals = { /** * Specify an API version. * * @remarks * * API versioning follows the format `vYYYY.QQ.BB`, where * - `YYYY` is the year * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10) * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter. * - For example, `v2024.01.00` is the initial release of the first quarter of 2024. * * The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release. * When no version is specified, the API defaults to `v2024.01.00`. */ xMoovVersion?: string | undefined; }; export type DeleteTerminalApplicationRequest = { terminalApplicationID: string; }; export type DeleteTerminalApplicationResponse = { headers: { [k: string]: Array }; }; /** @internal */ export const DeleteTerminalApplicationGlobals$inboundSchema: z.ZodType< DeleteTerminalApplicationGlobals, z.ZodTypeDef, unknown > = z.object({ "X-Moov-Version": z.string().optional(), }).transform((v) => { return remap$(v, { "X-Moov-Version": "xMoovVersion", }); }); /** @internal */ export type DeleteTerminalApplicationGlobals$Outbound = { "X-Moov-Version"?: string | undefined; }; /** @internal */ export const DeleteTerminalApplicationGlobals$outboundSchema: z.ZodType< DeleteTerminalApplicationGlobals$Outbound, z.ZodTypeDef, DeleteTerminalApplicationGlobals > = z.object({ xMoovVersion: z.string().optional(), }).transform((v) => { return remap$(v, { xMoovVersion: "X-Moov-Version", }); }); export function deleteTerminalApplicationGlobalsToJSON( deleteTerminalApplicationGlobals: DeleteTerminalApplicationGlobals, ): string { return JSON.stringify( DeleteTerminalApplicationGlobals$outboundSchema.parse( deleteTerminalApplicationGlobals, ), ); } export function deleteTerminalApplicationGlobalsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteTerminalApplicationGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteTerminalApplicationGlobals' from JSON`, ); } /** @internal */ export const DeleteTerminalApplicationRequest$inboundSchema: z.ZodType< DeleteTerminalApplicationRequest, z.ZodTypeDef, unknown > = z.object({ terminalApplicationID: z.string(), }); /** @internal */ export type DeleteTerminalApplicationRequest$Outbound = { terminalApplicationID: string; }; /** @internal */ export const DeleteTerminalApplicationRequest$outboundSchema: z.ZodType< DeleteTerminalApplicationRequest$Outbound, z.ZodTypeDef, DeleteTerminalApplicationRequest > = z.object({ terminalApplicationID: z.string(), }); export function deleteTerminalApplicationRequestToJSON( deleteTerminalApplicationRequest: DeleteTerminalApplicationRequest, ): string { return JSON.stringify( DeleteTerminalApplicationRequest$outboundSchema.parse( deleteTerminalApplicationRequest, ), ); } export function deleteTerminalApplicationRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteTerminalApplicationRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteTerminalApplicationRequest' from JSON`, ); } /** @internal */ export const DeleteTerminalApplicationResponse$inboundSchema: z.ZodType< DeleteTerminalApplicationResponse, z.ZodTypeDef, unknown > = z.object({ Headers: z.record(z.array(z.string())).default({}), }).transform((v) => { return remap$(v, { "Headers": "headers", }); }); /** @internal */ export type DeleteTerminalApplicationResponse$Outbound = { Headers: { [k: string]: Array }; }; /** @internal */ export const DeleteTerminalApplicationResponse$outboundSchema: z.ZodType< DeleteTerminalApplicationResponse$Outbound, z.ZodTypeDef, DeleteTerminalApplicationResponse > = z.object({ headers: z.record(z.array(z.string())), }).transform((v) => { return remap$(v, { headers: "Headers", }); }); export function deleteTerminalApplicationResponseToJSON( deleteTerminalApplicationResponse: DeleteTerminalApplicationResponse, ): string { return JSON.stringify( DeleteTerminalApplicationResponse$outboundSchema.parse( deleteTerminalApplicationResponse, ), ); } export function deleteTerminalApplicationResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteTerminalApplicationResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteTerminalApplicationResponse' from JSON`, ); }