/* * 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 { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { Notification, Notification$inboundSchema, } from "../components/notification.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export const GetNotificationsNotificationUuidHeaderXGustoAPIVersion = { TwoThousandAndTwentyFiveMinus06Minus15: "2025-06-15", } as const; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export type GetNotificationsNotificationUuidHeaderXGustoAPIVersion = ClosedEnum< typeof GetNotificationsNotificationUuidHeaderXGustoAPIVersion >; export type GetNotificationsNotificationUuidRequest = { /** * The notification entity_uuid */ notificationUuid: string; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ xGustoAPIVersion?: | GetNotificationsNotificationUuidHeaderXGustoAPIVersion | undefined; }; export type GetNotificationsNotificationUuidResponse = { httpMeta: HTTPMetadata; /** * Successful */ notification?: Notification | undefined; }; /** @internal */ export const GetNotificationsNotificationUuidHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetNotificationsNotificationUuidHeaderXGustoAPIVersion > = z.nativeEnum(GetNotificationsNotificationUuidHeaderXGustoAPIVersion); /** @internal */ export type GetNotificationsNotificationUuidRequest$Outbound = { notification_uuid: string; "X-Gusto-API-Version": string; }; /** @internal */ export const GetNotificationsNotificationUuidRequest$outboundSchema: z.ZodType< GetNotificationsNotificationUuidRequest$Outbound, z.ZodTypeDef, GetNotificationsNotificationUuidRequest > = z.object({ notificationUuid: z.string(), xGustoAPIVersion: GetNotificationsNotificationUuidHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), }).transform((v) => { return remap$(v, { notificationUuid: "notification_uuid", xGustoAPIVersion: "X-Gusto-API-Version", }); }); export function getNotificationsNotificationUuidRequestToJSON( getNotificationsNotificationUuidRequest: GetNotificationsNotificationUuidRequest, ): string { return JSON.stringify( GetNotificationsNotificationUuidRequest$outboundSchema.parse( getNotificationsNotificationUuidRequest, ), ); } /** @internal */ export const GetNotificationsNotificationUuidResponse$inboundSchema: z.ZodType< GetNotificationsNotificationUuidResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, Notification: Notification$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Notification": "notification", }); }); export function getNotificationsNotificationUuidResponseFromJSON( jsonString: string, ): SafeParseResult< GetNotificationsNotificationUuidResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetNotificationsNotificationUuidResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetNotificationsNotificationUuidResponse' from JSON`, ); }