/* * 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 GetTagRequest = { name: string; }; export type GetTagTags = { id?: number | undefined; name?: string | undefined; staff?: boolean | undefined; topicCount?: number | undefined; }; export type GetTagPosters = { description?: string | undefined; extras?: string | undefined; primaryGroupId?: string | null | undefined; userId?: number | undefined; }; export type GetTagTopics = { 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 | null | undefined; lastPostedAt?: string | undefined; lastPosterUsername?: string | undefined; lastReadPostNumber?: number | undefined; likeCount?: number | undefined; liked?: boolean | undefined; notificationLevel?: number | undefined; pinned?: boolean | undefined; pinnedGlobally?: boolean | undefined; posters?: Array | undefined; postsCount?: number | undefined; replyCount?: number | undefined; slug?: string | undefined; tags?: Array | undefined; title?: string | undefined; unpinned?: string | null | undefined; unreadPosts?: number | undefined; unseen?: boolean | undefined; views?: number | undefined; visible?: boolean | undefined; }; export type GetTagTopicList = { canCreateTopic?: boolean | undefined; draft?: string | null | undefined; draftKey?: string | undefined; draftSequence?: number | undefined; perPage?: number | undefined; tags?: Array | undefined; topics?: Array | undefined; }; export type GetTagUsers = { avatarTemplate?: string | undefined; id?: number | undefined; name?: string | null | undefined; username?: string | undefined; }; /** * notifications */ export type GetTagResponseBody = { primaryGroups?: Array | undefined; topicList?: GetTagTopicList | undefined; users?: Array | undefined; }; /** @internal */ export const GetTagRequest$inboundSchema: z.ZodType< GetTagRequest, z.ZodTypeDef, unknown > = z.object({ name: z.string(), }); /** @internal */ export type GetTagRequest$Outbound = { name: string; }; /** @internal */ export const GetTagRequest$outboundSchema: z.ZodType< GetTagRequest$Outbound, z.ZodTypeDef, GetTagRequest > = z.object({ name: 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 GetTagRequest$ { /** @deprecated use `GetTagRequest$inboundSchema` instead. */ export const inboundSchema = GetTagRequest$inboundSchema; /** @deprecated use `GetTagRequest$outboundSchema` instead. */ export const outboundSchema = GetTagRequest$outboundSchema; /** @deprecated use `GetTagRequest$Outbound` instead. */ export type Outbound = GetTagRequest$Outbound; } /** @internal */ export const GetTagTags$inboundSchema: z.ZodType< GetTagTags, z.ZodTypeDef, unknown > = z.object({ id: z.number().int().optional(), name: z.string().optional(), staff: z.boolean().optional(), topic_count: z.number().int().optional(), }).transform((v) => { return remap$(v, { "topic_count": "topicCount", }); }); /** @internal */ export type GetTagTags$Outbound = { id?: number | undefined; name?: string | undefined; staff?: boolean | undefined; topic_count?: number | undefined; }; /** @internal */ export const GetTagTags$outboundSchema: z.ZodType< GetTagTags$Outbound, z.ZodTypeDef, GetTagTags > = z.object({ id: z.number().int().optional(), name: z.string().optional(), staff: z.boolean().optional(), topicCount: z.number().int().optional(), }).transform((v) => { return remap$(v, { topicCount: "topic_count", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace GetTagTags$ { /** @deprecated use `GetTagTags$inboundSchema` instead. */ export const inboundSchema = GetTagTags$inboundSchema; /** @deprecated use `GetTagTags$outboundSchema` instead. */ export const outboundSchema = GetTagTags$outboundSchema; /** @deprecated use `GetTagTags$Outbound` instead. */ export type Outbound = GetTagTags$Outbound; } /** @internal */ export const GetTagPosters$inboundSchema: z.ZodType< GetTagPosters, 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 GetTagPosters$Outbound = { description?: string | undefined; extras?: string | undefined; primary_group_id?: string | null | undefined; user_id?: number | undefined; }; /** @internal */ export const GetTagPosters$outboundSchema: z.ZodType< GetTagPosters$Outbound, z.ZodTypeDef, GetTagPosters > = 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 GetTagPosters$ { /** @deprecated use `GetTagPosters$inboundSchema` instead. */ export const inboundSchema = GetTagPosters$inboundSchema; /** @deprecated use `GetTagPosters$outboundSchema` instead. */ export const outboundSchema = GetTagPosters$outboundSchema; /** @deprecated use `GetTagPosters$Outbound` instead. */ export type Outbound = GetTagPosters$Outbound; } /** @internal */ export const GetTagTopics$inboundSchema: z.ZodType< GetTagTopics, 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.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(), pinned: z.boolean().optional(), pinned_globally: z.boolean().optional(), posters: z.array(z.lazy(() => GetTagPosters$inboundSchema)).optional(), posts_count: z.number().int().optional(), reply_count: z.number().int().optional(), slug: z.string().optional(), tags: z.array(z.any()).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", "pinned_globally": "pinnedGlobally", "posts_count": "postsCount", "reply_count": "replyCount", "unread_posts": "unreadPosts", }); }); /** @internal */ export type GetTagTopics$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 | 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; pinned?: boolean | undefined; pinned_globally?: boolean | undefined; posters?: Array | undefined; posts_count?: number | undefined; reply_count?: number | undefined; slug?: string | undefined; tags?: Array | undefined; title?: string | undefined; unpinned?: string | null | undefined; unread_posts?: number | undefined; unseen?: boolean | undefined; views?: number | undefined; visible?: boolean | undefined; }; /** @internal */ export const GetTagTopics$outboundSchema: z.ZodType< GetTagTopics$Outbound, z.ZodTypeDef, GetTagTopics > = 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.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(), pinned: z.boolean().optional(), pinnedGlobally: z.boolean().optional(), posters: z.array(z.lazy(() => GetTagPosters$outboundSchema)).optional(), postsCount: z.number().int().optional(), replyCount: z.number().int().optional(), slug: z.string().optional(), tags: z.array(z.any()).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", 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 GetTagTopics$ { /** @deprecated use `GetTagTopics$inboundSchema` instead. */ export const inboundSchema = GetTagTopics$inboundSchema; /** @deprecated use `GetTagTopics$outboundSchema` instead. */ export const outboundSchema = GetTagTopics$outboundSchema; /** @deprecated use `GetTagTopics$Outbound` instead. */ export type Outbound = GetTagTopics$Outbound; } /** @internal */ export const GetTagTopicList$inboundSchema: z.ZodType< GetTagTopicList, 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(), tags: z.array(z.lazy(() => GetTagTags$inboundSchema)).optional(), topics: z.array(z.lazy(() => GetTagTopics$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "can_create_topic": "canCreateTopic", "draft_key": "draftKey", "draft_sequence": "draftSequence", "per_page": "perPage", }); }); /** @internal */ export type GetTagTopicList$Outbound = { can_create_topic?: boolean | undefined; draft?: string | null | undefined; draft_key?: string | undefined; draft_sequence?: number | undefined; per_page?: number | undefined; tags?: Array | undefined; topics?: Array | undefined; }; /** @internal */ export const GetTagTopicList$outboundSchema: z.ZodType< GetTagTopicList$Outbound, z.ZodTypeDef, GetTagTopicList > = 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(), tags: z.array(z.lazy(() => GetTagTags$outboundSchema)).optional(), topics: z.array(z.lazy(() => GetTagTopics$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 GetTagTopicList$ { /** @deprecated use `GetTagTopicList$inboundSchema` instead. */ export const inboundSchema = GetTagTopicList$inboundSchema; /** @deprecated use `GetTagTopicList$outboundSchema` instead. */ export const outboundSchema = GetTagTopicList$outboundSchema; /** @deprecated use `GetTagTopicList$Outbound` instead. */ export type Outbound = GetTagTopicList$Outbound; } /** @internal */ export const GetTagUsers$inboundSchema: z.ZodType< GetTagUsers, 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 GetTagUsers$Outbound = { avatar_template?: string | undefined; id?: number | undefined; name?: string | null | undefined; username?: string | undefined; }; /** @internal */ export const GetTagUsers$outboundSchema: z.ZodType< GetTagUsers$Outbound, z.ZodTypeDef, GetTagUsers > = 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 GetTagUsers$ { /** @deprecated use `GetTagUsers$inboundSchema` instead. */ export const inboundSchema = GetTagUsers$inboundSchema; /** @deprecated use `GetTagUsers$outboundSchema` instead. */ export const outboundSchema = GetTagUsers$outboundSchema; /** @deprecated use `GetTagUsers$Outbound` instead. */ export type Outbound = GetTagUsers$Outbound; } /** @internal */ export const GetTagResponseBody$inboundSchema: z.ZodType< GetTagResponseBody, z.ZodTypeDef, unknown > = z.object({ primary_groups: z.array(z.any()).optional(), topic_list: z.lazy(() => GetTagTopicList$inboundSchema).optional(), users: z.array(z.lazy(() => GetTagUsers$inboundSchema)).optional(), }).transform((v) => { return remap$(v, { "primary_groups": "primaryGroups", "topic_list": "topicList", }); }); /** @internal */ export type GetTagResponseBody$Outbound = { primary_groups?: Array | undefined; topic_list?: GetTagTopicList$Outbound | undefined; users?: Array | undefined; }; /** @internal */ export const GetTagResponseBody$outboundSchema: z.ZodType< GetTagResponseBody$Outbound, z.ZodTypeDef, GetTagResponseBody > = z.object({ primaryGroups: z.array(z.any()).optional(), topicList: z.lazy(() => GetTagTopicList$outboundSchema).optional(), users: z.array(z.lazy(() => GetTagUsers$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 GetTagResponseBody$ { /** @deprecated use `GetTagResponseBody$inboundSchema` instead. */ export const inboundSchema = GetTagResponseBody$inboundSchema; /** @deprecated use `GetTagResponseBody$outboundSchema` instead. */ export const outboundSchema = GetTagResponseBody$outboundSchema; /** @deprecated use `GetTagResponseBody$Outbound` instead. */ export type Outbound = GetTagResponseBody$Outbound; }