/* * 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 GetTopicRequest = { apiKey: string; apiUsername: string; id: string; }; export type GetTopicActionsSummary = { canAct: boolean; count: number; hidden: boolean; id: number; }; export type CreatedBy = { avatarTemplate: string; id: number; name: string; username: string; }; export type LastPoster = { avatarTemplate: string; id: number; name: string; username: string; }; export type Participants = { admin: boolean; avatarTemplate: string; flairBgColor: string | null; flairColor: string | null; flairGroupId?: string | null | undefined; flairName: string | null; flairUrl: string | null; id: number; moderator: boolean; name: string; postCount: number; primaryGroupName: string | null; trustLevel: number; username: string; }; export type Details = { canArchiveTopic: boolean; canCloseTopic: boolean; canConvertTopic: boolean; canCreatePost: boolean; canDelete: boolean; canEdit: boolean; canEditStaffNotes: boolean; canFlagTopic?: boolean | undefined; canInviteTo?: boolean | undefined; canInviteViaEmail?: boolean | undefined; canModerateCategory: boolean; canMovePosts: boolean; canPinUnpinTopic: boolean; canRemoveAllowedUsers: boolean; canRemoveSelfId: number; canReplyAsNewTopic: boolean; canReviewTopic: boolean; canSplitMergeTopic: boolean; canToggleTopicVisibility: boolean; createdBy: CreatedBy; lastPoster: LastPoster; notificationLevel: number; participants?: Array | undefined; }; export type GetTopicTopicsActionsSummary = { canAct: boolean; id: number; }; export type LinkCounts = { clicks: number; internal: boolean; reflection: boolean; title: string; url: string; }; export type Posts = { actionsSummary: Array; admin: boolean; avatarTemplate: string; bookmarked: boolean; canDelete: boolean; canEdit: boolean; canRecover: boolean; canSeeHiddenPost?: boolean | undefined; canViewEditHistory: boolean; canWiki: boolean; cooked: string; createdAt: string; deletedAt: string | null; displayUsername: string; editReason: string | null; flairBgColor: string | null; flairColor: string | null; flairName: string | null; flairUrl: string | null; hidden: boolean; id: number; incomingLinkCount: number; linkCounts: Array; moderator: boolean; name: string; postNumber: number; postType: number; primaryGroupName: string | null; quoteCount: number; read: boolean; readersCount: number; reads: number; replyCount: number; replyToPostNumber: string | null; reviewableId: number; reviewableScoreCount: number; reviewableScorePendingCount: number; score: number; staff: boolean; topicId: number; topicSlug: string; trustLevel: number; updatedAt: string; userDeleted: boolean; userId: number; userTitle: string | null; username: string; version: number; wiki: boolean; yours: boolean; }; export type PostStream = { posts: Array; stream: Array; }; export type GetTopicUser = { avatarTemplate: string; id: number; name: string; username: string; }; export type Posters = { description: string; extras: string; user: GetTopicUser; }; export type GetTopicTagsDescriptions = {}; export type SuggestedTopics = { archetype: string; archived: boolean; bookmarked: string | null; bumped: boolean; bumpedAt: string; categoryId: number; closed: boolean; createdAt: string; excerpt: string; fancyTitle: string; featuredLink: string | null; highestPostNumber: number; id: number; imageUrl: string | null; lastPostedAt: string | null; likeCount: number; liked: string | null; pinned: boolean; posters: Array; postsCount: number; replyCount: number; slug: string; tags: Array; tagsDescriptions: GetTopicTagsDescriptions; title: string; unpinned: string | null; unseen: boolean; views: number; visible: boolean; }; export type TagsDescriptions = {}; /** * specific posts */ export type GetTopicResponseBody = { actionsSummary: Array; archetype: string; archived: boolean; bookmarked: boolean; bookmarks: Array; categoryId: number; chunkSize: number; closed: boolean; createdAt: string; currentPostNumber?: number | undefined; deletedAt: string | null; deletedBy: string | null; details: Details; draft: string | null; draftKey: string; draftSequence: number; fancyTitle: string; featuredLink: string | null; hasDeleted: boolean; hasSummary: boolean; highestPostNumber: number | null; id: number; imageUrl: string | null; lastPostedAt: string | null; likeCount: number; messageBusLastId: number; participantCount: number; pinned: boolean; pinnedAt: string | null; pinnedGlobally: boolean; pinnedUntil: string | null; postStream: PostStream; postsCount: number; replyCount: number; showReadIndicator: boolean; slowModeEnabledUntil: string | null; slowModeSeconds: number; slug: string; suggestedTopics: Array; summarizable: boolean; tags: Array; tagsDescriptions: TagsDescriptions; thumbnails: string | null; timelineLookup: Array; title: string; topicTimer: string | null; unpinned: string | null; userId: number; views: number; visible: boolean; wordCount: number | null; }; /** @internal */ export const GetTopicRequest$inboundSchema: z.ZodType< GetTopicRequest, z.ZodTypeDef, unknown > = z.object({ "Api-Key": z.string(), "Api-Username": z.string(), id: z.string(), }).transform((v) => { return remap$(v, { "Api-Key": "apiKey", "Api-Username": "apiUsername", }); }); /** @internal */ export type GetTopicRequest$Outbound = { "Api-Key": string; "Api-Username": string; id: string; }; /** @internal */ export const GetTopicRequest$outboundSchema: z.ZodType< GetTopicRequest$Outbound, z.ZodTypeDef, GetTopicRequest > = z.object({ apiKey: z.string(), apiUsername: z.string(), id: z.string(), }).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 GetTopicRequest$ { /** @deprecated use `GetTopicRequest$inboundSchema` instead. */ export const inboundSchema = GetTopicRequest$inboundSchema; /** @deprecated use `GetTopicRequest$outboundSchema` instead. */ export const outboundSchema = GetTopicRequest$outboundSchema; /** @deprecated use `GetTopicRequest$Outbound` instead. */ export type Outbound = GetTopicRequest$Outbound; } /** @internal */ export const GetTopicActionsSummary$inboundSchema: z.ZodType< GetTopicActionsSummary, z.ZodTypeDef, unknown > = z.object({ can_act: z.boolean(), count: z.number().int(), hidden: z.boolean(), id: z.number().int(), }).transform((v) => { return remap$(v, { "can_act": "canAct", }); }); /** @internal */ export type GetTopicActionsSummary$Outbound = { can_act: boolean; count: number; hidden: boolean; id: number; }; /** @internal */ export const GetTopicActionsSummary$outboundSchema: z.ZodType< GetTopicActionsSummary$Outbound, z.ZodTypeDef, GetTopicActionsSummary > = z.object({ canAct: z.boolean(), count: z.number().int(), hidden: z.boolean(), id: z.number().int(), }).transform((v) => { return remap$(v, { canAct: "can_act", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicActionsSummary$ { /** @deprecated use `GetTopicActionsSummary$inboundSchema` instead. */ export const inboundSchema = GetTopicActionsSummary$inboundSchema; /** @deprecated use `GetTopicActionsSummary$outboundSchema` instead. */ export const outboundSchema = GetTopicActionsSummary$outboundSchema; /** @deprecated use `GetTopicActionsSummary$Outbound` instead. */ export type Outbound = GetTopicActionsSummary$Outbound; } /** @internal */ export const CreatedBy$inboundSchema: z.ZodType< CreatedBy, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string(), id: z.number().int(), name: z.string(), username: z.string(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type CreatedBy$Outbound = { avatar_template: string; id: number; name: string; username: string; }; /** @internal */ export const CreatedBy$outboundSchema: z.ZodType< CreatedBy$Outbound, z.ZodTypeDef, CreatedBy > = z.object({ avatarTemplate: z.string(), id: z.number().int(), name: z.string(), username: z.string(), }).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 CreatedBy$ { /** @deprecated use `CreatedBy$inboundSchema` instead. */ export const inboundSchema = CreatedBy$inboundSchema; /** @deprecated use `CreatedBy$outboundSchema` instead. */ export const outboundSchema = CreatedBy$outboundSchema; /** @deprecated use `CreatedBy$Outbound` instead. */ export type Outbound = CreatedBy$Outbound; } /** @internal */ export const LastPoster$inboundSchema: z.ZodType< LastPoster, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string(), id: z.number().int(), name: z.string(), username: z.string(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type LastPoster$Outbound = { avatar_template: string; id: number; name: string; username: string; }; /** @internal */ export const LastPoster$outboundSchema: z.ZodType< LastPoster$Outbound, z.ZodTypeDef, LastPoster > = z.object({ avatarTemplate: z.string(), id: z.number().int(), name: z.string(), username: z.string(), }).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 LastPoster$ { /** @deprecated use `LastPoster$inboundSchema` instead. */ export const inboundSchema = LastPoster$inboundSchema; /** @deprecated use `LastPoster$outboundSchema` instead. */ export const outboundSchema = LastPoster$outboundSchema; /** @deprecated use `LastPoster$Outbound` instead. */ export type Outbound = LastPoster$Outbound; } /** @internal */ export const Participants$inboundSchema: z.ZodType< Participants, z.ZodTypeDef, unknown > = z.object({ admin: z.boolean(), avatar_template: z.string(), flair_bg_color: z.nullable(z.string()), flair_color: z.nullable(z.string()), flair_group_id: z.nullable(z.string()).optional(), flair_name: z.nullable(z.string()), flair_url: z.nullable(z.string()), id: z.number().int(), moderator: z.boolean(), name: z.string(), post_count: z.number().int(), primary_group_name: z.nullable(z.string()), trust_level: z.number().int(), username: z.string(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", "flair_bg_color": "flairBgColor", "flair_color": "flairColor", "flair_group_id": "flairGroupId", "flair_name": "flairName", "flair_url": "flairUrl", "post_count": "postCount", "primary_group_name": "primaryGroupName", "trust_level": "trustLevel", }); }); /** @internal */ export type Participants$Outbound = { admin: boolean; avatar_template: string; flair_bg_color: string | null; flair_color: string | null; flair_group_id?: string | null | undefined; flair_name: string | null; flair_url: string | null; id: number; moderator: boolean; name: string; post_count: number; primary_group_name: string | null; trust_level: number; username: string; }; /** @internal */ export const Participants$outboundSchema: z.ZodType< Participants$Outbound, z.ZodTypeDef, Participants > = z.object({ admin: z.boolean(), avatarTemplate: z.string(), flairBgColor: z.nullable(z.string()), flairColor: z.nullable(z.string()), flairGroupId: z.nullable(z.string()).optional(), flairName: z.nullable(z.string()), flairUrl: z.nullable(z.string()), id: z.number().int(), moderator: z.boolean(), name: z.string(), postCount: z.number().int(), primaryGroupName: z.nullable(z.string()), trustLevel: z.number().int(), username: z.string(), }).transform((v) => { return remap$(v, { avatarTemplate: "avatar_template", flairBgColor: "flair_bg_color", flairColor: "flair_color", flairGroupId: "flair_group_id", flairName: "flair_name", flairUrl: "flair_url", postCount: "post_count", primaryGroupName: "primary_group_name", trustLevel: "trust_level", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Participants$ { /** @deprecated use `Participants$inboundSchema` instead. */ export const inboundSchema = Participants$inboundSchema; /** @deprecated use `Participants$outboundSchema` instead. */ export const outboundSchema = Participants$outboundSchema; /** @deprecated use `Participants$Outbound` instead. */ export type Outbound = Participants$Outbound; } /** @internal */ export const Details$inboundSchema: z.ZodType = z.object({ can_archive_topic: z.boolean(), can_close_topic: z.boolean(), can_convert_topic: z.boolean(), can_create_post: z.boolean(), can_delete: z.boolean(), can_edit: z.boolean(), can_edit_staff_notes: z.boolean(), can_flag_topic: z.boolean().optional(), can_invite_to: z.boolean().optional(), can_invite_via_email: z.boolean().optional(), can_moderate_category: z.boolean(), can_move_posts: z.boolean(), can_pin_unpin_topic: z.boolean(), can_remove_allowed_users: z.boolean(), can_remove_self_id: z.number().int(), can_reply_as_new_topic: z.boolean(), can_review_topic: z.boolean(), can_split_merge_topic: z.boolean(), can_toggle_topic_visibility: z.boolean(), created_by: z.lazy(() => CreatedBy$inboundSchema), last_poster: z.lazy(() => LastPoster$inboundSchema), notification_level: z.number().int(), participants: z.array(z.lazy(() => Participants$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "can_archive_topic": "canArchiveTopic", "can_close_topic": "canCloseTopic", "can_convert_topic": "canConvertTopic", "can_create_post": "canCreatePost", "can_delete": "canDelete", "can_edit": "canEdit", "can_edit_staff_notes": "canEditStaffNotes", "can_flag_topic": "canFlagTopic", "can_invite_to": "canInviteTo", "can_invite_via_email": "canInviteViaEmail", "can_moderate_category": "canModerateCategory", "can_move_posts": "canMovePosts", "can_pin_unpin_topic": "canPinUnpinTopic", "can_remove_allowed_users": "canRemoveAllowedUsers", "can_remove_self_id": "canRemoveSelfId", "can_reply_as_new_topic": "canReplyAsNewTopic", "can_review_topic": "canReviewTopic", "can_split_merge_topic": "canSplitMergeTopic", "can_toggle_topic_visibility": "canToggleTopicVisibility", "created_by": "createdBy", "last_poster": "lastPoster", "notification_level": "notificationLevel", }); }); /** @internal */ export type Details$Outbound = { can_archive_topic: boolean; can_close_topic: boolean; can_convert_topic: boolean; can_create_post: boolean; can_delete: boolean; can_edit: boolean; can_edit_staff_notes: boolean; can_flag_topic?: boolean | undefined; can_invite_to?: boolean | undefined; can_invite_via_email?: boolean | undefined; can_moderate_category: boolean; can_move_posts: boolean; can_pin_unpin_topic: boolean; can_remove_allowed_users: boolean; can_remove_self_id: number; can_reply_as_new_topic: boolean; can_review_topic: boolean; can_split_merge_topic: boolean; can_toggle_topic_visibility: boolean; created_by: CreatedBy$Outbound; last_poster: LastPoster$Outbound; notification_level: number; participants?: Array | undefined; }; /** @internal */ export const Details$outboundSchema: z.ZodType< Details$Outbound, z.ZodTypeDef, Details > = z.object({ canArchiveTopic: z.boolean(), canCloseTopic: z.boolean(), canConvertTopic: z.boolean(), canCreatePost: z.boolean(), canDelete: z.boolean(), canEdit: z.boolean(), canEditStaffNotes: z.boolean(), canFlagTopic: z.boolean().optional(), canInviteTo: z.boolean().optional(), canInviteViaEmail: z.boolean().optional(), canModerateCategory: z.boolean(), canMovePosts: z.boolean(), canPinUnpinTopic: z.boolean(), canRemoveAllowedUsers: z.boolean(), canRemoveSelfId: z.number().int(), canReplyAsNewTopic: z.boolean(), canReviewTopic: z.boolean(), canSplitMergeTopic: z.boolean(), canToggleTopicVisibility: z.boolean(), createdBy: z.lazy(() => CreatedBy$outboundSchema), lastPoster: z.lazy(() => LastPoster$outboundSchema), notificationLevel: z.number().int(), participants: z.array(z.lazy(() => Participants$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { canArchiveTopic: "can_archive_topic", canCloseTopic: "can_close_topic", canConvertTopic: "can_convert_topic", canCreatePost: "can_create_post", canDelete: "can_delete", canEdit: "can_edit", canEditStaffNotes: "can_edit_staff_notes", canFlagTopic: "can_flag_topic", canInviteTo: "can_invite_to", canInviteViaEmail: "can_invite_via_email", canModerateCategory: "can_moderate_category", canMovePosts: "can_move_posts", canPinUnpinTopic: "can_pin_unpin_topic", canRemoveAllowedUsers: "can_remove_allowed_users", canRemoveSelfId: "can_remove_self_id", canReplyAsNewTopic: "can_reply_as_new_topic", canReviewTopic: "can_review_topic", canSplitMergeTopic: "can_split_merge_topic", canToggleTopicVisibility: "can_toggle_topic_visibility", createdBy: "created_by", lastPoster: "last_poster", notificationLevel: "notification_level", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Details$ { /** @deprecated use `Details$inboundSchema` instead. */ export const inboundSchema = Details$inboundSchema; /** @deprecated use `Details$outboundSchema` instead. */ export const outboundSchema = Details$outboundSchema; /** @deprecated use `Details$Outbound` instead. */ export type Outbound = Details$Outbound; } /** @internal */ export const GetTopicTopicsActionsSummary$inboundSchema: z.ZodType< GetTopicTopicsActionsSummary, z.ZodTypeDef, unknown > = z.object({ can_act: z.boolean(), id: z.number().int(), }).transform((v) => { return remap$(v, { "can_act": "canAct", }); }); /** @internal */ export type GetTopicTopicsActionsSummary$Outbound = { can_act: boolean; id: number; }; /** @internal */ export const GetTopicTopicsActionsSummary$outboundSchema: z.ZodType< GetTopicTopicsActionsSummary$Outbound, z.ZodTypeDef, GetTopicTopicsActionsSummary > = z.object({ canAct: z.boolean(), id: z.number().int(), }).transform((v) => { return remap$(v, { canAct: "can_act", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicTopicsActionsSummary$ { /** @deprecated use `GetTopicTopicsActionsSummary$inboundSchema` instead. */ export const inboundSchema = GetTopicTopicsActionsSummary$inboundSchema; /** @deprecated use `GetTopicTopicsActionsSummary$outboundSchema` instead. */ export const outboundSchema = GetTopicTopicsActionsSummary$outboundSchema; /** @deprecated use `GetTopicTopicsActionsSummary$Outbound` instead. */ export type Outbound = GetTopicTopicsActionsSummary$Outbound; } /** @internal */ export const LinkCounts$inboundSchema: z.ZodType< LinkCounts, z.ZodTypeDef, unknown > = z.object({ clicks: z.number().int(), internal: z.boolean(), reflection: z.boolean(), title: z.string(), url: z.string(), }); /** @internal */ export type LinkCounts$Outbound = { clicks: number; internal: boolean; reflection: boolean; title: string; url: string; }; /** @internal */ export const LinkCounts$outboundSchema: z.ZodType< LinkCounts$Outbound, z.ZodTypeDef, LinkCounts > = z.object({ clicks: z.number().int(), internal: z.boolean(), reflection: z.boolean(), title: z.string(), url: 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 LinkCounts$ { /** @deprecated use `LinkCounts$inboundSchema` instead. */ export const inboundSchema = LinkCounts$inboundSchema; /** @deprecated use `LinkCounts$outboundSchema` instead. */ export const outboundSchema = LinkCounts$outboundSchema; /** @deprecated use `LinkCounts$Outbound` instead. */ export type Outbound = LinkCounts$Outbound; } /** @internal */ export const Posts$inboundSchema: z.ZodType = z .object({ actions_summary: z.array( z.lazy(() => GetTopicTopicsActionsSummary$inboundSchema), ), admin: z.boolean(), avatar_template: z.string(), bookmarked: z.boolean(), can_delete: z.boolean(), can_edit: z.boolean(), can_recover: z.boolean(), can_see_hidden_post: z.boolean().optional(), can_view_edit_history: z.boolean(), can_wiki: z.boolean(), cooked: z.string(), created_at: z.string(), deleted_at: z.nullable(z.string()), display_username: z.string(), edit_reason: z.nullable(z.string()), flair_bg_color: z.nullable(z.string()), flair_color: z.nullable(z.string()), flair_name: z.nullable(z.string()), flair_url: z.nullable(z.string()), hidden: z.boolean(), id: z.number().int(), incoming_link_count: z.number().int(), link_counts: z.array(z.lazy(() => LinkCounts$inboundSchema)), moderator: z.boolean(), name: z.string(), post_number: z.number().int(), post_type: z.number().int(), primary_group_name: z.nullable(z.string()), quote_count: z.number().int(), read: z.boolean(), readers_count: z.number().int(), reads: z.number().int(), reply_count: z.number().int(), reply_to_post_number: z.nullable(z.string()), reviewable_id: z.number().int(), reviewable_score_count: z.number().int(), reviewable_score_pending_count: z.number().int(), score: z.number().int(), staff: z.boolean(), topic_id: z.number().int(), topic_slug: z.string(), trust_level: z.number().int(), updated_at: z.string(), user_deleted: z.boolean(), user_id: z.number().int(), user_title: z.nullable(z.string()), username: z.string(), version: z.number().int(), wiki: z.boolean(), yours: z.boolean(), }).transform((v) => { return remap$(v, { "actions_summary": "actionsSummary", "avatar_template": "avatarTemplate", "can_delete": "canDelete", "can_edit": "canEdit", "can_recover": "canRecover", "can_see_hidden_post": "canSeeHiddenPost", "can_view_edit_history": "canViewEditHistory", "can_wiki": "canWiki", "created_at": "createdAt", "deleted_at": "deletedAt", "display_username": "displayUsername", "edit_reason": "editReason", "flair_bg_color": "flairBgColor", "flair_color": "flairColor", "flair_name": "flairName", "flair_url": "flairUrl", "incoming_link_count": "incomingLinkCount", "link_counts": "linkCounts", "post_number": "postNumber", "post_type": "postType", "primary_group_name": "primaryGroupName", "quote_count": "quoteCount", "readers_count": "readersCount", "reply_count": "replyCount", "reply_to_post_number": "replyToPostNumber", "reviewable_id": "reviewableId", "reviewable_score_count": "reviewableScoreCount", "reviewable_score_pending_count": "reviewableScorePendingCount", "topic_id": "topicId", "topic_slug": "topicSlug", "trust_level": "trustLevel", "updated_at": "updatedAt", "user_deleted": "userDeleted", "user_id": "userId", "user_title": "userTitle", }); }); /** @internal */ export type Posts$Outbound = { actions_summary: Array; admin: boolean; avatar_template: string; bookmarked: boolean; can_delete: boolean; can_edit: boolean; can_recover: boolean; can_see_hidden_post?: boolean | undefined; can_view_edit_history: boolean; can_wiki: boolean; cooked: string; created_at: string; deleted_at: string | null; display_username: string; edit_reason: string | null; flair_bg_color: string | null; flair_color: string | null; flair_name: string | null; flair_url: string | null; hidden: boolean; id: number; incoming_link_count: number; link_counts: Array; moderator: boolean; name: string; post_number: number; post_type: number; primary_group_name: string | null; quote_count: number; read: boolean; readers_count: number; reads: number; reply_count: number; reply_to_post_number: string | null; reviewable_id: number; reviewable_score_count: number; reviewable_score_pending_count: number; score: number; staff: boolean; topic_id: number; topic_slug: string; trust_level: number; updated_at: string; user_deleted: boolean; user_id: number; user_title: string | null; username: string; version: number; wiki: boolean; yours: boolean; }; /** @internal */ export const Posts$outboundSchema: z.ZodType< Posts$Outbound, z.ZodTypeDef, Posts > = z.object({ actionsSummary: z.array( z.lazy(() => GetTopicTopicsActionsSummary$outboundSchema), ), admin: z.boolean(), avatarTemplate: z.string(), bookmarked: z.boolean(), canDelete: z.boolean(), canEdit: z.boolean(), canRecover: z.boolean(), canSeeHiddenPost: z.boolean().optional(), canViewEditHistory: z.boolean(), canWiki: z.boolean(), cooked: z.string(), createdAt: z.string(), deletedAt: z.nullable(z.string()), displayUsername: z.string(), editReason: z.nullable(z.string()), flairBgColor: z.nullable(z.string()), flairColor: z.nullable(z.string()), flairName: z.nullable(z.string()), flairUrl: z.nullable(z.string()), hidden: z.boolean(), id: z.number().int(), incomingLinkCount: z.number().int(), linkCounts: z.array(z.lazy(() => LinkCounts$outboundSchema)), moderator: z.boolean(), name: z.string(), postNumber: z.number().int(), postType: z.number().int(), primaryGroupName: z.nullable(z.string()), quoteCount: z.number().int(), read: z.boolean(), readersCount: z.number().int(), reads: z.number().int(), replyCount: z.number().int(), replyToPostNumber: z.nullable(z.string()), reviewableId: z.number().int(), reviewableScoreCount: z.number().int(), reviewableScorePendingCount: z.number().int(), score: z.number().int(), staff: z.boolean(), topicId: z.number().int(), topicSlug: z.string(), trustLevel: z.number().int(), updatedAt: z.string(), userDeleted: z.boolean(), userId: z.number().int(), userTitle: z.nullable(z.string()), username: z.string(), version: z.number().int(), wiki: z.boolean(), yours: z.boolean(), }).transform((v) => { return remap$(v, { actionsSummary: "actions_summary", avatarTemplate: "avatar_template", canDelete: "can_delete", canEdit: "can_edit", canRecover: "can_recover", canSeeHiddenPost: "can_see_hidden_post", canViewEditHistory: "can_view_edit_history", canWiki: "can_wiki", createdAt: "created_at", deletedAt: "deleted_at", displayUsername: "display_username", editReason: "edit_reason", flairBgColor: "flair_bg_color", flairColor: "flair_color", flairName: "flair_name", flairUrl: "flair_url", incomingLinkCount: "incoming_link_count", linkCounts: "link_counts", postNumber: "post_number", postType: "post_type", primaryGroupName: "primary_group_name", quoteCount: "quote_count", readersCount: "readers_count", replyCount: "reply_count", replyToPostNumber: "reply_to_post_number", reviewableId: "reviewable_id", reviewableScoreCount: "reviewable_score_count", reviewableScorePendingCount: "reviewable_score_pending_count", topicId: "topic_id", topicSlug: "topic_slug", trustLevel: "trust_level", updatedAt: "updated_at", userDeleted: "user_deleted", userId: "user_id", userTitle: "user_title", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Posts$ { /** @deprecated use `Posts$inboundSchema` instead. */ export const inboundSchema = Posts$inboundSchema; /** @deprecated use `Posts$outboundSchema` instead. */ export const outboundSchema = Posts$outboundSchema; /** @deprecated use `Posts$Outbound` instead. */ export type Outbound = Posts$Outbound; } /** @internal */ export const PostStream$inboundSchema: z.ZodType< PostStream, z.ZodTypeDef, unknown > = z.object({ posts: z.array(z.lazy(() => Posts$inboundSchema)), stream: z.array(z.any()), }); /** @internal */ export type PostStream$Outbound = { posts: Array; stream: Array; }; /** @internal */ export const PostStream$outboundSchema: z.ZodType< PostStream$Outbound, z.ZodTypeDef, PostStream > = z.object({ posts: z.array(z.lazy(() => Posts$outboundSchema)), stream: z.array(z.any()), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace PostStream$ { /** @deprecated use `PostStream$inboundSchema` instead. */ export const inboundSchema = PostStream$inboundSchema; /** @deprecated use `PostStream$outboundSchema` instead. */ export const outboundSchema = PostStream$outboundSchema; /** @deprecated use `PostStream$Outbound` instead. */ export type Outbound = PostStream$Outbound; } /** @internal */ export const GetTopicUser$inboundSchema: z.ZodType< GetTopicUser, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string(), id: z.number().int(), name: z.string(), username: z.string(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type GetTopicUser$Outbound = { avatar_template: string; id: number; name: string; username: string; }; /** @internal */ export const GetTopicUser$outboundSchema: z.ZodType< GetTopicUser$Outbound, z.ZodTypeDef, GetTopicUser > = z.object({ avatarTemplate: z.string(), id: z.number().int(), name: z.string(), username: z.string(), }).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 GetTopicUser$ { /** @deprecated use `GetTopicUser$inboundSchema` instead. */ export const inboundSchema = GetTopicUser$inboundSchema; /** @deprecated use `GetTopicUser$outboundSchema` instead. */ export const outboundSchema = GetTopicUser$outboundSchema; /** @deprecated use `GetTopicUser$Outbound` instead. */ export type Outbound = GetTopicUser$Outbound; } /** @internal */ export const Posters$inboundSchema: z.ZodType = z.object({ description: z.string(), extras: z.string(), user: z.lazy(() => GetTopicUser$inboundSchema), }); /** @internal */ export type Posters$Outbound = { description: string; extras: string; user: GetTopicUser$Outbound; }; /** @internal */ export const Posters$outboundSchema: z.ZodType< Posters$Outbound, z.ZodTypeDef, Posters > = z.object({ description: z.string(), extras: z.string(), user: z.lazy(() => GetTopicUser$outboundSchema), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Posters$ { /** @deprecated use `Posters$inboundSchema` instead. */ export const inboundSchema = Posters$inboundSchema; /** @deprecated use `Posters$outboundSchema` instead. */ export const outboundSchema = Posters$outboundSchema; /** @deprecated use `Posters$Outbound` instead. */ export type Outbound = Posters$Outbound; } /** @internal */ export const GetTopicTagsDescriptions$inboundSchema: z.ZodType< GetTopicTagsDescriptions, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ export type GetTopicTagsDescriptions$Outbound = {}; /** @internal */ export const GetTopicTagsDescriptions$outboundSchema: z.ZodType< GetTopicTagsDescriptions$Outbound, z.ZodTypeDef, GetTopicTagsDescriptions > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicTagsDescriptions$ { /** @deprecated use `GetTopicTagsDescriptions$inboundSchema` instead. */ export const inboundSchema = GetTopicTagsDescriptions$inboundSchema; /** @deprecated use `GetTopicTagsDescriptions$outboundSchema` instead. */ export const outboundSchema = GetTopicTagsDescriptions$outboundSchema; /** @deprecated use `GetTopicTagsDescriptions$Outbound` instead. */ export type Outbound = GetTopicTagsDescriptions$Outbound; } /** @internal */ export const SuggestedTopics$inboundSchema: z.ZodType< SuggestedTopics, z.ZodTypeDef, unknown > = z.object({ archetype: z.string(), archived: z.boolean(), bookmarked: z.nullable(z.string()), bumped: z.boolean(), bumped_at: z.string(), category_id: z.number().int(), closed: z.boolean(), created_at: z.string(), excerpt: z.string(), fancy_title: z.string(), featured_link: z.nullable(z.string()), highest_post_number: z.number().int(), id: z.number().int(), image_url: z.nullable(z.string()), last_posted_at: z.nullable(z.string()), like_count: z.number().int(), liked: z.nullable(z.string()), pinned: z.boolean(), posters: z.array(z.lazy(() => Posters$inboundSchema)), posts_count: z.number().int(), reply_count: z.number().int(), slug: z.string(), tags: z.array(z.any()), tags_descriptions: z.lazy(() => GetTopicTagsDescriptions$inboundSchema), title: z.string(), unpinned: z.nullable(z.string()), unseen: z.boolean(), views: z.number().int(), visible: z.boolean(), }).transform((v) => { return remap$(v, { "bumped_at": "bumpedAt", "category_id": "categoryId", "created_at": "createdAt", "fancy_title": "fancyTitle", "featured_link": "featuredLink", "highest_post_number": "highestPostNumber", "image_url": "imageUrl", "last_posted_at": "lastPostedAt", "like_count": "likeCount", "posts_count": "postsCount", "reply_count": "replyCount", "tags_descriptions": "tagsDescriptions", }); }); /** @internal */ export type SuggestedTopics$Outbound = { archetype: string; archived: boolean; bookmarked: string | null; bumped: boolean; bumped_at: string; category_id: number; closed: boolean; created_at: string; excerpt: string; fancy_title: string; featured_link: string | null; highest_post_number: number; id: number; image_url: string | null; last_posted_at: string | null; like_count: number; liked: string | null; pinned: boolean; posters: Array; posts_count: number; reply_count: number; slug: string; tags: Array; tags_descriptions: GetTopicTagsDescriptions$Outbound; title: string; unpinned: string | null; unseen: boolean; views: number; visible: boolean; }; /** @internal */ export const SuggestedTopics$outboundSchema: z.ZodType< SuggestedTopics$Outbound, z.ZodTypeDef, SuggestedTopics > = z.object({ archetype: z.string(), archived: z.boolean(), bookmarked: z.nullable(z.string()), bumped: z.boolean(), bumpedAt: z.string(), categoryId: z.number().int(), closed: z.boolean(), createdAt: z.string(), excerpt: z.string(), fancyTitle: z.string(), featuredLink: z.nullable(z.string()), highestPostNumber: z.number().int(), id: z.number().int(), imageUrl: z.nullable(z.string()), lastPostedAt: z.nullable(z.string()), likeCount: z.number().int(), liked: z.nullable(z.string()), pinned: z.boolean(), posters: z.array(z.lazy(() => Posters$outboundSchema)), postsCount: z.number().int(), replyCount: z.number().int(), slug: z.string(), tags: z.array(z.any()), tagsDescriptions: z.lazy(() => GetTopicTagsDescriptions$outboundSchema), title: z.string(), unpinned: z.nullable(z.string()), unseen: z.boolean(), views: z.number().int(), visible: z.boolean(), }).transform((v) => { return remap$(v, { bumpedAt: "bumped_at", categoryId: "category_id", createdAt: "created_at", fancyTitle: "fancy_title", featuredLink: "featured_link", highestPostNumber: "highest_post_number", imageUrl: "image_url", lastPostedAt: "last_posted_at", likeCount: "like_count", postsCount: "posts_count", replyCount: "reply_count", tagsDescriptions: "tags_descriptions", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace SuggestedTopics$ { /** @deprecated use `SuggestedTopics$inboundSchema` instead. */ export const inboundSchema = SuggestedTopics$inboundSchema; /** @deprecated use `SuggestedTopics$outboundSchema` instead. */ export const outboundSchema = SuggestedTopics$outboundSchema; /** @deprecated use `SuggestedTopics$Outbound` instead. */ export type Outbound = SuggestedTopics$Outbound; } /** @internal */ export const TagsDescriptions$inboundSchema: z.ZodType< TagsDescriptions, z.ZodTypeDef, unknown > = z.object({}); /** @internal */ export type TagsDescriptions$Outbound = {}; /** @internal */ export const TagsDescriptions$outboundSchema: z.ZodType< TagsDescriptions$Outbound, z.ZodTypeDef, TagsDescriptions > = z.object({}); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace TagsDescriptions$ { /** @deprecated use `TagsDescriptions$inboundSchema` instead. */ export const inboundSchema = TagsDescriptions$inboundSchema; /** @deprecated use `TagsDescriptions$outboundSchema` instead. */ export const outboundSchema = TagsDescriptions$outboundSchema; /** @deprecated use `TagsDescriptions$Outbound` instead. */ export type Outbound = TagsDescriptions$Outbound; } /** @internal */ export const GetTopicResponseBody$inboundSchema: z.ZodType< GetTopicResponseBody, z.ZodTypeDef, unknown > = z.object({ actions_summary: z.array(z.lazy(() => GetTopicActionsSummary$inboundSchema)), archetype: z.string(), archived: z.boolean(), bookmarked: z.boolean(), bookmarks: z.array(z.any()), category_id: z.number().int(), chunk_size: z.number().int(), closed: z.boolean(), created_at: z.string(), current_post_number: z.number().int().optional(), deleted_at: z.nullable(z.string()), deleted_by: z.nullable(z.string()), details: z.lazy(() => Details$inboundSchema), draft: z.nullable(z.string()), draft_key: z.string(), draft_sequence: z.number().int(), fancy_title: z.string(), featured_link: z.nullable(z.string()), has_deleted: z.boolean(), has_summary: z.boolean(), highest_post_number: z.nullable(z.number().int()), id: z.number().int(), image_url: z.nullable(z.string()), last_posted_at: z.nullable(z.string()), like_count: z.number().int(), message_bus_last_id: z.number().int(), participant_count: z.number().int(), pinned: z.boolean(), pinned_at: z.nullable(z.string()), pinned_globally: z.boolean(), pinned_until: z.nullable(z.string()), post_stream: z.lazy(() => PostStream$inboundSchema), posts_count: z.number().int(), reply_count: z.number().int(), show_read_indicator: z.boolean(), slow_mode_enabled_until: z.nullable(z.string()), slow_mode_seconds: z.number().int(), slug: z.string(), suggested_topics: z.array(z.lazy(() => SuggestedTopics$inboundSchema)), summarizable: z.boolean(), tags: z.array(z.any()), tags_descriptions: z.lazy(() => TagsDescriptions$inboundSchema), thumbnails: z.nullable(z.string()), timeline_lookup: z.array(z.any()), title: z.string(), topic_timer: z.nullable(z.string()), unpinned: z.nullable(z.string()), user_id: z.number().int(), views: z.number().int(), visible: z.boolean(), word_count: z.nullable(z.number().int()), }).transform((v) => { return remap$(v, { "actions_summary": "actionsSummary", "category_id": "categoryId", "chunk_size": "chunkSize", "created_at": "createdAt", "current_post_number": "currentPostNumber", "deleted_at": "deletedAt", "deleted_by": "deletedBy", "draft_key": "draftKey", "draft_sequence": "draftSequence", "fancy_title": "fancyTitle", "featured_link": "featuredLink", "has_deleted": "hasDeleted", "has_summary": "hasSummary", "highest_post_number": "highestPostNumber", "image_url": "imageUrl", "last_posted_at": "lastPostedAt", "like_count": "likeCount", "message_bus_last_id": "messageBusLastId", "participant_count": "participantCount", "pinned_at": "pinnedAt", "pinned_globally": "pinnedGlobally", "pinned_until": "pinnedUntil", "post_stream": "postStream", "posts_count": "postsCount", "reply_count": "replyCount", "show_read_indicator": "showReadIndicator", "slow_mode_enabled_until": "slowModeEnabledUntil", "slow_mode_seconds": "slowModeSeconds", "suggested_topics": "suggestedTopics", "tags_descriptions": "tagsDescriptions", "timeline_lookup": "timelineLookup", "topic_timer": "topicTimer", "user_id": "userId", "word_count": "wordCount", }); }); /** @internal */ export type GetTopicResponseBody$Outbound = { actions_summary: Array; archetype: string; archived: boolean; bookmarked: boolean; bookmarks: Array; category_id: number; chunk_size: number; closed: boolean; created_at: string; current_post_number?: number | undefined; deleted_at: string | null; deleted_by: string | null; details: Details$Outbound; draft: string | null; draft_key: string; draft_sequence: number; fancy_title: string; featured_link: string | null; has_deleted: boolean; has_summary: boolean; highest_post_number: number | null; id: number; image_url: string | null; last_posted_at: string | null; like_count: number; message_bus_last_id: number; participant_count: number; pinned: boolean; pinned_at: string | null; pinned_globally: boolean; pinned_until: string | null; post_stream: PostStream$Outbound; posts_count: number; reply_count: number; show_read_indicator: boolean; slow_mode_enabled_until: string | null; slow_mode_seconds: number; slug: string; suggested_topics: Array; summarizable: boolean; tags: Array; tags_descriptions: TagsDescriptions$Outbound; thumbnails: string | null; timeline_lookup: Array; title: string; topic_timer: string | null; unpinned: string | null; user_id: number; views: number; visible: boolean; word_count: number | null; }; /** @internal */ export const GetTopicResponseBody$outboundSchema: z.ZodType< GetTopicResponseBody$Outbound, z.ZodTypeDef, GetTopicResponseBody > = z.object({ actionsSummary: z.array(z.lazy(() => GetTopicActionsSummary$outboundSchema)), archetype: z.string(), archived: z.boolean(), bookmarked: z.boolean(), bookmarks: z.array(z.any()), categoryId: z.number().int(), chunkSize: z.number().int(), closed: z.boolean(), createdAt: z.string(), currentPostNumber: z.number().int().optional(), deletedAt: z.nullable(z.string()), deletedBy: z.nullable(z.string()), details: z.lazy(() => Details$outboundSchema), draft: z.nullable(z.string()), draftKey: z.string(), draftSequence: z.number().int(), fancyTitle: z.string(), featuredLink: z.nullable(z.string()), hasDeleted: z.boolean(), hasSummary: z.boolean(), highestPostNumber: z.nullable(z.number().int()), id: z.number().int(), imageUrl: z.nullable(z.string()), lastPostedAt: z.nullable(z.string()), likeCount: z.number().int(), messageBusLastId: z.number().int(), participantCount: z.number().int(), pinned: z.boolean(), pinnedAt: z.nullable(z.string()), pinnedGlobally: z.boolean(), pinnedUntil: z.nullable(z.string()), postStream: z.lazy(() => PostStream$outboundSchema), postsCount: z.number().int(), replyCount: z.number().int(), showReadIndicator: z.boolean(), slowModeEnabledUntil: z.nullable(z.string()), slowModeSeconds: z.number().int(), slug: z.string(), suggestedTopics: z.array(z.lazy(() => SuggestedTopics$outboundSchema)), summarizable: z.boolean(), tags: z.array(z.any()), tagsDescriptions: z.lazy(() => TagsDescriptions$outboundSchema), thumbnails: z.nullable(z.string()), timelineLookup: z.array(z.any()), title: z.string(), topicTimer: z.nullable(z.string()), unpinned: z.nullable(z.string()), userId: z.number().int(), views: z.number().int(), visible: z.boolean(), wordCount: z.nullable(z.number().int()), }).transform((v) => { return remap$(v, { actionsSummary: "actions_summary", categoryId: "category_id", chunkSize: "chunk_size", createdAt: "created_at", currentPostNumber: "current_post_number", deletedAt: "deleted_at", deletedBy: "deleted_by", draftKey: "draft_key", draftSequence: "draft_sequence", fancyTitle: "fancy_title", featuredLink: "featured_link", hasDeleted: "has_deleted", hasSummary: "has_summary", highestPostNumber: "highest_post_number", imageUrl: "image_url", lastPostedAt: "last_posted_at", likeCount: "like_count", messageBusLastId: "message_bus_last_id", participantCount: "participant_count", pinnedAt: "pinned_at", pinnedGlobally: "pinned_globally", pinnedUntil: "pinned_until", postStream: "post_stream", postsCount: "posts_count", replyCount: "reply_count", showReadIndicator: "show_read_indicator", slowModeEnabledUntil: "slow_mode_enabled_until", slowModeSeconds: "slow_mode_seconds", suggestedTopics: "suggested_topics", tagsDescriptions: "tags_descriptions", timelineLookup: "timeline_lookup", topicTimer: "topic_timer", userId: "user_id", wordCount: "word_count", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTopicResponseBody$ { /** @deprecated use `GetTopicResponseBody$inboundSchema` instead. */ export const inboundSchema = GetTopicResponseBody$inboundSchema; /** @deprecated use `GetTopicResponseBody$outboundSchema` instead. */ export const outboundSchema = GetTopicResponseBody$outboundSchema; /** @deprecated use `GetTopicResponseBody$Outbound` instead. */ export type Outbound = GetTopicResponseBody$Outbound; }