/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; import { ShipmentCreateRequest, ShipmentCreateRequest$Outbound, ShipmentCreateRequest$outboundSchema, } from "./shipmentcreaterequest.js"; export const LabelFileType = { Png: "PNG", PNG23x75: "PNG_2.3x7.5", Pdf: "PDF", PDF23x75: "PDF_2.3x7.5", PDF4x6: "PDF_4x6", PDF4x8: "PDF_4x8", PdfA4: "PDF_A4", PdfA6: "PDF_A6", Zplii: "ZPLII", } as const; export type LabelFileType = ClosedEnum; export type InstantTransactionCreateRequest = { async?: boolean | undefined; carrierAccount: string; labelFileType?: LabelFileType | undefined; metadata?: string | undefined; servicelevelToken: string; shipment: ShipmentCreateRequest; order?: string | undefined; }; /** @internal */ export const LabelFileType$outboundSchema: z.ZodMiniEnum = z.enum(LabelFileType); /** @internal */ export type InstantTransactionCreateRequest$Outbound = { async: boolean; carrier_account: string; label_file_type?: string | undefined; metadata?: string | undefined; servicelevel_token: string; shipment: ShipmentCreateRequest$Outbound; order?: string | undefined; }; /** @internal */ export const InstantTransactionCreateRequest$outboundSchema: z.ZodMiniType< InstantTransactionCreateRequest$Outbound, InstantTransactionCreateRequest > = z.pipe( z.object({ async: z._default(z.boolean(), false), carrierAccount: z.string(), labelFileType: z.optional(LabelFileType$outboundSchema), metadata: z.optional(z.string()), servicelevelToken: z.string(), shipment: ShipmentCreateRequest$outboundSchema, order: z.optional(z.string()), }), z.transform((v) => { return remap$(v, { carrierAccount: "carrier_account", labelFileType: "label_file_type", servicelevelToken: "servicelevel_token", }); }), ); export function instantTransactionCreateRequestToJSON( instantTransactionCreateRequest: InstantTransactionCreateRequest, ): string { return JSON.stringify( InstantTransactionCreateRequest$outboundSchema.parse( instantTransactionCreateRequest, ), ); }