/* * 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 { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteMediaExtendedAudioDescriptionsIdRequest = { /** * The hashed id of the Media Extended Audio Description */ id: string; }; export type DeleteMediaExtendedAudioDescriptionsIdMedia = { /** * A unique alphanumeric identifier for the record. */ id: string; /** * A URL for fetching all the records of the given record type. You can pass hashed_ids as a param with multiple values * * @remarks * to do a batch fetch for this records type. */ indexUrl: string; /** * A URL that can be used to fetch this record. */ url: string; }; export type DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile = { /** * A unique alphanumeric identifier for the record. */ id: string; /** * A URL for fetching all the records of the given record type. You can pass hashed_ids as a param with multiple values * * @remarks * to do a batch fetch for this records type. */ indexUrl: string; /** * A URL that can be used to fetch this record. */ url: string; }; export type DeleteMediaExtendedAudioDescriptionsIdContact = { /** * A unique alphanumeric identifier for the record. */ id: string; /** * A URL for fetching all the records of the given record type. You can pass hashed_ids as a param with multiple values * * @remarks * to do a batch fetch for this records type. */ indexUrl: string; /** * A URL that can be used to fetch this record. */ url: string; }; /** * Media Extended Audio Description deleted successful */ export type DeleteMediaExtendedAudioDescriptionsIdResponse = { id?: string | undefined; ietfLanguageTag?: string | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; media?: DeleteMediaExtendedAudioDescriptionsIdMedia | undefined; providedMediaFile?: | DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile | undefined; contact?: DeleteMediaExtendedAudioDescriptionsIdContact | undefined; }; /** @internal */ export type DeleteMediaExtendedAudioDescriptionsIdRequest$Outbound = { id: string; }; /** @internal */ export const DeleteMediaExtendedAudioDescriptionsIdRequest$outboundSchema: z.ZodType< DeleteMediaExtendedAudioDescriptionsIdRequest$Outbound, z.ZodTypeDef, DeleteMediaExtendedAudioDescriptionsIdRequest > = z.object({ id: z.string(), }); export function deleteMediaExtendedAudioDescriptionsIdRequestToJSON( deleteMediaExtendedAudioDescriptionsIdRequest: DeleteMediaExtendedAudioDescriptionsIdRequest, ): string { return JSON.stringify( DeleteMediaExtendedAudioDescriptionsIdRequest$outboundSchema.parse( deleteMediaExtendedAudioDescriptionsIdRequest, ), ); } /** @internal */ export const DeleteMediaExtendedAudioDescriptionsIdMedia$inboundSchema: z.ZodType< DeleteMediaExtendedAudioDescriptionsIdMedia, z.ZodTypeDef, unknown > = z.object({ id: z.string(), index_url: z.string(), url: z.string(), }).transform((v) => { return remap$(v, { "index_url": "indexUrl", }); }); export function deleteMediaExtendedAudioDescriptionsIdMediaFromJSON( jsonString: string, ): SafeParseResult< DeleteMediaExtendedAudioDescriptionsIdMedia, SDKValidationError > { return safeParse( jsonString, (x) => DeleteMediaExtendedAudioDescriptionsIdMedia$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeleteMediaExtendedAudioDescriptionsIdMedia' from JSON`, ); } /** @internal */ export const DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile$inboundSchema: z.ZodType< DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile, z.ZodTypeDef, unknown > = z.object({ id: z.string(), index_url: z.string(), url: z.string(), }).transform((v) => { return remap$(v, { "index_url": "indexUrl", }); }); export function deleteMediaExtendedAudioDescriptionsIdProvidedMediaFileFromJSON( jsonString: string, ): SafeParseResult< DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile, SDKValidationError > { return safeParse( jsonString, (x) => DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile' from JSON`, ); } /** @internal */ export const DeleteMediaExtendedAudioDescriptionsIdContact$inboundSchema: z.ZodType< DeleteMediaExtendedAudioDescriptionsIdContact, z.ZodTypeDef, unknown > = z.object({ id: z.string(), index_url: z.string(), url: z.string(), }).transform((v) => { return remap$(v, { "index_url": "indexUrl", }); }); export function deleteMediaExtendedAudioDescriptionsIdContactFromJSON( jsonString: string, ): SafeParseResult< DeleteMediaExtendedAudioDescriptionsIdContact, SDKValidationError > { return safeParse( jsonString, (x) => DeleteMediaExtendedAudioDescriptionsIdContact$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeleteMediaExtendedAudioDescriptionsIdContact' from JSON`, ); } /** @internal */ export const DeleteMediaExtendedAudioDescriptionsIdResponse$inboundSchema: z.ZodType< DeleteMediaExtendedAudioDescriptionsIdResponse, z.ZodTypeDef, unknown > = z.object({ id: z.string().optional(), ietf_language_tag: z.string().optional(), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v) ).optional(), media: z.lazy(() => DeleteMediaExtendedAudioDescriptionsIdMedia$inboundSchema ).optional(), provided_media_file: z.lazy(() => DeleteMediaExtendedAudioDescriptionsIdProvidedMediaFile$inboundSchema ).optional(), contact: z.lazy(() => DeleteMediaExtendedAudioDescriptionsIdContact$inboundSchema ).optional(), }).transform((v) => { return remap$(v, { "ietf_language_tag": "ietfLanguageTag", "created_at": "createdAt", "updated_at": "updatedAt", "provided_media_file": "providedMediaFile", }); }); export function deleteMediaExtendedAudioDescriptionsIdResponseFromJSON( jsonString: string, ): SafeParseResult< DeleteMediaExtendedAudioDescriptionsIdResponse, SDKValidationError > { return safeParse( jsonString, (x) => DeleteMediaExtendedAudioDescriptionsIdResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'DeleteMediaExtendedAudioDescriptionsIdResponse' from JSON`, ); }