/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: 4ce890d71908
 */

import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";

export type FilesApiRoutesGetSignedUrlRequest = {
  fileId: string;
  /**
   * Number of hours before the URL becomes invalid. Defaults to 24h. Must be between 1h and 168h.
   */
  expiry?: number | undefined;
};

/** @internal */
export type FilesApiRoutesGetSignedUrlRequest$Outbound = {
  file_id: string;
  expiry: number;
};

/** @internal */
export const FilesApiRoutesGetSignedUrlRequest$outboundSchema: z.ZodType<
  FilesApiRoutesGetSignedUrlRequest$Outbound,
  FilesApiRoutesGetSignedUrlRequest
> = z.object({
  fileId: z.string(),
  expiry: z.int().default(24),
}).transform((v) => {
  return remap$(v, {
    fileId: "file_id",
  });
});

export function filesApiRoutesGetSignedUrlRequestToJSON(
  filesApiRoutesGetSignedUrlRequest: FilesApiRoutesGetSignedUrlRequest,
): string {
  return JSON.stringify(
    FilesApiRoutesGetSignedUrlRequest$outboundSchema.parse(
      filesApiRoutesGetSignedUrlRequest,
    ),
  );
}
