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

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

export type LibrariesShareDeleteV1Request = {
  libraryId: string;
  sharingDelete: components.SharingDelete;
};

/** @internal */
export type LibrariesShareDeleteV1Request$Outbound = {
  library_id: string;
  SharingDelete: components.SharingDelete$Outbound;
};

/** @internal */
export const LibrariesShareDeleteV1Request$outboundSchema: z.ZodType<
  LibrariesShareDeleteV1Request$Outbound,
  z.ZodTypeDef,
  LibrariesShareDeleteV1Request
> = z.object({
  libraryId: z.string(),
  sharingDelete: components.SharingDelete$outboundSchema,
}).transform((v) => {
  return remap$(v, {
    libraryId: "library_id",
    sharingDelete: "SharingDelete",
  });
});

export function librariesShareDeleteV1RequestToJSON(
  librariesShareDeleteV1Request: LibrariesShareDeleteV1Request,
): string {
  return JSON.stringify(
    LibrariesShareDeleteV1Request$outboundSchema.parse(
      librariesShareDeleteV1Request,
    ),
  );
}
