UNPKG

@guildxyz/bev3

Version:

Schemas and types related to the Guild.xyz v3 API

70 lines (67 loc) 1.85 kB
import { z } from 'zod'; export const RewardInputSchema = z.object({ name: z .string() .min(1) .max(255) .describe("Name of the template (1-255 characters)"), urlName: z .string() .max(255) .describe("URL-friendly name (optional, max 255 characters)") .optional(), description: z .string() .max(3000) .describe( "Detailed description of the template (optional, max 3000 characters)", ) .optional(), imageUrl: z .string() .max(255) .describe("URL to the template's primary image") .optional(), backgroundImageUrl: z .string() .max(255) .describe("URL to the template's background image") .optional(), visibility: z .object({}) .catchall(z.any()) .describe("Conditions that determine template visibility") .optional(), settings: z .object({}) .catchall(z.any()) .describe("Template-specific settings") .optional(), searchTags: z .array(z.string().max(50)) .max(20) .describe("Tags used for template search functionality") .optional(), categoryTags: z .array(z.string().max(30)) .max(10) .describe("Category classification tags") .optional(), roleId: z.string().describe("ID of the associated role").optional(), guildPlatformId: z .string() .describe("ID of the associated guild platform") .optional(), externalId: z.string().describe("Platform-specific role ID").optional(), foreignEntity: z .string() .describe("The entity that the reward is associated with") .optional(), foreignIdentifier: z .string() .describe("The identifier of the entity that the reward is associated with") .optional(), type: z.enum(["GUILD", "POINTS", "DISCORD"]).describe("The type of reward"), }) .strict() .describe("User input for a reward");