/* * 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 UpdateBadgeRequestBody = { /** * The ID for the badge type. 1 for Gold, 2 for Silver, 3 for Bronze. */ badgeTypeId: number; /** * The name for the new badge. */ name: string; }; export type UpdateBadgeRequest = { requestBody?: UpdateBadgeRequestBody | undefined; id: number; }; export type UpdateBadgeBadge = { allowTitle: boolean; autoRevoke: boolean; badgeGroupingId: number; badgeTypeId: number; description: string; enabled: boolean; grantCount: number; icon: string; id: number; imageUrl: string | null; listable: boolean; longDescription: string; manuallyGrantable: boolean; multipleGrant: boolean; name: string; query: string | null; showPosts: boolean; slug: string; system: boolean; targetPosts: boolean; trigger: string | null; }; export type UpdateBadgeBadgeTypes = { id: number; name: string; sortOrder: number; }; /** * success response */ export type UpdateBadgeResponseBody = { badge: UpdateBadgeBadge; badgeTypes: Array; }; /** @internal */ export const UpdateBadgeRequestBody$inboundSchema: z.ZodType< UpdateBadgeRequestBody, z.ZodTypeDef, unknown > = z.object({ badge_type_id: z.number().int(), name: z.string(), }).transform((v) => { return remap$(v, { "badge_type_id": "badgeTypeId", }); }); /** @internal */ export type UpdateBadgeRequestBody$Outbound = { badge_type_id: number; name: string; }; /** @internal */ export const UpdateBadgeRequestBody$outboundSchema: z.ZodType< UpdateBadgeRequestBody$Outbound, z.ZodTypeDef, UpdateBadgeRequestBody > = z.object({ badgeTypeId: z.number().int(), name: z.string(), }).transform((v) => { return remap$(v, { badgeTypeId: "badge_type_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeRequestBody$ { /** @deprecated use `UpdateBadgeRequestBody$inboundSchema` instead. */ export const inboundSchema = UpdateBadgeRequestBody$inboundSchema; /** @deprecated use `UpdateBadgeRequestBody$outboundSchema` instead. */ export const outboundSchema = UpdateBadgeRequestBody$outboundSchema; /** @deprecated use `UpdateBadgeRequestBody$Outbound` instead. */ export type Outbound = UpdateBadgeRequestBody$Outbound; } /** @internal */ export const UpdateBadgeRequest$inboundSchema: z.ZodType< UpdateBadgeRequest, z.ZodTypeDef, unknown > = z.object({ RequestBody: z.lazy(() => UpdateBadgeRequestBody$inboundSchema).optional(), id: z.number().int(), }).transform((v) => { return remap$(v, { "RequestBody": "requestBody", }); }); /** @internal */ export type UpdateBadgeRequest$Outbound = { RequestBody?: UpdateBadgeRequestBody$Outbound | undefined; id: number; }; /** @internal */ export const UpdateBadgeRequest$outboundSchema: z.ZodType< UpdateBadgeRequest$Outbound, z.ZodTypeDef, UpdateBadgeRequest > = z.object({ requestBody: z.lazy(() => UpdateBadgeRequestBody$outboundSchema).optional(), id: z.number().int(), }).transform((v) => { return remap$(v, { 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 UpdateBadgeRequest$ { /** @deprecated use `UpdateBadgeRequest$inboundSchema` instead. */ export const inboundSchema = UpdateBadgeRequest$inboundSchema; /** @deprecated use `UpdateBadgeRequest$outboundSchema` instead. */ export const outboundSchema = UpdateBadgeRequest$outboundSchema; /** @deprecated use `UpdateBadgeRequest$Outbound` instead. */ export type Outbound = UpdateBadgeRequest$Outbound; } /** @internal */ export const UpdateBadgeBadge$inboundSchema: z.ZodType< UpdateBadgeBadge, z.ZodTypeDef, unknown > = z.object({ allow_title: z.boolean(), auto_revoke: z.boolean(), badge_grouping_id: z.number().int(), badge_type_id: z.number().int(), description: z.string(), enabled: z.boolean(), grant_count: z.number().int(), icon: z.string(), id: z.number().int(), image_url: z.nullable(z.string()), listable: z.boolean(), long_description: z.string(), manually_grantable: z.boolean(), multiple_grant: z.boolean(), name: z.string(), query: z.nullable(z.string()), show_posts: z.boolean(), slug: z.string(), system: z.boolean(), target_posts: z.boolean(), trigger: z.nullable(z.string()), }).transform((v) => { return remap$(v, { "allow_title": "allowTitle", "auto_revoke": "autoRevoke", "badge_grouping_id": "badgeGroupingId", "badge_type_id": "badgeTypeId", "grant_count": "grantCount", "image_url": "imageUrl", "long_description": "longDescription", "manually_grantable": "manuallyGrantable", "multiple_grant": "multipleGrant", "show_posts": "showPosts", "target_posts": "targetPosts", }); }); /** @internal */ export type UpdateBadgeBadge$Outbound = { allow_title: boolean; auto_revoke: boolean; badge_grouping_id: number; badge_type_id: number; description: string; enabled: boolean; grant_count: number; icon: string; id: number; image_url: string | null; listable: boolean; long_description: string; manually_grantable: boolean; multiple_grant: boolean; name: string; query: string | null; show_posts: boolean; slug: string; system: boolean; target_posts: boolean; trigger: string | null; }; /** @internal */ export const UpdateBadgeBadge$outboundSchema: z.ZodType< UpdateBadgeBadge$Outbound, z.ZodTypeDef, UpdateBadgeBadge > = z.object({ allowTitle: z.boolean(), autoRevoke: z.boolean(), badgeGroupingId: z.number().int(), badgeTypeId: z.number().int(), description: z.string(), enabled: z.boolean(), grantCount: z.number().int(), icon: z.string(), id: z.number().int(), imageUrl: z.nullable(z.string()), listable: z.boolean(), longDescription: z.string(), manuallyGrantable: z.boolean(), multipleGrant: z.boolean(), name: z.string(), query: z.nullable(z.string()), showPosts: z.boolean(), slug: z.string(), system: z.boolean(), targetPosts: z.boolean(), trigger: z.nullable(z.string()), }).transform((v) => { return remap$(v, { allowTitle: "allow_title", autoRevoke: "auto_revoke", badgeGroupingId: "badge_grouping_id", badgeTypeId: "badge_type_id", grantCount: "grant_count", imageUrl: "image_url", longDescription: "long_description", manuallyGrantable: "manually_grantable", multipleGrant: "multiple_grant", showPosts: "show_posts", targetPosts: "target_posts", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeBadge$ { /** @deprecated use `UpdateBadgeBadge$inboundSchema` instead. */ export const inboundSchema = UpdateBadgeBadge$inboundSchema; /** @deprecated use `UpdateBadgeBadge$outboundSchema` instead. */ export const outboundSchema = UpdateBadgeBadge$outboundSchema; /** @deprecated use `UpdateBadgeBadge$Outbound` instead. */ export type Outbound = UpdateBadgeBadge$Outbound; } /** @internal */ export const UpdateBadgeBadgeTypes$inboundSchema: z.ZodType< UpdateBadgeBadgeTypes, z.ZodTypeDef, unknown > = z.object({ id: z.number().int(), name: z.string(), sort_order: z.number().int(), }).transform((v) => { return remap$(v, { "sort_order": "sortOrder", }); }); /** @internal */ export type UpdateBadgeBadgeTypes$Outbound = { id: number; name: string; sort_order: number; }; /** @internal */ export const UpdateBadgeBadgeTypes$outboundSchema: z.ZodType< UpdateBadgeBadgeTypes$Outbound, z.ZodTypeDef, UpdateBadgeBadgeTypes > = z.object({ id: z.number().int(), name: z.string(), sortOrder: z.number().int(), }).transform((v) => { return remap$(v, { sortOrder: "sort_order", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeBadgeTypes$ { /** @deprecated use `UpdateBadgeBadgeTypes$inboundSchema` instead. */ export const inboundSchema = UpdateBadgeBadgeTypes$inboundSchema; /** @deprecated use `UpdateBadgeBadgeTypes$outboundSchema` instead. */ export const outboundSchema = UpdateBadgeBadgeTypes$outboundSchema; /** @deprecated use `UpdateBadgeBadgeTypes$Outbound` instead. */ export type Outbound = UpdateBadgeBadgeTypes$Outbound; } /** @internal */ export const UpdateBadgeResponseBody$inboundSchema: z.ZodType< UpdateBadgeResponseBody, z.ZodTypeDef, unknown > = z.object({ badge: z.lazy(() => UpdateBadgeBadge$inboundSchema), badge_types: z.array(z.lazy(() => UpdateBadgeBadgeTypes$inboundSchema)), }).transform((v) => { return remap$(v, { "badge_types": "badgeTypes", }); }); /** @internal */ export type UpdateBadgeResponseBody$Outbound = { badge: UpdateBadgeBadge$Outbound; badge_types: Array; }; /** @internal */ export const UpdateBadgeResponseBody$outboundSchema: z.ZodType< UpdateBadgeResponseBody$Outbound, z.ZodTypeDef, UpdateBadgeResponseBody > = z.object({ badge: z.lazy(() => UpdateBadgeBadge$outboundSchema), badgeTypes: z.array(z.lazy(() => UpdateBadgeBadgeTypes$outboundSchema)), }).transform((v) => { return remap$(v, { badgeTypes: "badge_types", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace UpdateBadgeResponseBody$ { /** @deprecated use `UpdateBadgeResponseBody$inboundSchema` instead. */ export const inboundSchema = UpdateBadgeResponseBody$inboundSchema; /** @deprecated use `UpdateBadgeResponseBody$outboundSchema` instead. */ export const outboundSchema = UpdateBadgeResponseBody$outboundSchema; /** @deprecated use `UpdateBadgeResponseBody$Outbound` instead. */ export type Outbound = UpdateBadgeResponseBody$Outbound; }