/*
 * 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";

export type CustomerPortalWalletsGetSecurity = {
  customerSession?: string | undefined;
  memberSession?: string | undefined;
};

export type CustomerPortalWalletsGetRequest = {
  /**
   * The wallet ID.
   */
  id: string;
};

/** @internal */
export type CustomerPortalWalletsGetSecurity$Outbound = {
  customer_session?: string | undefined;
  member_session?: string | undefined;
};

/** @internal */
export const CustomerPortalWalletsGetSecurity$outboundSchema: z.ZodMiniType<
  CustomerPortalWalletsGetSecurity$Outbound,
  CustomerPortalWalletsGetSecurity
> = z.pipe(
  z.object({
    customerSession: z.optional(z.string()),
    memberSession: z.optional(z.string()),
  }),
  z.transform((v) => {
    return remap$(v, {
      customerSession: "customer_session",
      memberSession: "member_session",
    });
  }),
);

export function customerPortalWalletsGetSecurityToJSON(
  customerPortalWalletsGetSecurity: CustomerPortalWalletsGetSecurity,
): string {
  return JSON.stringify(
    CustomerPortalWalletsGetSecurity$outboundSchema.parse(
      customerPortalWalletsGetSecurity,
    ),
  );
}

/** @internal */
export type CustomerPortalWalletsGetRequest$Outbound = {
  id: string;
};

/** @internal */
export const CustomerPortalWalletsGetRequest$outboundSchema: z.ZodMiniType<
  CustomerPortalWalletsGetRequest$Outbound,
  CustomerPortalWalletsGetRequest
> = z.object({
  id: z.string(),
});

export function customerPortalWalletsGetRequestToJSON(
  customerPortalWalletsGetRequest: CustomerPortalWalletsGetRequest,
): string {
  return JSON.stringify(
    CustomerPortalWalletsGetRequest$outboundSchema.parse(
      customerPortalWalletsGetRequest,
    ),
  );
}
