/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; export type CreateDomainRequestBody = { /** * Name of the domain. */ slug: string; /** * 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; }; /** @internal */ export type CreateDomainRequestBody$Outbound = { slug: string; 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 CreateDomainRequestBody$outboundSchema: z.ZodType< CreateDomainRequestBody$Outbound, z.ZodTypeDef, CreateDomainRequestBody > = z.object({ slug: z.string(), 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 createDomainRequestBodyToJSON( createDomainRequestBody: CreateDomainRequestBody, ): string { return JSON.stringify( CreateDomainRequestBody$outboundSchema.parse(createDomainRequestBody), ); }