/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; export type Data = { badgeId?: number | undefined; badgeName?: string | undefined; badgeSlug?: string | undefined; badgeTitle?: boolean | undefined; username?: string | undefined; }; export type Notifications = { createdAt?: string | undefined; data?: Data | undefined; id?: number | undefined; notificationType?: number | undefined; postNumber?: string | null | undefined; read?: boolean | undefined; slug?: string | null | undefined; topicId?: number | null | undefined; userId?: number | undefined; }; /** * notifications */ export type GetNotificationsResponseBody = { loadMoreNotifications?: string | undefined; notifications?: Array | undefined; seenNotificationId?: number | undefined; totalRowsNotifications?: number | undefined; }; /** @internal */ export const Data$inboundSchema: z.ZodType = z .object({ badge_id: z.number().int().optional(), badge_name: z.string().optional(), badge_slug: z.string().optional(), badge_title: z.boolean().optional(), username: z.string().optional(), }).transform((v) => { return remap$(v, { "badge_id": "badgeId", "badge_name": "badgeName", "badge_slug": "badgeSlug", "badge_title": "badgeTitle", }); }); /** @internal */ export type Data$Outbound = { badge_id?: number | undefined; badge_name?: string | undefined; badge_slug?: string | undefined; badge_title?: boolean | undefined; username?: string | undefined; }; /** @internal */ export const Data$outboundSchema: z.ZodType = z.object({ badgeId: z.number().int().optional(), badgeName: z.string().optional(), badgeSlug: z.string().optional(), badgeTitle: z.boolean().optional(), username: z.string().optional(), }).transform((v) => { return remap$(v, { badgeId: "badge_id", badgeName: "badge_name", badgeSlug: "badge_slug", badgeTitle: "badge_title", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Data$ { /** @deprecated use `Data$inboundSchema` instead. */ export const inboundSchema = Data$inboundSchema; /** @deprecated use `Data$outboundSchema` instead. */ export const outboundSchema = Data$outboundSchema; /** @deprecated use `Data$Outbound` instead. */ export type Outbound = Data$Outbound; } /** @internal */ export const Notifications$inboundSchema: z.ZodType< Notifications, z.ZodTypeDef, unknown > = z.object({ created_at: z.string().optional(), data: z.lazy(() => Data$inboundSchema).optional(), id: z.number().int().optional(), notification_type: z.number().int().optional(), post_number: z.nullable(z.string()).optional(), read: z.boolean().optional(), slug: z.nullable(z.string()).optional(), topic_id: z.nullable(z.number().int()).optional(), user_id: z.number().int().optional(), }).transform((v) => { return remap$(v, { "created_at": "createdAt", "notification_type": "notificationType", "post_number": "postNumber", "topic_id": "topicId", "user_id": "userId", }); }); /** @internal */ export type Notifications$Outbound = { created_at?: string | undefined; data?: Data$Outbound | undefined; id?: number | undefined; notification_type?: number | undefined; post_number?: string | null | undefined; read?: boolean | undefined; slug?: string | null | undefined; topic_id?: number | null | undefined; user_id?: number | undefined; }; /** @internal */ export const Notifications$outboundSchema: z.ZodType< Notifications$Outbound, z.ZodTypeDef, Notifications > = z.object({ createdAt: z.string().optional(), data: z.lazy(() => Data$outboundSchema).optional(), id: z.number().int().optional(), notificationType: z.number().int().optional(), postNumber: z.nullable(z.string()).optional(), read: z.boolean().optional(), slug: z.nullable(z.string()).optional(), topicId: z.nullable(z.number().int()).optional(), userId: z.number().int().optional(), }).transform((v) => { return remap$(v, { createdAt: "created_at", notificationType: "notification_type", postNumber: "post_number", topicId: "topic_id", userId: "user_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Notifications$ { /** @deprecated use `Notifications$inboundSchema` instead. */ export const inboundSchema = Notifications$inboundSchema; /** @deprecated use `Notifications$outboundSchema` instead. */ export const outboundSchema = Notifications$outboundSchema; /** @deprecated use `Notifications$Outbound` instead. */ export type Outbound = Notifications$Outbound; } /** @internal */ export const GetNotificationsResponseBody$inboundSchema: z.ZodType< GetNotificationsResponseBody, z.ZodTypeDef, unknown > = z.object({ load_more_notifications: z.string().optional(), notifications: z.array(z.lazy(() => Notifications$inboundSchema)).optional(), seen_notification_id: z.number().int().optional(), total_rows_notifications: z.number().int().optional(), }).transform((v) => { return remap$(v, { "load_more_notifications": "loadMoreNotifications", "seen_notification_id": "seenNotificationId", "total_rows_notifications": "totalRowsNotifications", }); }); /** @internal */ export type GetNotificationsResponseBody$Outbound = { load_more_notifications?: string | undefined; notifications?: Array | undefined; seen_notification_id?: number | undefined; total_rows_notifications?: number | undefined; }; /** @internal */ export const GetNotificationsResponseBody$outboundSchema: z.ZodType< GetNotificationsResponseBody$Outbound, z.ZodTypeDef, GetNotificationsResponseBody > = z.object({ loadMoreNotifications: z.string().optional(), notifications: z.array(z.lazy(() => Notifications$outboundSchema)).optional(), seenNotificationId: z.number().int().optional(), totalRowsNotifications: z.number().int().optional(), }).transform((v) => { return remap$(v, { loadMoreNotifications: "load_more_notifications", seenNotificationId: "seen_notification_id", totalRowsNotifications: "total_rows_notifications", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetNotificationsResponseBody$ { /** @deprecated use `GetNotificationsResponseBody$inboundSchema` instead. */ export const inboundSchema = GetNotificationsResponseBody$inboundSchema; /** @deprecated use `GetNotificationsResponseBody$outboundSchema` instead. */ export const outboundSchema = GetNotificationsResponseBody$outboundSchema; /** @deprecated use `GetNotificationsResponseBody$Outbound` instead. */ export type Outbound = GetNotificationsResponseBody$Outbound; }