/* * 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 ListUserPrivateMessagesRequest = { username: string; }; export type ListUserPrivateMessagesParticipants = { description?: string | null | undefined; extras?: string | undefined; primaryGroupId?: string | null | undefined; userId?: number | undefined; }; export type ListUserPrivateMessagesPosters = { description?: string | undefined; extras?: string | undefined; primaryGroupId?: string | null | undefined; userId?: number | undefined; }; export type ListUserPrivateMessagesTopics = { 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 ListUserPrivateMessagesTopicList = { canCreateTopic?: boolean | undefined; draft?: string | null | undefined; draftKey?: string | undefined; draftSequence?: number | undefined; perPage?: number | undefined; topics?: Array | undefined; }; export type ListUserPrivateMessagesUsers = { avatarTemplate?: string | undefined; id?: number | undefined; name?: string | undefined; username?: string | undefined; }; /** * private messages */ export type ListUserPrivateMessagesResponseBody = { primaryGroups?: Array | undefined; topicList?: ListUserPrivateMessagesTopicList | undefined; users?: Array | undefined; }; /** @internal */ export const ListUserPrivateMessagesRequest$inboundSchema: z.ZodType< ListUserPrivateMessagesRequest, z.ZodTypeDef, unknown > = z.object({ username: z.string(), }); /** @internal */ export type ListUserPrivateMessagesRequest$Outbound = { username: string; }; /** @internal */ export const ListUserPrivateMessagesRequest$outboundSchema: z.ZodType< ListUserPrivateMessagesRequest$Outbound, z.ZodTypeDef, ListUserPrivateMessagesRequest > = 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 ListUserPrivateMessagesRequest$ { /** @deprecated use `ListUserPrivateMessagesRequest$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesRequest$inboundSchema; /** @deprecated use `ListUserPrivateMessagesRequest$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesRequest$outboundSchema; /** @deprecated use `ListUserPrivateMessagesRequest$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesRequest$Outbound; } /** @internal */ export const ListUserPrivateMessagesParticipants$inboundSchema: z.ZodType< ListUserPrivateMessagesParticipants, z.ZodTypeDef, unknown > = z.object({ description: z.nullable(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 ListUserPrivateMessagesParticipants$Outbound = { description?: string | null | undefined; extras?: string | undefined; primary_group_id?: string | null | undefined; user_id?: number | undefined; }; /** @internal */ export const ListUserPrivateMessagesParticipants$outboundSchema: z.ZodType< ListUserPrivateMessagesParticipants$Outbound, z.ZodTypeDef, ListUserPrivateMessagesParticipants > = z.object({ description: z.nullable(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 ListUserPrivateMessagesParticipants$ { /** @deprecated use `ListUserPrivateMessagesParticipants$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesParticipants$inboundSchema; /** @deprecated use `ListUserPrivateMessagesParticipants$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesParticipants$outboundSchema; /** @deprecated use `ListUserPrivateMessagesParticipants$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesParticipants$Outbound; } /** @internal */ export const ListUserPrivateMessagesPosters$inboundSchema: z.ZodType< ListUserPrivateMessagesPosters, 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 ListUserPrivateMessagesPosters$Outbound = { description?: string | undefined; extras?: string | undefined; primary_group_id?: string | null | undefined; user_id?: number | undefined; }; /** @internal */ export const ListUserPrivateMessagesPosters$outboundSchema: z.ZodType< ListUserPrivateMessagesPosters$Outbound, z.ZodTypeDef, ListUserPrivateMessagesPosters > = 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 ListUserPrivateMessagesPosters$ { /** @deprecated use `ListUserPrivateMessagesPosters$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesPosters$inboundSchema; /** @deprecated use `ListUserPrivateMessagesPosters$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesPosters$outboundSchema; /** @deprecated use `ListUserPrivateMessagesPosters$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesPosters$Outbound; } /** @internal */ export const ListUserPrivateMessagesTopics$inboundSchema: z.ZodType< ListUserPrivateMessagesTopics, 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.lazy(() => ListUserPrivateMessagesParticipants$inboundSchema), ).optional(), pinned: z.boolean().optional(), pinned_globally: z.boolean().optional(), posters: z.array(z.lazy(() => ListUserPrivateMessagesPosters$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 ListUserPrivateMessagesTopics$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 ListUserPrivateMessagesTopics$outboundSchema: z.ZodType< ListUserPrivateMessagesTopics$Outbound, z.ZodTypeDef, ListUserPrivateMessagesTopics > = 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.lazy(() => ListUserPrivateMessagesParticipants$outboundSchema), ).optional(), pinned: z.boolean().optional(), pinnedGlobally: z.boolean().optional(), posters: z.array(z.lazy(() => ListUserPrivateMessagesPosters$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 ListUserPrivateMessagesTopics$ { /** @deprecated use `ListUserPrivateMessagesTopics$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesTopics$inboundSchema; /** @deprecated use `ListUserPrivateMessagesTopics$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesTopics$outboundSchema; /** @deprecated use `ListUserPrivateMessagesTopics$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesTopics$Outbound; } /** @internal */ export const ListUserPrivateMessagesTopicList$inboundSchema: z.ZodType< ListUserPrivateMessagesTopicList, 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(() => ListUserPrivateMessagesTopics$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "can_create_topic": "canCreateTopic", "draft_key": "draftKey", "draft_sequence": "draftSequence", "per_page": "perPage", }); }); /** @internal */ export type ListUserPrivateMessagesTopicList$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 ListUserPrivateMessagesTopicList$outboundSchema: z.ZodType< ListUserPrivateMessagesTopicList$Outbound, z.ZodTypeDef, ListUserPrivateMessagesTopicList > = 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(() => ListUserPrivateMessagesTopics$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 ListUserPrivateMessagesTopicList$ { /** @deprecated use `ListUserPrivateMessagesTopicList$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesTopicList$inboundSchema; /** @deprecated use `ListUserPrivateMessagesTopicList$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesTopicList$outboundSchema; /** @deprecated use `ListUserPrivateMessagesTopicList$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesTopicList$Outbound; } /** @internal */ export const ListUserPrivateMessagesUsers$inboundSchema: z.ZodType< ListUserPrivateMessagesUsers, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string().optional(), id: z.number().int().optional(), name: z.string().optional(), username: z.string().optional(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type ListUserPrivateMessagesUsers$Outbound = { avatar_template?: string | undefined; id?: number | undefined; name?: string | undefined; username?: string | undefined; }; /** @internal */ export const ListUserPrivateMessagesUsers$outboundSchema: z.ZodType< ListUserPrivateMessagesUsers$Outbound, z.ZodTypeDef, ListUserPrivateMessagesUsers > = z.object({ avatarTemplate: z.string().optional(), id: z.number().int().optional(), name: 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 ListUserPrivateMessagesUsers$ { /** @deprecated use `ListUserPrivateMessagesUsers$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesUsers$inboundSchema; /** @deprecated use `ListUserPrivateMessagesUsers$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesUsers$outboundSchema; /** @deprecated use `ListUserPrivateMessagesUsers$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesUsers$Outbound; } /** @internal */ export const ListUserPrivateMessagesResponseBody$inboundSchema: z.ZodType< ListUserPrivateMessagesResponseBody, z.ZodTypeDef, unknown > = z.object({ primary_groups: z.array(z.any()).optional(), topic_list: z.lazy(() => ListUserPrivateMessagesTopicList$inboundSchema) .optional(), users: z.array(z.lazy(() => ListUserPrivateMessagesUsers$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "primary_groups": "primaryGroups", "topic_list": "topicList", }); }); /** @internal */ export type ListUserPrivateMessagesResponseBody$Outbound = { primary_groups?: Array | undefined; topic_list?: ListUserPrivateMessagesTopicList$Outbound | undefined; users?: Array | undefined; }; /** @internal */ export const ListUserPrivateMessagesResponseBody$outboundSchema: z.ZodType< ListUserPrivateMessagesResponseBody$Outbound, z.ZodTypeDef, ListUserPrivateMessagesResponseBody > = z.object({ primaryGroups: z.array(z.any()).optional(), topicList: z.lazy(() => ListUserPrivateMessagesTopicList$outboundSchema) .optional(), users: z.array(z.lazy(() => ListUserPrivateMessagesUsers$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 ListUserPrivateMessagesResponseBody$ { /** @deprecated use `ListUserPrivateMessagesResponseBody$inboundSchema` instead. */ export const inboundSchema = ListUserPrivateMessagesResponseBody$inboundSchema; /** @deprecated use `ListUserPrivateMessagesResponseBody$outboundSchema` instead. */ export const outboundSchema = ListUserPrivateMessagesResponseBody$outboundSchema; /** @deprecated use `ListUserPrivateMessagesResponseBody$Outbound` instead. */ export type Outbound = ListUserPrivateMessagesResponseBody$Outbound; }