/* * 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 DeleteWebinarsIdRequest = { /** * The hashed ID of the webinar */ id: string; }; /** * A webinar is an event which allows you to stream a video * * @remarks * to multiple participants. See our [Webinars Guide](https://support.wistia.com/en/articles/8288501-getting-started-with-webinars) * for more info. */ export type DeleteWebinarsIdResponse = { /** * The hashed ID of the webinar */ id: string; /** * The title of the webinar */ title: string; /** * The description of the webinar */ description?: string | null | undefined; /** * The scheduled start time in W3C format with timezone */ scheduledFor?: Date | null | undefined; /** * Duration of the webinar in minutes */ eventDuration?: number | null | undefined; /** * Current lifecycle status of the event */ lifecycleStatus: string; /** * Registration status of the event */ registrationStatus: string; /** * When the event was created (UTC) */ createdAt: Date; /** * When the event was last updated (UTC) */ updatedAt: Date; /** * Link for the audience to join the event */ audienceLink: string; /** * Link for the host to manage the event */ hostLink: string; /** * Link for panelists to join the event */ panelistLink: string; }; /** @internal */ export type DeleteWebinarsIdRequest$Outbound = { id: string; }; /** @internal */ export const DeleteWebinarsIdRequest$outboundSchema: z.ZodType< DeleteWebinarsIdRequest$Outbound, z.ZodTypeDef, DeleteWebinarsIdRequest > = z.object({ id: z.string(), }); export function deleteWebinarsIdRequestToJSON( deleteWebinarsIdRequest: DeleteWebinarsIdRequest, ): string { return JSON.stringify( DeleteWebinarsIdRequest$outboundSchema.parse(deleteWebinarsIdRequest), ); } /** @internal */ export const DeleteWebinarsIdResponse$inboundSchema: z.ZodType< DeleteWebinarsIdResponse, z.ZodTypeDef, unknown > = z.object({ id: z.string(), title: z.string(), description: z.nullable(z.string()).optional(), scheduled_for: z.nullable( z.string().datetime({ offset: true }).transform(v => new Date(v)), ).optional(), event_duration: z.nullable(z.number().int()).optional(), lifecycle_status: z.string(), registration_status: z.string(), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), audience_link: z.string(), host_link: z.string(), panelist_link: z.string(), }).transform((v) => { return remap$(v, { "scheduled_for": "scheduledFor", "event_duration": "eventDuration", "lifecycle_status": "lifecycleStatus", "registration_status": "registrationStatus", "created_at": "createdAt", "updated_at": "updatedAt", "audience_link": "audienceLink", "host_link": "hostLink", "panelist_link": "panelistLink", }); }); export function deleteWebinarsIdResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteWebinarsIdResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteWebinarsIdResponse' from JSON`, ); }