/* * 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 ListLatestTopicsRequest = { apiKey: string; apiUsername: string; /** * Defaults to `desc`, add `ascending=true` to sort asc */ ascending?: string | undefined; /** * Enum: `default`, `created`, `activity`, `views`, `posts`, `category`, `likes`, `op_likes`, `posters` */ order?: string | undefined; }; export type ListLatestTopicsPosters = { description?: string | undefined; extras?: string | undefined; primaryGroupId?: string | null | undefined; userId?: number | undefined; }; export type ListLatestTopicsTopics = { archetype?: string | undefined; archived?: boolean | undefined; bookmarked?: boolean | undefined; bumped?: boolean | undefined; bumpedAt?: string | undefined; categoryId?: number | 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 | undefined; lastPostedAt?: string | undefined; lastPosterUsername?: string | undefined; lastReadPostNumber?: number | undefined; likeCount?: number | undefined; liked?: boolean | undefined; notificationLevel?: number | undefined; opLikeCount?: number | 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 ListLatestTopicsTopicList = { canCreateTopic?: boolean | undefined; draft?: string | null | undefined; draftKey?: string | undefined; draftSequence?: number | undefined; perPage?: number | undefined; topics?: Array | undefined; }; export type ListLatestTopicsUsers = { avatarTemplate?: string | undefined; id?: number | undefined; name?: string | null | undefined; username?: string | undefined; }; /** * topic updated */ export type ListLatestTopicsResponseBody = { primaryGroups?: Array | undefined; topicList?: ListLatestTopicsTopicList | undefined; users?: Array | undefined; }; /** @internal */ export const ListLatestTopicsRequest$inboundSchema: z.ZodType< ListLatestTopicsRequest, z.ZodTypeDef, unknown > = z.object({ "Api-Key": z.string(), "Api-Username": z.string(), ascending: z.string().optional(), order: z.string().optional(), }).transform((v) => { return remap$(v, { "Api-Key": "apiKey", "Api-Username": "apiUsername", }); }); /** @internal */ export type ListLatestTopicsRequest$Outbound = { "Api-Key": string; "Api-Username": string; ascending?: string | undefined; order?: string | undefined; }; /** @internal */ export const ListLatestTopicsRequest$outboundSchema: z.ZodType< ListLatestTopicsRequest$Outbound, z.ZodTypeDef, ListLatestTopicsRequest > = z.object({ apiKey: z.string(), apiUsername: z.string(), ascending: z.string().optional(), order: z.string().optional(), }).transform((v) => { return remap$(v, { apiKey: "Api-Key", apiUsername: "Api-Username", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListLatestTopicsRequest$ { /** @deprecated use `ListLatestTopicsRequest$inboundSchema` instead. */ export const inboundSchema = ListLatestTopicsRequest$inboundSchema; /** @deprecated use `ListLatestTopicsRequest$outboundSchema` instead. */ export const outboundSchema = ListLatestTopicsRequest$outboundSchema; /** @deprecated use `ListLatestTopicsRequest$Outbound` instead. */ export type Outbound = ListLatestTopicsRequest$Outbound; } /** @internal */ export const ListLatestTopicsPosters$inboundSchema: z.ZodType< ListLatestTopicsPosters, 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 ListLatestTopicsPosters$Outbound = { description?: string | undefined; extras?: string | undefined; primary_group_id?: string | null | undefined; user_id?: number | undefined; }; /** @internal */ export const ListLatestTopicsPosters$outboundSchema: z.ZodType< ListLatestTopicsPosters$Outbound, z.ZodTypeDef, ListLatestTopicsPosters > = 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 ListLatestTopicsPosters$ { /** @deprecated use `ListLatestTopicsPosters$inboundSchema` instead. */ export const inboundSchema = ListLatestTopicsPosters$inboundSchema; /** @deprecated use `ListLatestTopicsPosters$outboundSchema` instead. */ export const outboundSchema = ListLatestTopicsPosters$outboundSchema; /** @deprecated use `ListLatestTopicsPosters$Outbound` instead. */ export type Outbound = ListLatestTopicsPosters$Outbound; } /** @internal */ export const ListLatestTopicsTopics$inboundSchema: z.ZodType< ListLatestTopicsTopics, z.ZodTypeDef, unknown > = z.object({ archetype: z.string().optional(), archived: z.boolean().optional(), bookmarked: z.boolean().optional(), bumped: z.boolean().optional(), bumped_at: z.string().optional(), category_id: z.number().int().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.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(), op_like_count: z.number().int().optional(), pinned: z.boolean().optional(), pinned_globally: z.boolean().optional(), posters: z.array(z.lazy(() => ListLatestTopicsPosters$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, { "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", "op_like_count": "opLikeCount", "pinned_globally": "pinnedGlobally", "posts_count": "postsCount", "reply_count": "replyCount", "unread_posts": "unreadPosts", }); }); /** @internal */ export type ListLatestTopicsTopics$Outbound = { archetype?: string | undefined; archived?: boolean | undefined; bookmarked?: boolean | undefined; bumped?: boolean | undefined; bumped_at?: string | undefined; category_id?: number | 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 | 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; op_like_count?: number | 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 ListLatestTopicsTopics$outboundSchema: z.ZodType< ListLatestTopicsTopics$Outbound, z.ZodTypeDef, ListLatestTopicsTopics > = z.object({ archetype: z.string().optional(), archived: z.boolean().optional(), bookmarked: z.boolean().optional(), bumped: z.boolean().optional(), bumpedAt: z.string().optional(), categoryId: z.number().int().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.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(), opLikeCount: z.number().int().optional(), pinned: z.boolean().optional(), pinnedGlobally: z.boolean().optional(), posters: z.array(z.lazy(() => ListLatestTopicsPosters$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, { 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", opLikeCount: "op_like_count", 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 ListLatestTopicsTopics$ { /** @deprecated use `ListLatestTopicsTopics$inboundSchema` instead. */ export const inboundSchema = ListLatestTopicsTopics$inboundSchema; /** @deprecated use `ListLatestTopicsTopics$outboundSchema` instead. */ export const outboundSchema = ListLatestTopicsTopics$outboundSchema; /** @deprecated use `ListLatestTopicsTopics$Outbound` instead. */ export type Outbound = ListLatestTopicsTopics$Outbound; } /** @internal */ export const ListLatestTopicsTopicList$inboundSchema: z.ZodType< ListLatestTopicsTopicList, 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(() => ListLatestTopicsTopics$inboundSchema)) .optional(), }).transform((v) => { return remap$(v, { "can_create_topic": "canCreateTopic", "draft_key": "draftKey", "draft_sequence": "draftSequence", "per_page": "perPage", }); }); /** @internal */ export type ListLatestTopicsTopicList$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 ListLatestTopicsTopicList$outboundSchema: z.ZodType< ListLatestTopicsTopicList$Outbound, z.ZodTypeDef, ListLatestTopicsTopicList > = 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(() => ListLatestTopicsTopics$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 ListLatestTopicsTopicList$ { /** @deprecated use `ListLatestTopicsTopicList$inboundSchema` instead. */ export const inboundSchema = ListLatestTopicsTopicList$inboundSchema; /** @deprecated use `ListLatestTopicsTopicList$outboundSchema` instead. */ export const outboundSchema = ListLatestTopicsTopicList$outboundSchema; /** @deprecated use `ListLatestTopicsTopicList$Outbound` instead. */ export type Outbound = ListLatestTopicsTopicList$Outbound; } /** @internal */ export const ListLatestTopicsUsers$inboundSchema: z.ZodType< ListLatestTopicsUsers, 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 ListLatestTopicsUsers$Outbound = { avatar_template?: string | undefined; id?: number | undefined; name?: string | null | undefined; username?: string | undefined; }; /** @internal */ export const ListLatestTopicsUsers$outboundSchema: z.ZodType< ListLatestTopicsUsers$Outbound, z.ZodTypeDef, ListLatestTopicsUsers > = 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 ListLatestTopicsUsers$ { /** @deprecated use `ListLatestTopicsUsers$inboundSchema` instead. */ export const inboundSchema = ListLatestTopicsUsers$inboundSchema; /** @deprecated use `ListLatestTopicsUsers$outboundSchema` instead. */ export const outboundSchema = ListLatestTopicsUsers$outboundSchema; /** @deprecated use `ListLatestTopicsUsers$Outbound` instead. */ export type Outbound = ListLatestTopicsUsers$Outbound; } /** @internal */ export const ListLatestTopicsResponseBody$inboundSchema: z.ZodType< ListLatestTopicsResponseBody, z.ZodTypeDef, unknown > = z.object({ primary_groups: z.array(z.any()).optional(), topic_list: z.lazy(() => ListLatestTopicsTopicList$inboundSchema).optional(), users: z.array(z.lazy(() => ListLatestTopicsUsers$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "primary_groups": "primaryGroups", "topic_list": "topicList", }); }); /** @internal */ export type ListLatestTopicsResponseBody$Outbound = { primary_groups?: Array | undefined; topic_list?: ListLatestTopicsTopicList$Outbound | undefined; users?: Array | undefined; }; /** @internal */ export const ListLatestTopicsResponseBody$outboundSchema: z.ZodType< ListLatestTopicsResponseBody$Outbound, z.ZodTypeDef, ListLatestTopicsResponseBody > = z.object({ primaryGroups: z.array(z.any()).optional(), topicList: z.lazy(() => ListLatestTopicsTopicList$outboundSchema).optional(), users: z.array(z.lazy(() => ListLatestTopicsUsers$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 ListLatestTopicsResponseBody$ { /** @deprecated use `ListLatestTopicsResponseBody$inboundSchema` instead. */ export const inboundSchema = ListLatestTopicsResponseBody$inboundSchema; /** @deprecated use `ListLatestTopicsResponseBody$outboundSchema` instead. */ export const outboundSchema = ListLatestTopicsResponseBody$outboundSchema; /** @deprecated use `ListLatestTopicsResponseBody$Outbound` instead. */ export type Outbound = ListLatestTopicsResponseBody$Outbound; }