/*
 * 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 CustomerPortalBenefitGrantsGetSecurity = {
  customerSession?: string | undefined;
  memberSession?: string | undefined;
};

export type CustomerPortalBenefitGrantsGetRequest = {
  /**
   * The benefit grant ID.
   */
  id: string;
};

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

/** @internal */
export const CustomerPortalBenefitGrantsGetSecurity$outboundSchema:
  z.ZodMiniType<
    CustomerPortalBenefitGrantsGetSecurity$Outbound,
    CustomerPortalBenefitGrantsGetSecurity
  > = 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 customerPortalBenefitGrantsGetSecurityToJSON(
  customerPortalBenefitGrantsGetSecurity:
    CustomerPortalBenefitGrantsGetSecurity,
): string {
  return JSON.stringify(
    CustomerPortalBenefitGrantsGetSecurity$outboundSchema.parse(
      customerPortalBenefitGrantsGetSecurity,
    ),
  );
}

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

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

export function customerPortalBenefitGrantsGetRequestToJSON(
  customerPortalBenefitGrantsGetRequest: CustomerPortalBenefitGrantsGetRequest,
): string {
  return JSON.stringify(
    CustomerPortalBenefitGrantsGetRequest$outboundSchema.parse(
      customerPortalBenefitGrantsGetRequest,
    ),
  );
}
