/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; export const Asc = { True: "true", } as const; export type Asc = ClosedEnum; export const Order = { LikesReceived: "likes_received", LikesGiven: "likes_given", TopicCount: "topic_count", PostCount: "post_count", TopicsEntered: "topics_entered", PostsRead: "posts_read", DaysVisited: "days_visited", } as const; export type Order = ClosedEnum; export const Period = { Daily: "daily", Weekly: "weekly", Monthly: "monthly", Quarterly: "quarterly", Yearly: "yearly", All: "all", } as const; export type Period = ClosedEnum; export type ListUsersPublicRequest = { asc?: Asc | undefined; order: Order; page?: number | undefined; period: Period; }; export type ListUsersPublicUser = { avatarTemplate: string; id: number; name: string | null; title: string | null; username: string; }; export type DirectoryItems = { daysVisited: number; id: number; likesGiven: number; likesReceived: number; postCount: number; postsRead: number; topicCount: number; topicsEntered: number; user: ListUsersPublicUser; }; export type ListUsersPublicMeta = { lastUpdatedAt: string | null; loadMoreDirectoryItems: string; totalRowsDirectoryItems: number; }; /** * directory items response */ export type ListUsersPublicResponseBody = { directoryItems: Array; meta: ListUsersPublicMeta; }; /** @internal */ export const Asc$inboundSchema: z.ZodNativeEnum = z.nativeEnum(Asc); /** @internal */ export const Asc$outboundSchema: z.ZodNativeEnum = Asc$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Asc$ { /** @deprecated use `Asc$inboundSchema` instead. */ export const inboundSchema = Asc$inboundSchema; /** @deprecated use `Asc$outboundSchema` instead. */ export const outboundSchema = Asc$outboundSchema; } /** @internal */ export const Order$inboundSchema: z.ZodNativeEnum = z.nativeEnum( Order, ); /** @internal */ export const Order$outboundSchema: z.ZodNativeEnum = Order$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Order$ { /** @deprecated use `Order$inboundSchema` instead. */ export const inboundSchema = Order$inboundSchema; /** @deprecated use `Order$outboundSchema` instead. */ export const outboundSchema = Order$outboundSchema; } /** @internal */ export const Period$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Period); /** @internal */ export const Period$outboundSchema: z.ZodNativeEnum = Period$inboundSchema; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace Period$ { /** @deprecated use `Period$inboundSchema` instead. */ export const inboundSchema = Period$inboundSchema; /** @deprecated use `Period$outboundSchema` instead. */ export const outboundSchema = Period$outboundSchema; } /** @internal */ export const ListUsersPublicRequest$inboundSchema: z.ZodType< ListUsersPublicRequest, z.ZodTypeDef, unknown > = z.object({ asc: Asc$inboundSchema.optional(), order: Order$inboundSchema, page: z.number().int().optional(), period: Period$inboundSchema, }); /** @internal */ export type ListUsersPublicRequest$Outbound = { asc?: string | undefined; order: string; page?: number | undefined; period: string; }; /** @internal */ export const ListUsersPublicRequest$outboundSchema: z.ZodType< ListUsersPublicRequest$Outbound, z.ZodTypeDef, ListUsersPublicRequest > = z.object({ asc: Asc$outboundSchema.optional(), order: Order$outboundSchema, page: z.number().int().optional(), period: Period$outboundSchema, }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicRequest$ { /** @deprecated use `ListUsersPublicRequest$inboundSchema` instead. */ export const inboundSchema = ListUsersPublicRequest$inboundSchema; /** @deprecated use `ListUsersPublicRequest$outboundSchema` instead. */ export const outboundSchema = ListUsersPublicRequest$outboundSchema; /** @deprecated use `ListUsersPublicRequest$Outbound` instead. */ export type Outbound = ListUsersPublicRequest$Outbound; } /** @internal */ export const ListUsersPublicUser$inboundSchema: z.ZodType< ListUsersPublicUser, z.ZodTypeDef, unknown > = z.object({ avatar_template: z.string(), id: z.number().int(), name: z.nullable(z.string()), title: z.nullable(z.string()), username: z.string(), }).transform((v) => { return remap$(v, { "avatar_template": "avatarTemplate", }); }); /** @internal */ export type ListUsersPublicUser$Outbound = { avatar_template: string; id: number; name: string | null; title: string | null; username: string; }; /** @internal */ export const ListUsersPublicUser$outboundSchema: z.ZodType< ListUsersPublicUser$Outbound, z.ZodTypeDef, ListUsersPublicUser > = z.object({ avatarTemplate: z.string(), id: z.number().int(), name: z.nullable(z.string()), title: z.nullable(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 ListUsersPublicUser$ { /** @deprecated use `ListUsersPublicUser$inboundSchema` instead. */ export const inboundSchema = ListUsersPublicUser$inboundSchema; /** @deprecated use `ListUsersPublicUser$outboundSchema` instead. */ export const outboundSchema = ListUsersPublicUser$outboundSchema; /** @deprecated use `ListUsersPublicUser$Outbound` instead. */ export type Outbound = ListUsersPublicUser$Outbound; } /** @internal */ export const DirectoryItems$inboundSchema: z.ZodType< DirectoryItems, z.ZodTypeDef, unknown > = z.object({ days_visited: z.number().int(), id: z.number().int(), likes_given: z.number().int(), likes_received: z.number().int(), post_count: z.number().int(), posts_read: z.number().int(), topic_count: z.number().int(), topics_entered: z.number().int(), user: z.lazy(() => ListUsersPublicUser$inboundSchema), }).transform((v) => { return remap$(v, { "days_visited": "daysVisited", "likes_given": "likesGiven", "likes_received": "likesReceived", "post_count": "postCount", "posts_read": "postsRead", "topic_count": "topicCount", "topics_entered": "topicsEntered", }); }); /** @internal */ export type DirectoryItems$Outbound = { days_visited: number; id: number; likes_given: number; likes_received: number; post_count: number; posts_read: number; topic_count: number; topics_entered: number; user: ListUsersPublicUser$Outbound; }; /** @internal */ export const DirectoryItems$outboundSchema: z.ZodType< DirectoryItems$Outbound, z.ZodTypeDef, DirectoryItems > = z.object({ daysVisited: z.number().int(), id: z.number().int(), likesGiven: z.number().int(), likesReceived: z.number().int(), postCount: z.number().int(), postsRead: z.number().int(), topicCount: z.number().int(), topicsEntered: z.number().int(), user: z.lazy(() => ListUsersPublicUser$outboundSchema), }).transform((v) => { return remap$(v, { daysVisited: "days_visited", likesGiven: "likes_given", likesReceived: "likes_received", postCount: "post_count", postsRead: "posts_read", topicCount: "topic_count", topicsEntered: "topics_entered", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace DirectoryItems$ { /** @deprecated use `DirectoryItems$inboundSchema` instead. */ export const inboundSchema = DirectoryItems$inboundSchema; /** @deprecated use `DirectoryItems$outboundSchema` instead. */ export const outboundSchema = DirectoryItems$outboundSchema; /** @deprecated use `DirectoryItems$Outbound` instead. */ export type Outbound = DirectoryItems$Outbound; } /** @internal */ export const ListUsersPublicMeta$inboundSchema: z.ZodType< ListUsersPublicMeta, z.ZodTypeDef, unknown > = z.object({ last_updated_at: z.nullable(z.string()), load_more_directory_items: z.string(), total_rows_directory_items: z.number().int(), }).transform((v) => { return remap$(v, { "last_updated_at": "lastUpdatedAt", "load_more_directory_items": "loadMoreDirectoryItems", "total_rows_directory_items": "totalRowsDirectoryItems", }); }); /** @internal */ export type ListUsersPublicMeta$Outbound = { last_updated_at: string | null; load_more_directory_items: string; total_rows_directory_items: number; }; /** @internal */ export const ListUsersPublicMeta$outboundSchema: z.ZodType< ListUsersPublicMeta$Outbound, z.ZodTypeDef, ListUsersPublicMeta > = z.object({ lastUpdatedAt: z.nullable(z.string()), loadMoreDirectoryItems: z.string(), totalRowsDirectoryItems: z.number().int(), }).transform((v) => { return remap$(v, { lastUpdatedAt: "last_updated_at", loadMoreDirectoryItems: "load_more_directory_items", totalRowsDirectoryItems: "total_rows_directory_items", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicMeta$ { /** @deprecated use `ListUsersPublicMeta$inboundSchema` instead. */ export const inboundSchema = ListUsersPublicMeta$inboundSchema; /** @deprecated use `ListUsersPublicMeta$outboundSchema` instead. */ export const outboundSchema = ListUsersPublicMeta$outboundSchema; /** @deprecated use `ListUsersPublicMeta$Outbound` instead. */ export type Outbound = ListUsersPublicMeta$Outbound; } /** @internal */ export const ListUsersPublicResponseBody$inboundSchema: z.ZodType< ListUsersPublicResponseBody, z.ZodTypeDef, unknown > = z.object({ directory_items: z.array(z.lazy(() => DirectoryItems$inboundSchema)), meta: z.lazy(() => ListUsersPublicMeta$inboundSchema), }).transform((v) => { return remap$(v, { "directory_items": "directoryItems", }); }); /** @internal */ export type ListUsersPublicResponseBody$Outbound = { directory_items: Array; meta: ListUsersPublicMeta$Outbound; }; /** @internal */ export const ListUsersPublicResponseBody$outboundSchema: z.ZodType< ListUsersPublicResponseBody$Outbound, z.ZodTypeDef, ListUsersPublicResponseBody > = z.object({ directoryItems: z.array(z.lazy(() => DirectoryItems$outboundSchema)), meta: z.lazy(() => ListUsersPublicMeta$outboundSchema), }).transform((v) => { return remap$(v, { directoryItems: "directory_items", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListUsersPublicResponseBody$ { /** @deprecated use `ListUsersPublicResponseBody$inboundSchema` instead. */ export const inboundSchema = ListUsersPublicResponseBody$inboundSchema; /** @deprecated use `ListUsersPublicResponseBody$outboundSchema` instead. */ export const outboundSchema = ListUsersPublicResponseBody$outboundSchema; /** @deprecated use `ListUsersPublicResponseBody$Outbound` instead. */ export type Outbound = ListUsersPublicResponseBody$Outbound; }