/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";

export type V2PortalExchangeSessionRequestBody = {
  /**
   * The session token ID received from `portal.createSession`.
   *
   * @remarks
   * Must be valid, unexpired, and not previously exchanged.
   */
  sessionId: string;
};

/** @internal */
export type V2PortalExchangeSessionRequestBody$Outbound = {
  sessionId: string;
};

/** @internal */
export const V2PortalExchangeSessionRequestBody$outboundSchema: z.ZodType<
  V2PortalExchangeSessionRequestBody$Outbound,
  z.ZodTypeDef,
  V2PortalExchangeSessionRequestBody
> = z.object({
  sessionId: z.string(),
});

export function v2PortalExchangeSessionRequestBodyToJSON(
  v2PortalExchangeSessionRequestBody: V2PortalExchangeSessionRequestBody,
): string {
  return JSON.stringify(
    V2PortalExchangeSessionRequestBody$outboundSchema.parse(
      v2PortalExchangeSessionRequestBody,
    ),
  );
}
