/* * 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 PostRepliesRequest = { id: string; }; export type PostRepliesActionsSummary = { canAct: boolean; id: number; }; export type ReplyToUser = { avatarTemplate: string; name?: string | undefined; username: string; }; export type PostRepliesResponseBody = { actionsSummary: Array; admin: boolean; avatarTemplate: string; bookmarked: boolean; canDelete: boolean; canEdit: boolean; canRecover: boolean; canSeeHiddenPost: boolean; canViewEditHistory: boolean; canWiki: boolean; cooked: string; createdAt: string; deletedAt: string | null; displayUsername: string | null; editReason: string | null; flairBgColor: string | null; flairColor: string | null; flairGroupId?: string | null | undefined; flairName: string | null; flairUrl: string | null; hidden: boolean; id: number; incomingLinkCount: number; moderator: boolean; name: string | null; postNumber: number; postType: number; primaryGroupName: string | null; quoteCount: number; readersCount: number; reads: number; replyCount: number; replyToPostNumber: number; replyToUser: ReplyToUser; reviewableId: string | null; 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; }; /** @internal */ export const PostRepliesRequest$inboundSchema: z.ZodType< PostRepliesRequest, z.ZodTypeDef, unknown > = z.object({ id: z.string(), }); /** @internal */ export type PostRepliesRequest$Outbound = { id: string; }; /** @internal */ export const PostRepliesRequest$outboundSchema: z.ZodType< PostRepliesRequest$Outbound, z.ZodTypeDef, PostRepliesRequest > = z.object({ id: 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 PostRepliesRequest$ { /** @deprecated use `PostRepliesRequest$inboundSchema` instead. */ export const inboundSchema = PostRepliesRequest$inboundSchema; /** @deprecated use `PostRepliesRequest$outboundSchema` instead. */ export const outboundSchema = PostRepliesRequest$outboundSchema; /** @deprecated use `PostRepliesRequest$Outbound` instead. */ export type Outbound = PostRepliesRequest$Outbound; } /** @internal */ export const PostRepliesActionsSummary$inboundSchema: z.ZodType< PostRepliesActionsSummary, z.ZodTypeDef, unknown > = z.object({ can_act: z.boolean(), id: z.number().int(), }).transform((v) => { return remap$(v, { "can_act": "canAct", }); }); /** @internal */ export type PostRepliesActionsSummary$Outbound = { can_act: boolean; id: number; }; /** @internal */ export const PostRepliesActionsSummary$outboundSchema: z.ZodType< PostRepliesActionsSummary$Outbound, z.ZodTypeDef, PostRepliesActionsSummary > = 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 PostRepliesActionsSummary$ { /** @deprecated use `PostRepliesActionsSummary$inboundSchema` instead. */ export const inboundSchema = PostRepliesActionsSummary$inboundSchema; /** @deprecated use `PostRepliesActionsSummary$outboundSchema` instead. */ export const outboundSchema = PostRepliesActionsSummary$outboundSchema; /** @deprecated use `PostRepliesActionsSummary$Outbound` instead. */ export type Outbound = PostRepliesActionsSummary$Outbound; } /** @internal */ export const ReplyToUser$inboundSchema: z.ZodType< ReplyToUser, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string(), name: z.string().optional(), username: z.string(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type ReplyToUser$Outbound = { avatar_template: string; name?: string | undefined; username: string; }; /** @internal */ export const ReplyToUser$outboundSchema: z.ZodType< ReplyToUser$Outbound, z.ZodTypeDef, ReplyToUser > = z.object({ avatarTemplate: z.string(), name: z.string().optional(), 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 ReplyToUser$ { /** @deprecated use `ReplyToUser$inboundSchema` instead. */ export const inboundSchema = ReplyToUser$inboundSchema; /** @deprecated use `ReplyToUser$outboundSchema` instead. */ export const outboundSchema = ReplyToUser$outboundSchema; /** @deprecated use `ReplyToUser$Outbound` instead. */ export type Outbound = ReplyToUser$Outbound; } /** @internal */ export const PostRepliesResponseBody$inboundSchema: z.ZodType< PostRepliesResponseBody, z.ZodTypeDef, unknown > = z.object({ actions_summary: z.array( z.lazy(() => PostRepliesActionsSummary$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(), 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.nullable(z.string()), edit_reason: z.nullable(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()), hidden: z.boolean(), id: z.number().int(), incoming_link_count: z.number().int(), moderator: z.boolean(), name: z.nullable(z.string()), post_number: z.number().int(), post_type: z.number().int(), primary_group_name: z.nullable(z.string()), quote_count: z.number().int(), readers_count: z.number().int(), reads: z.number().int(), reply_count: z.number().int(), reply_to_post_number: z.number().int(), reply_to_user: z.lazy(() => ReplyToUser$inboundSchema), reviewable_id: z.nullable(z.string()), 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_group_id": "flairGroupId", "flair_name": "flairName", "flair_url": "flairUrl", "incoming_link_count": "incomingLinkCount", "post_number": "postNumber", "post_type": "postType", "primary_group_name": "primaryGroupName", "quote_count": "quoteCount", "readers_count": "readersCount", "reply_count": "replyCount", "reply_to_post_number": "replyToPostNumber", "reply_to_user": "replyToUser", "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 PostRepliesResponseBody$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; can_view_edit_history: boolean; can_wiki: boolean; cooked: string; created_at: string; deleted_at: string | null; display_username: string | null; edit_reason: string | null; flair_bg_color: string | null; flair_color: string | null; flair_group_id?: string | null | undefined; flair_name: string | null; flair_url: string | null; hidden: boolean; id: number; incoming_link_count: number; moderator: boolean; name: string | null; post_number: number; post_type: number; primary_group_name: string | null; quote_count: number; readers_count: number; reads: number; reply_count: number; reply_to_post_number: number; reply_to_user: ReplyToUser$Outbound; reviewable_id: string | null; 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 PostRepliesResponseBody$outboundSchema: z.ZodType< PostRepliesResponseBody$Outbound, z.ZodTypeDef, PostRepliesResponseBody > = z.object({ actionsSummary: z.array( z.lazy(() => PostRepliesActionsSummary$outboundSchema), ), admin: z.boolean(), avatarTemplate: z.string(), bookmarked: z.boolean(), canDelete: z.boolean(), canEdit: z.boolean(), canRecover: z.boolean(), canSeeHiddenPost: z.boolean(), canViewEditHistory: z.boolean(), canWiki: z.boolean(), cooked: z.string(), createdAt: z.string(), deletedAt: z.nullable(z.string()), displayUsername: z.nullable(z.string()), editReason: z.nullable(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()), hidden: z.boolean(), id: z.number().int(), incomingLinkCount: z.number().int(), moderator: z.boolean(), name: z.nullable(z.string()), postNumber: z.number().int(), postType: z.number().int(), primaryGroupName: z.nullable(z.string()), quoteCount: z.number().int(), readersCount: z.number().int(), reads: z.number().int(), replyCount: z.number().int(), replyToPostNumber: z.number().int(), replyToUser: z.lazy(() => ReplyToUser$outboundSchema), reviewableId: z.nullable(z.string()), 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", flairGroupId: "flair_group_id", flairName: "flair_name", flairUrl: "flair_url", incomingLinkCount: "incoming_link_count", postNumber: "post_number", postType: "post_type", primaryGroupName: "primary_group_name", quoteCount: "quote_count", readersCount: "readers_count", replyCount: "reply_count", replyToPostNumber: "reply_to_post_number", replyToUser: "reply_to_user", 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 PostRepliesResponseBody$ { /** @deprecated use `PostRepliesResponseBody$inboundSchema` instead. */ export const inboundSchema = PostRepliesResponseBody$inboundSchema; /** @deprecated use `PostRepliesResponseBody$outboundSchema` instead. */ export const outboundSchema = PostRepliesResponseBody$outboundSchema; /** @deprecated use `PostRepliesResponseBody$Outbound` instead. */ export type Outbound = PostRepliesResponseBody$Outbound; }