/* * 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 * as components from "../components/index.js"; export type ListCarrierAccountsGlobals = { /** * Optional string used to pick a non-default API version to use. See our API version guide. */ shippoApiVersion?: string | undefined; }; export type ListCarrierAccountsRequest = { /** * Appends the property `service_levels` to each returned carrier account */ serviceLevels?: boolean | undefined; /** * Filter the response by the specified carrier */ carrier?: components.CarriersEnum | undefined; /** * Filter the response by the specified carrier account Id */ accountId?: string | undefined; /** * The page number you want to select */ page?: number | undefined; /** * The number of results to return per page (max 100, default 5) */ results?: number | undefined; }; /** @internal */ export type ListCarrierAccountsRequest$Outbound = { service_levels?: boolean | undefined; carrier?: string | undefined; account_id?: string | undefined; page: number; results: number; }; /** @internal */ export const ListCarrierAccountsRequest$outboundSchema: z.ZodMiniType< ListCarrierAccountsRequest$Outbound, ListCarrierAccountsRequest > = z.pipe( z.object({ serviceLevels: z.optional(z.boolean()), carrier: z.optional(components.CarriersEnum$outboundSchema), accountId: z.optional(z.string()), page: z._default(z.int(), 1), results: z._default(z.int(), 5), }), z.transform((v) => { return remap$(v, { serviceLevels: "service_levels", accountId: "account_id", }); }), ); export function listCarrierAccountsRequestToJSON( listCarrierAccountsRequest: ListCarrierAccountsRequest, ): string { return JSON.stringify( ListCarrierAccountsRequest$outboundSchema.parse(listCarrierAccountsRequest), ); }