/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 1e7c112b5f5f */ import * as z from "zod/v3"; export type ExternalShortcut = { /** * link text following the viewPrefix as entered by the user. For example, if the view prefix is `go/` and the shortened URL is `go/abc`, then `abc` is the inputAlias. */ inputAlias: string; /** * A short, plain text blurb to help people understand the intent of the shortcut. */ description?: string | undefined; /** * destination URL for the shortcut. */ destinationUrl: string; /** * Email of the user who created this shortcut. */ createdBy: string; /** * The time the shortcut was created in epoch seconds. */ createTime?: number | undefined; /** * Email of the user who last updated this shortcut. */ updatedBy?: string | undefined; /** * The time the shortcut was updated in epoch seconds. */ updateTime?: number | undefined; /** * Title of the golink */ title?: string | undefined; /** * The URL from which the user is then redirected to the destination URL. */ intermediateUrl: string; /** * decayed visits score for ranking */ decayedVisitScore?: number | undefined; /** * The URL using which the user can access the edit page of the shortcut. */ editUrl?: string | undefined; }; /** @internal */ export type ExternalShortcut$Outbound = { inputAlias: string; description?: string | undefined; destinationUrl: string; createdBy: string; createTime?: number | undefined; updatedBy?: string | undefined; updateTime?: number | undefined; title?: string | undefined; intermediateUrl: string; decayedVisitScore?: number | undefined; editUrl?: string | undefined; }; /** @internal */ export const ExternalShortcut$outboundSchema: z.ZodType< ExternalShortcut$Outbound, z.ZodTypeDef, ExternalShortcut > = z.object({ inputAlias: z.string(), description: z.string().optional(), destinationUrl: z.string(), createdBy: z.string(), createTime: z.number().int().optional(), updatedBy: z.string().optional(), updateTime: z.number().int().optional(), title: z.string().optional(), intermediateUrl: z.string(), decayedVisitScore: z.number().optional(), editUrl: z.string().optional(), }); export function externalShortcutToJSON( externalShortcut: ExternalShortcut, ): string { return JSON.stringify( ExternalShortcut$outboundSchema.parse(externalShortcut), ); }