/* * 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 DeleteAllowedDomainsDomainRequest = { /** * The domain name to delete */ domain: string; }; /** * An allowed domain represents a domain where a Wistia video can be embedded. Account * * @remarks * restrictions need to be enabled for an allowed domain to have an effect. See * our [Domain Restrictions](https://support.wistia.com/en/articles/9691672-domain-restrictions) * guide for more details. */ export type DeleteAllowedDomainsDomainResponse = { /** * The allowed domain name. */ domain: string; /** * The date that the allowed domain was originally created. */ createdAt: Date; /** * A cursor for stable pagination based on current `sort_by` order. You can pass this to `cursor[before]` or `cursor[after]` as a parameter to fetch the records before or after this record in the same sort order. This is only populated if records were fetched with `cursor[enabled]`, or `cursor[before]` or `cursor[after]`. */ cursor?: string | null | undefined; }; /** @internal */ export type DeleteAllowedDomainsDomainRequest$Outbound = { domain: string; }; /** @internal */ export const DeleteAllowedDomainsDomainRequest$outboundSchema: z.ZodType< DeleteAllowedDomainsDomainRequest$Outbound, z.ZodTypeDef, DeleteAllowedDomainsDomainRequest > = z.object({ domain: z.string(), }); export function deleteAllowedDomainsDomainRequestToJSON( deleteAllowedDomainsDomainRequest: DeleteAllowedDomainsDomainRequest, ): string { return JSON.stringify( DeleteAllowedDomainsDomainRequest$outboundSchema.parse( deleteAllowedDomainsDomainRequest, ), ); } /** @internal */ export const DeleteAllowedDomainsDomainResponse$inboundSchema: z.ZodType< DeleteAllowedDomainsDomainResponse, z.ZodTypeDef, unknown > = z.object({ domain: z.string(), created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)), cursor: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", }); }); export function deleteAllowedDomainsDomainResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteAllowedDomainsDomainResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteAllowedDomainsDomainResponse' from JSON`, ); }