/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type UpdateDomainRequestBody = { /** * Name of the domain. */ slug?: string | undefined; /** * Redirect users to a specific URL when any link under this domain has expired. */ expiredUrl?: string | null | undefined; /** * Redirect users to a specific URL when a link under this domain doesn't exist. */ notFoundUrl?: string | null | undefined; /** * Whether to archive this domain. `false` will unarchive a previously archived domain. */ archived?: boolean | undefined; /** * Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened. */ placeholder?: string | null | undefined; /** * The logo of the domain. */ logo?: string | null | undefined; /** * assetLinks.json configuration file (for deep link support on Android). */ assetLinks?: string | null | undefined; /** * apple-app-site-association configuration file (for deep link support on iOS). */ appleAppSiteAssociation?: string | null | undefined; }; export type UpdateDomainRequest = { /** * The domain name. */ slug: string; requestBody?: UpdateDomainRequestBody | undefined; }; /** @internal */ export type UpdateDomainRequestBody$Outbound = { slug?: string | undefined; expiredUrl?: string | null | undefined; notFoundUrl?: string | null | undefined; archived: boolean; placeholder?: string | null | undefined; logo?: string | null | undefined; assetLinks?: string | null | undefined; appleAppSiteAssociation?: string | null | undefined; }; /** @internal */ export const UpdateDomainRequestBody$outboundSchema: z.ZodType< UpdateDomainRequestBody$Outbound, z.ZodTypeDef, UpdateDomainRequestBody > = z.object({ slug: z.string().optional(), expiredUrl: z.nullable(z.string()).optional(), notFoundUrl: z.nullable(z.string()).optional(), archived: z.boolean().default(false), placeholder: z.nullable(z.string()).optional(), logo: z.nullable(z.string()).optional(), assetLinks: z.nullable(z.string()).optional(), appleAppSiteAssociation: z.nullable(z.string()).optional(), }); export function updateDomainRequestBodyToJSON( updateDomainRequestBody: UpdateDomainRequestBody, ): string { return JSON.stringify( UpdateDomainRequestBody$outboundSchema.parse(updateDomainRequestBody), ); } /** @internal */ export type UpdateDomainRequest$Outbound = { slug: string; RequestBody?: UpdateDomainRequestBody$Outbound | undefined; }; /** @internal */ export const UpdateDomainRequest$outboundSchema: z.ZodType< UpdateDomainRequest$Outbound, z.ZodTypeDef, UpdateDomainRequest > = z.object({ slug: z.string(), requestBody: z.lazy(() => UpdateDomainRequestBody$outboundSchema).optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function updateDomainRequestToJSON( updateDomainRequest: UpdateDomainRequest, ): string { return JSON.stringify( UpdateDomainRequest$outboundSchema.parse(updateDomainRequest), ); }