/* * 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 CreateTopicTimerRequestBody = { basedOnLastPost?: boolean | undefined; categoryId?: number | undefined; statusType?: string | undefined; time?: string | undefined; }; export type CreateTopicTimerRequest = { apiKey: string; apiUsername: string; requestBody?: CreateTopicTimerRequestBody | undefined; id: string; }; /** * topic updated */ export type CreateTopicTimerResponseBody = { basedOnLastPost?: boolean | undefined; categoryId?: string | null | undefined; closed?: boolean | undefined; duration?: string | null | undefined; executeAt?: string | undefined; success?: string | undefined; }; /** @internal */ export const CreateTopicTimerRequestBody$inboundSchema: z.ZodType< CreateTopicTimerRequestBody, z.ZodTypeDef, unknown > = z.object({ based_on_last_post: z.boolean().optional(), category_id: z.number().int().optional(), status_type: z.string().optional(), time: z.string().optional(), }).transform((v) => { return remap$(v, { "based_on_last_post": "basedOnLastPost", "category_id": "categoryId", "status_type": "statusType", }); }); /** @internal */ export type CreateTopicTimerRequestBody$Outbound = { based_on_last_post?: boolean | undefined; category_id?: number | undefined; status_type?: string | undefined; time?: string | undefined; }; /** @internal */ export const CreateTopicTimerRequestBody$outboundSchema: z.ZodType< CreateTopicTimerRequestBody$Outbound, z.ZodTypeDef, CreateTopicTimerRequestBody > = z.object({ basedOnLastPost: z.boolean().optional(), categoryId: z.number().int().optional(), statusType: z.string().optional(), time: z.string().optional(), }).transform((v) => { return remap$(v, { basedOnLastPost: "based_on_last_post", categoryId: "category_id", statusType: "status_type", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicTimerRequestBody$ { /** @deprecated use `CreateTopicTimerRequestBody$inboundSchema` instead. */ export const inboundSchema = CreateTopicTimerRequestBody$inboundSchema; /** @deprecated use `CreateTopicTimerRequestBody$outboundSchema` instead. */ export const outboundSchema = CreateTopicTimerRequestBody$outboundSchema; /** @deprecated use `CreateTopicTimerRequestBody$Outbound` instead. */ export type Outbound = CreateTopicTimerRequestBody$Outbound; } /** @internal */ export const CreateTopicTimerRequest$inboundSchema: z.ZodType< CreateTopicTimerRequest, z.ZodTypeDef, unknown > = z.object({ "Api-Key": z.string(), "Api-Username": z.string(), RequestBody: z.lazy(() => CreateTopicTimerRequestBody$inboundSchema) .optional(), id: z.string(), }).transform((v) => { return remap$(v, { "Api-Key": "apiKey", "Api-Username": "apiUsername", "RequestBody": "requestBody", }); }); /** @internal */ export type CreateTopicTimerRequest$Outbound = { "Api-Key": string; "Api-Username": string; RequestBody?: CreateTopicTimerRequestBody$Outbound | undefined; id: string; }; /** @internal */ export const CreateTopicTimerRequest$outboundSchema: z.ZodType< CreateTopicTimerRequest$Outbound, z.ZodTypeDef, CreateTopicTimerRequest > = z.object({ apiKey: z.string(), apiUsername: z.string(), requestBody: z.lazy(() => CreateTopicTimerRequestBody$outboundSchema) .optional(), id: z.string(), }).transform((v) => { return remap$(v, { apiKey: "Api-Key", apiUsername: "Api-Username", requestBody: "RequestBody", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicTimerRequest$ { /** @deprecated use `CreateTopicTimerRequest$inboundSchema` instead. */ export const inboundSchema = CreateTopicTimerRequest$inboundSchema; /** @deprecated use `CreateTopicTimerRequest$outboundSchema` instead. */ export const outboundSchema = CreateTopicTimerRequest$outboundSchema; /** @deprecated use `CreateTopicTimerRequest$Outbound` instead. */ export type Outbound = CreateTopicTimerRequest$Outbound; } /** @internal */ export const CreateTopicTimerResponseBody$inboundSchema: z.ZodType< CreateTopicTimerResponseBody, z.ZodTypeDef, unknown > = z.object({ based_on_last_post: z.boolean().optional(), category_id: z.nullable(z.string()).optional(), closed: z.boolean().optional(), duration: z.nullable(z.string()).optional(), execute_at: z.string().optional(), success: z.string().optional(), }).transform((v) => { return remap$(v, { "based_on_last_post": "basedOnLastPost", "category_id": "categoryId", "execute_at": "executeAt", }); }); /** @internal */ export type CreateTopicTimerResponseBody$Outbound = { based_on_last_post?: boolean | undefined; category_id?: string | null | undefined; closed?: boolean | undefined; duration?: string | null | undefined; execute_at?: string | undefined; success?: string | undefined; }; /** @internal */ export const CreateTopicTimerResponseBody$outboundSchema: z.ZodType< CreateTopicTimerResponseBody$Outbound, z.ZodTypeDef, CreateTopicTimerResponseBody > = z.object({ basedOnLastPost: z.boolean().optional(), categoryId: z.nullable(z.string()).optional(), closed: z.boolean().optional(), duration: z.nullable(z.string()).optional(), executeAt: z.string().optional(), success: z.string().optional(), }).transform((v) => { return remap$(v, { basedOnLastPost: "based_on_last_post", categoryId: "category_id", executeAt: "execute_at", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace CreateTopicTimerResponseBody$ { /** @deprecated use `CreateTopicTimerResponseBody$inboundSchema` instead. */ export const inboundSchema = CreateTopicTimerResponseBody$inboundSchema; /** @deprecated use `CreateTopicTimerResponseBody$outboundSchema` instead. */ export const outboundSchema = CreateTopicTimerResponseBody$outboundSchema; /** @deprecated use `CreateTopicTimerResponseBody$Outbound` instead. */ export type Outbound = CreateTopicTimerResponseBody$Outbound; }