/* * 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 GetUserSentPrivateMessagesRequest = { username: string; }; export type GetUserSentPrivateMessagesPosters = { description?: string | undefined; extras?: string | undefined; primaryGroupId?: string | null | undefined; userId?: number | undefined; }; export type GetUserSentPrivateMessagesTopics = { allowedUserCount?: number | undefined; archetype?: string | undefined; archived?: boolean | undefined; bookmarked?: boolean | undefined; bumped?: boolean | undefined; bumpedAt?: string | undefined; categoryId?: string | null | undefined; closed?: boolean | undefined; createdAt?: string | undefined; fancyTitle?: string | undefined; featuredLink?: string | null | undefined; hasSummary?: boolean | undefined; highestPostNumber?: number | undefined; id?: number | undefined; imageUrl?: string | null | undefined; lastPostedAt?: string | undefined; lastPosterUsername?: string | undefined; lastReadPostNumber?: number | undefined; likeCount?: number | undefined; liked?: boolean | undefined; notificationLevel?: number | undefined; participants?: Array | undefined; pinned?: boolean | undefined; pinnedGlobally?: boolean | undefined; posters?: Array | undefined; postsCount?: number | undefined; replyCount?: number | undefined; slug?: string | undefined; title?: string | undefined; unpinned?: string | null | undefined; unreadPosts?: number | undefined; unseen?: boolean | undefined; views?: number | undefined; visible?: boolean | undefined; }; export type GetUserSentPrivateMessagesTopicList = { canCreateTopic?: boolean | undefined; draft?: string | null | undefined; draftKey?: string | undefined; draftSequence?: number | undefined; perPage?: number | undefined; topics?: Array | undefined; }; export type GetUserSentPrivateMessagesUsers = { avatarTemplate?: string | undefined; id?: number | undefined; name?: string | null | undefined; username?: string | undefined; }; /** * private messages */ export type GetUserSentPrivateMessagesResponseBody = { primaryGroups?: Array | undefined; topicList?: GetUserSentPrivateMessagesTopicList | undefined; users?: Array | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesRequest$inboundSchema: z.ZodType< GetUserSentPrivateMessagesRequest, z.ZodTypeDef, unknown > = z.object({ username: z.string(), }); /** @internal */ export type GetUserSentPrivateMessagesRequest$Outbound = { username: string; }; /** @internal */ export const GetUserSentPrivateMessagesRequest$outboundSchema: z.ZodType< GetUserSentPrivateMessagesRequest$Outbound, z.ZodTypeDef, GetUserSentPrivateMessagesRequest > = z.object({ username: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesRequest$ { /** @deprecated use `GetUserSentPrivateMessagesRequest$inboundSchema` instead. */ export const inboundSchema = GetUserSentPrivateMessagesRequest$inboundSchema; /** @deprecated use `GetUserSentPrivateMessagesRequest$outboundSchema` instead. */ export const outboundSchema = GetUserSentPrivateMessagesRequest$outboundSchema; /** @deprecated use `GetUserSentPrivateMessagesRequest$Outbound` instead. */ export type Outbound = GetUserSentPrivateMessagesRequest$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesPosters$inboundSchema: z.ZodType< GetUserSentPrivateMessagesPosters, z.ZodTypeDef, unknown > = z.object({ description: z.string().optional(), extras: z.string().optional(), primary_group_id: z.nullable(z.string()).optional(), user_id: z.number().int().optional(), }).transform((v) => { return remap$(v, { "primary_group_id": "primaryGroupId", "user_id": "userId", }); }); /** @internal */ export type GetUserSentPrivateMessagesPosters$Outbound = { description?: string | undefined; extras?: string | undefined; primary_group_id?: string | null | undefined; user_id?: number | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesPosters$outboundSchema: z.ZodType< GetUserSentPrivateMessagesPosters$Outbound, z.ZodTypeDef, GetUserSentPrivateMessagesPosters > = z.object({ description: z.string().optional(), extras: z.string().optional(), primaryGroupId: z.nullable(z.string()).optional(), userId: z.number().int().optional(), }).transform((v) => { return remap$(v, { primaryGroupId: "primary_group_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 GetUserSentPrivateMessagesPosters$ { /** @deprecated use `GetUserSentPrivateMessagesPosters$inboundSchema` instead. */ export const inboundSchema = GetUserSentPrivateMessagesPosters$inboundSchema; /** @deprecated use `GetUserSentPrivateMessagesPosters$outboundSchema` instead. */ export const outboundSchema = GetUserSentPrivateMessagesPosters$outboundSchema; /** @deprecated use `GetUserSentPrivateMessagesPosters$Outbound` instead. */ export type Outbound = GetUserSentPrivateMessagesPosters$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesTopics$inboundSchema: z.ZodType< GetUserSentPrivateMessagesTopics, z.ZodTypeDef, unknown > = z.object({ allowed_user_count: z.number().int().optional(), archetype: z.string().optional(), archived: z.boolean().optional(), bookmarked: z.boolean().optional(), bumped: z.boolean().optional(), bumped_at: z.string().optional(), category_id: z.nullable(z.string()).optional(), closed: z.boolean().optional(), created_at: z.string().optional(), fancy_title: z.string().optional(), featured_link: z.nullable(z.string()).optional(), has_summary: z.boolean().optional(), highest_post_number: z.number().int().optional(), id: z.number().int().optional(), image_url: z.nullable(z.string()).optional(), last_posted_at: z.string().optional(), last_poster_username: z.string().optional(), last_read_post_number: z.number().int().optional(), like_count: z.number().int().optional(), liked: z.boolean().optional(), notification_level: z.number().int().optional(), participants: z.array(z.any()).optional(), pinned: z.boolean().optional(), pinned_globally: z.boolean().optional(), posters: z.array( z.lazy(() => GetUserSentPrivateMessagesPosters$inboundSchema), ).optional(), posts_count: z.number().int().optional(), reply_count: z.number().int().optional(), slug: z.string().optional(), title: z.string().optional(), unpinned: z.nullable(z.string()).optional(), unread_posts: z.number().int().optional(), unseen: z.boolean().optional(), views: z.number().int().optional(), visible: z.boolean().optional(), }).transform((v) => { return remap$(v, { "allowed_user_count": "allowedUserCount", "bumped_at": "bumpedAt", "category_id": "categoryId", "created_at": "createdAt", "fancy_title": "fancyTitle", "featured_link": "featuredLink", "has_summary": "hasSummary", "highest_post_number": "highestPostNumber", "image_url": "imageUrl", "last_posted_at": "lastPostedAt", "last_poster_username": "lastPosterUsername", "last_read_post_number": "lastReadPostNumber", "like_count": "likeCount", "notification_level": "notificationLevel", "pinned_globally": "pinnedGlobally", "posts_count": "postsCount", "reply_count": "replyCount", "unread_posts": "unreadPosts", }); }); /** @internal */ export type GetUserSentPrivateMessagesTopics$Outbound = { allowed_user_count?: number | undefined; archetype?: string | undefined; archived?: boolean | undefined; bookmarked?: boolean | undefined; bumped?: boolean | undefined; bumped_at?: string | undefined; category_id?: string | null | undefined; closed?: boolean | undefined; created_at?: string | undefined; fancy_title?: string | undefined; featured_link?: string | null | undefined; has_summary?: boolean | undefined; highest_post_number?: number | undefined; id?: number | undefined; image_url?: string | null | undefined; last_posted_at?: string | undefined; last_poster_username?: string | undefined; last_read_post_number?: number | undefined; like_count?: number | undefined; liked?: boolean | undefined; notification_level?: number | undefined; participants?: Array | undefined; pinned?: boolean | undefined; pinned_globally?: boolean | undefined; posters?: Array | undefined; posts_count?: number | undefined; reply_count?: number | undefined; slug?: string | undefined; title?: string | undefined; unpinned?: string | null | undefined; unread_posts?: number | undefined; unseen?: boolean | undefined; views?: number | undefined; visible?: boolean | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesTopics$outboundSchema: z.ZodType< GetUserSentPrivateMessagesTopics$Outbound, z.ZodTypeDef, GetUserSentPrivateMessagesTopics > = z.object({ allowedUserCount: z.number().int().optional(), archetype: z.string().optional(), archived: z.boolean().optional(), bookmarked: z.boolean().optional(), bumped: z.boolean().optional(), bumpedAt: z.string().optional(), categoryId: z.nullable(z.string()).optional(), closed: z.boolean().optional(), createdAt: z.string().optional(), fancyTitle: z.string().optional(), featuredLink: z.nullable(z.string()).optional(), hasSummary: z.boolean().optional(), highestPostNumber: z.number().int().optional(), id: z.number().int().optional(), imageUrl: z.nullable(z.string()).optional(), lastPostedAt: z.string().optional(), lastPosterUsername: z.string().optional(), lastReadPostNumber: z.number().int().optional(), likeCount: z.number().int().optional(), liked: z.boolean().optional(), notificationLevel: z.number().int().optional(), participants: z.array(z.any()).optional(), pinned: z.boolean().optional(), pinnedGlobally: z.boolean().optional(), posters: z.array( z.lazy(() => GetUserSentPrivateMessagesPosters$outboundSchema), ).optional(), postsCount: z.number().int().optional(), replyCount: z.number().int().optional(), slug: z.string().optional(), title: z.string().optional(), unpinned: z.nullable(z.string()).optional(), unreadPosts: z.number().int().optional(), unseen: z.boolean().optional(), views: z.number().int().optional(), visible: z.boolean().optional(), }).transform((v) => { return remap$(v, { allowedUserCount: "allowed_user_count", bumpedAt: "bumped_at", categoryId: "category_id", createdAt: "created_at", fancyTitle: "fancy_title", featuredLink: "featured_link", hasSummary: "has_summary", highestPostNumber: "highest_post_number", imageUrl: "image_url", lastPostedAt: "last_posted_at", lastPosterUsername: "last_poster_username", lastReadPostNumber: "last_read_post_number", likeCount: "like_count", notificationLevel: "notification_level", pinnedGlobally: "pinned_globally", postsCount: "posts_count", replyCount: "reply_count", unreadPosts: "unread_posts", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesTopics$ { /** @deprecated use `GetUserSentPrivateMessagesTopics$inboundSchema` instead. */ export const inboundSchema = GetUserSentPrivateMessagesTopics$inboundSchema; /** @deprecated use `GetUserSentPrivateMessagesTopics$outboundSchema` instead. */ export const outboundSchema = GetUserSentPrivateMessagesTopics$outboundSchema; /** @deprecated use `GetUserSentPrivateMessagesTopics$Outbound` instead. */ export type Outbound = GetUserSentPrivateMessagesTopics$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesTopicList$inboundSchema: z.ZodType< GetUserSentPrivateMessagesTopicList, z.ZodTypeDef, unknown > = z.object({ can_create_topic: z.boolean().optional(), draft: z.nullable(z.string()).optional(), draft_key: z.string().optional(), draft_sequence: z.number().int().optional(), per_page: z.number().int().optional(), topics: z.array(z.lazy(() => GetUserSentPrivateMessagesTopics$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "can_create_topic": "canCreateTopic", "draft_key": "draftKey", "draft_sequence": "draftSequence", "per_page": "perPage", }); }); /** @internal */ export type GetUserSentPrivateMessagesTopicList$Outbound = { can_create_topic?: boolean | undefined; draft?: string | null | undefined; draft_key?: string | undefined; draft_sequence?: number | undefined; per_page?: number | undefined; topics?: Array | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesTopicList$outboundSchema: z.ZodType< GetUserSentPrivateMessagesTopicList$Outbound, z.ZodTypeDef, GetUserSentPrivateMessagesTopicList > = z.object({ canCreateTopic: z.boolean().optional(), draft: z.nullable(z.string()).optional(), draftKey: z.string().optional(), draftSequence: z.number().int().optional(), perPage: z.number().int().optional(), topics: z.array(z.lazy(() => GetUserSentPrivateMessagesTopics$outboundSchema)) .optional(), }).transform((v) => { return remap$(v, { canCreateTopic: "can_create_topic", draftKey: "draft_key", draftSequence: "draft_sequence", perPage: "per_page", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesTopicList$ { /** @deprecated use `GetUserSentPrivateMessagesTopicList$inboundSchema` instead. */ export const inboundSchema = GetUserSentPrivateMessagesTopicList$inboundSchema; /** @deprecated use `GetUserSentPrivateMessagesTopicList$outboundSchema` instead. */ export const outboundSchema = GetUserSentPrivateMessagesTopicList$outboundSchema; /** @deprecated use `GetUserSentPrivateMessagesTopicList$Outbound` instead. */ export type Outbound = GetUserSentPrivateMessagesTopicList$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesUsers$inboundSchema: z.ZodType< GetUserSentPrivateMessagesUsers, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string().optional(), id: z.number().int().optional(), name: z.nullable(z.string()).optional(), username: z.string().optional(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type GetUserSentPrivateMessagesUsers$Outbound = { avatar_template?: string | undefined; id?: number | undefined; name?: string | null | undefined; username?: string | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesUsers$outboundSchema: z.ZodType< GetUserSentPrivateMessagesUsers$Outbound, z.ZodTypeDef, GetUserSentPrivateMessagesUsers > = z.object({ avatarTemplate: z.string().optional(), id: z.number().int().optional(), name: z.nullable(z.string()).optional(), username: z.string().optional(), }).transform((v) => { return remap$(v, { avatarTemplate: "avatar_template", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesUsers$ { /** @deprecated use `GetUserSentPrivateMessagesUsers$inboundSchema` instead. */ export const inboundSchema = GetUserSentPrivateMessagesUsers$inboundSchema; /** @deprecated use `GetUserSentPrivateMessagesUsers$outboundSchema` instead. */ export const outboundSchema = GetUserSentPrivateMessagesUsers$outboundSchema; /** @deprecated use `GetUserSentPrivateMessagesUsers$Outbound` instead. */ export type Outbound = GetUserSentPrivateMessagesUsers$Outbound; } /** @internal */ export const GetUserSentPrivateMessagesResponseBody$inboundSchema: z.ZodType< GetUserSentPrivateMessagesResponseBody, z.ZodTypeDef, unknown > = z.object({ primary_groups: z.array(z.any()).optional(), topic_list: z.lazy(() => GetUserSentPrivateMessagesTopicList$inboundSchema) .optional(), users: z.array(z.lazy(() => GetUserSentPrivateMessagesUsers$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "primary_groups": "primaryGroups", "topic_list": "topicList", }); }); /** @internal */ export type GetUserSentPrivateMessagesResponseBody$Outbound = { primary_groups?: Array | undefined; topic_list?: GetUserSentPrivateMessagesTopicList$Outbound | undefined; users?: Array | undefined; }; /** @internal */ export const GetUserSentPrivateMessagesResponseBody$outboundSchema: z.ZodType< GetUserSentPrivateMessagesResponseBody$Outbound, z.ZodTypeDef, GetUserSentPrivateMessagesResponseBody > = z.object({ primaryGroups: z.array(z.any()).optional(), topicList: z.lazy(() => GetUserSentPrivateMessagesTopicList$outboundSchema) .optional(), users: z.array(z.lazy(() => GetUserSentPrivateMessagesUsers$outboundSchema)) .optional(), }).transform((v) => { return remap$(v, { primaryGroups: "primary_groups", topicList: "topic_list", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetUserSentPrivateMessagesResponseBody$ { /** @deprecated use `GetUserSentPrivateMessagesResponseBody$inboundSchema` instead. */ export const inboundSchema = GetUserSentPrivateMessagesResponseBody$inboundSchema; /** @deprecated use `GetUserSentPrivateMessagesResponseBody$outboundSchema` instead. */ export const outboundSchema = GetUserSentPrivateMessagesResponseBody$outboundSchema; /** @deprecated use `GetUserSentPrivateMessagesResponseBody$Outbound` instead. */ export type Outbound = GetUserSentPrivateMessagesResponseBody$Outbound; }