UNPKG

discord-api-spec

Version:

TypeScript types, flattened JS enums, and Zod schemas generated from [Discord’s OpenAPI spec](https://github.com/discord/discord-api-spec). Built daily for up-to-date data.

1,212 lines (1,151 loc) 313 kB
/* AUTO-GENERATED. DO NOT EDIT. */ import * as z from "zod/mini"; let zObject = z.object; export const setStrictObject = (strict) => (zObject = strict ? z.strictObject : z.object); export const AccountResponseSchema = /* @__PURE__ */ zObject({ id: /* @__PURE__ */ z.string(), name: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.string()), }); export const ActionRowComponentForMessageRequestSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(1), id: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.int32().check(/* @__PURE__ */ z.minimum(0))), components: /* @__PURE__ */ z .array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ButtonComponentForMessageRequestSchema), /* @__PURE__ */ z.lazy(() => ChannelSelectComponentForMessageRequestSchema), /* @__PURE__ */ z.lazy(() => MentionableSelectComponentForMessageRequestSchema), /* @__PURE__ */ z.lazy(() => RoleSelectComponentForMessageRequestSchema), /* @__PURE__ */ z.lazy(() => StringSelectComponentForMessageRequestSchema), /* @__PURE__ */ z.lazy(() => UserSelectComponentForMessageRequestSchema), ]), ) .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(5)), }); export const ActionRowComponentForModalRequestSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(1), id: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.int32().check(/* @__PURE__ */ z.minimum(0))), components: /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => TextInputComponentForModalRequestSchema)) .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(5)), }); export const ActionRowComponentResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(1), id: /* @__PURE__ */ z.int32(), components: /* @__PURE__ */ z.array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ButtonComponentResponseSchema), /* @__PURE__ */ z.lazy(() => ChannelSelectComponentResponseSchema), /* @__PURE__ */ z.lazy(() => MentionableSelectComponentResponseSchema), /* @__PURE__ */ z.lazy(() => RoleSelectComponentResponseSchema), /* @__PURE__ */ z.lazy(() => StringSelectComponentResponseSchema), /* @__PURE__ */ z.lazy(() => TextInputComponentResponseSchema), /* @__PURE__ */ z.lazy(() => UserSelectComponentResponseSchema), ]), ), }); export const ActionTypesSchema = /* @__PURE__ */ z.literal([ "TYPING_START", "INVITE_CREATE", "INVITE_DELETE", "WEBHOOKS_UPDATE", "CHANNEL_CREATE", "VOICE_CHANNEL_STATUS_UPDATE", "CHANNEL_UPDATE", "CHANNEL_DELETE", "CHANNEL_PINS_UPDATE", "THREAD_CREATE", "THREAD_UPDATE", "THREAD_DELETE", "THREAD_LIST_SYNC", "THREAD_MEMBER_UPDATE", "THREAD_MEMBERS_UPDATE", "GUILD_CREATE", "GUILD_UPDATE", "GUILD_DELETE", "GUILD_EMOJIS_UPDATE", "GUILD_STICKERS_UPDATE", "GUILD_INTEGRATIONS_UPDATE", "GUILD_MEMBER_ADD", "GUILD_MEMBER_UPDATE", "GUILD_MEMBER_REMOVE", "GUILD_BAN_ADD", "GUILD_BAN_REMOVE", "GUILD_ROLE_CREATE", "GUILD_ROLE_UPDATE", "GUILD_ROLE_DELETE", "GUILD_MEMBERS_CHUNK", "MESSAGE_CREATE", "MESSAGE_UPDATE", "MESSAGE_DELETE", "MESSAGE_DELETE_BULK", "MESSAGE_REACTION_ADD", "MESSAGE_REACTION_REMOVE", "MESSAGE_REACTION_REMOVE_ALL", "MESSAGE_REACTION_REMOVE_EMOJI", "USER_UPDATE", "ENTITLEMENT_CREATE", "ENTITLEMENT_UPDATE", "ENTITLEMENT_DELETE", "READY", "RESUMED", "PRESENCE_UPDATE", "VOICE_STATE_UPDATE", "VOICE_SERVER_UPDATE", "LOBBY_MESSAGE_CREATE", "LOBBY_MESSAGE_UPDATE", "LOBBY_MESSAGE_DELETE", "GAME_DIRECT_MESSAGE_CREATE", "GAME_DIRECT_MESSAGE_DELETE", "GAME_DIRECT_MESSAGE_UPDATE", "INTERACTION_CREATE", "INTEGRATION_CREATE", "INTEGRATION_UPDATE", "INTEGRATION_DELETE", "APPLICATION_COMMAND_PERMISSIONS_UPDATE", "APPLICATION_AUTHORIZED", "APPLICATION_DEAUTHORIZED", "STAGE_INSTANCE_CREATE", "STAGE_INSTANCE_UPDATE", "STAGE_INSTANCE_DELETE", "GUILD_AUDIT_LOG_ENTRY_CREATE", "GUILD_SCHEDULED_EVENT_CREATE", "GUILD_SCHEDULED_EVENT_UPDATE", "GUILD_SCHEDULED_EVENT_DELETE", "GUILD_SCHEDULED_EVENT_USER_ADD", "GUILD_SCHEDULED_EVENT_USER_REMOVE", "AUTO_MODERATION_RULE_CREATE", "AUTO_MODERATION_RULE_UPDATE", "AUTO_MODERATION_RULE_DELETE", "AUTO_MODERATION_ACTION_EXECUTION", "GUILD_SOUNDBOARD_SOUNDS_UPDATE", "GUILD_SOUNDBOARD_SOUND_CREATE", "GUILD_SOUNDBOARD_SOUND_UPDATE", "GUILD_SOUNDBOARD_SOUND_DELETE", "QUEST_USER_ENROLLMENT", "RATE_LIMITED", ]); export const ActivitiesAttachmentResponseSchema = /* @__PURE__ */ zObject({ attachment: /* @__PURE__ */ z.lazy(() => AttachmentResponseSchema), }); export const ActivityActionTypesSchema = /* @__PURE__ */ z.literal([1, 2, 3, 5, 6]); export const AfkTimeoutsSchema = /* @__PURE__ */ z.literal([60, 300, 900, 1800, 3600]); export const AllowedMentionTypesSchema = /* @__PURE__ */ z.literal(["users", "roles", "everyone"]); export const ApplicationCommandAttachmentOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(11), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandAttachmentOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(11), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandAutocompleteCallbackRequestSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(8), data: /* @__PURE__ */ z.union([ /* @__PURE__ */ z.undefined(), /* @__PURE__ */ z.lazy( () => InteractionApplicationCommandAutocompleteCallbackIntegerDataSchema, ), /* @__PURE__ */ z.lazy(() => InteractionApplicationCommandAutocompleteCallbackNumberDataSchema), /* @__PURE__ */ z.lazy(() => InteractionApplicationCommandAutocompleteCallbackStringDataSchema), ]), }); export const ApplicationCommandBooleanOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(5), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandBooleanOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(5), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandChannelOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(7), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), channel_types: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.array(/* @__PURE__ */ z.lazy(() => ChannelTypesSchema)), ), }); export const ApplicationCommandChannelOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(7), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), channel_types: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array(/* @__PURE__ */ z.lazy(() => ChannelTypesSchema)), ), }); export const ApplicationCommandCreateRequestSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(100)), ), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), options: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ApplicationCommandAttachmentOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandBooleanOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandChannelOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandIntegerOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandMentionableOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandNumberOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandRoleOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandStringOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandGroupOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandUserOptionSchema), ]), ) .check(/* @__PURE__ */ z.maxLength(25)), ), default_member_permissions: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .number() .check(/* @__PURE__ */ z.minimum(0), /* @__PURE__ */ z.maximum(18014398509481984)), ), dm_permission: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), contexts: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => InteractionContextTypeSchema)) .check(/* @__PURE__ */ z.minLength(1)), ), integration_types: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationIntegrationTypeSchema)) .check(/* @__PURE__ */ z.minLength(1)), ), handler: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => ApplicationCommandHandlerSchema)), type: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => ApplicationCommandTypeSchema)), }); export const ApplicationCommandHandlerSchema = /* @__PURE__ */ z.number(); export const ApplicationCommandIntegerOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(4), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), autocomplete: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), choices: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationCommandOptionIntegerChoiceSchema)) .check(/* @__PURE__ */ z.maxLength(25)), ), min_value: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => Int53TypeSchema)), max_value: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => Int53TypeSchema)), }); export const ApplicationCommandIntegerOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(4), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), autocomplete: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), choices: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array( /* @__PURE__ */ z.lazy(() => ApplicationCommandOptionIntegerChoiceResponseSchema), ), ), min_value: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => Int53TypeSchema)), max_value: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => Int53TypeSchema)), }); export const ApplicationCommandInteractionMetadataResponseSchema = /* @__PURE__ */ zObject({ id: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), type: /* @__PURE__ */ z.literal(2), user: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => UserResponseSchema)), authorizing_integration_owners: /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), ), original_response_message_id: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), ), target_user: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => UserResponseSchema)), target_message_id: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), }); export const ApplicationCommandMentionableOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(9), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandMentionableOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(9), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandNumberOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(10), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), autocomplete: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), choices: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationCommandOptionNumberChoiceSchema)) .check(/* @__PURE__ */ z.maxLength(25)), ), min_value: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.number()), max_value: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.number()), }); export const ApplicationCommandNumberOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(10), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), autocomplete: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), choices: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array( /* @__PURE__ */ z.lazy(() => ApplicationCommandOptionNumberChoiceResponseSchema), ), ), min_value: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.number()), max_value: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.number()), }); export const ApplicationCommandOptionIntegerChoiceSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), value: /* @__PURE__ */ z.lazy(() => Int53TypeSchema), }); export const ApplicationCommandOptionIntegerChoiceResponseSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), value: /* @__PURE__ */ z.lazy(() => Int53TypeSchema), }); export const ApplicationCommandOptionNumberChoiceSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), value: /* @__PURE__ */ z.number(), }); export const ApplicationCommandOptionNumberChoiceResponseSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), value: /* @__PURE__ */ z.number(), }); export const ApplicationCommandOptionStringChoiceSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), value: /* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(6000)), }); export const ApplicationCommandOptionStringChoiceResponseSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), value: /* @__PURE__ */ z.string(), }); export const ApplicationCommandOptionTypeSchema = /* @__PURE__ */ z.literal([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ]); export const ApplicationCommandPatchRequestPartialSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z.optional( /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(100)), ), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), options: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ApplicationCommandAttachmentOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandBooleanOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandChannelOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandIntegerOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandMentionableOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandNumberOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandRoleOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandStringOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandGroupOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandUserOptionSchema), ]), ) .check(/* @__PURE__ */ z.maxLength(25)), ), default_member_permissions: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .number() .check(/* @__PURE__ */ z.minimum(0), /* @__PURE__ */ z.maximum(18014398509481984)), ), dm_permission: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), contexts: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => InteractionContextTypeSchema)) .check(/* @__PURE__ */ z.minLength(1)), ), integration_types: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationIntegrationTypeSchema)) .check(/* @__PURE__ */ z.minLength(1)), ), handler: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => ApplicationCommandHandlerSchema)), }); export const ApplicationCommandPermissionSchema = /* @__PURE__ */ zObject({ id: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), type: /* @__PURE__ */ z.lazy(() => ApplicationCommandPermissionTypeSchema), permission: /* @__PURE__ */ z.boolean(), }); export const ApplicationCommandPermissionTypeSchema = /* @__PURE__ */ z.literal([1, 2, 3]); export const ApplicationCommandResponseSchema = /* @__PURE__ */ zObject({ id: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), application_id: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), version: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), default_member_permissions: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.string()), type: /* @__PURE__ */ z.lazy(() => ApplicationCommandTypeSchema), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), guild_id: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), dm_permission: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), contexts: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.array(/* @__PURE__ */ z.lazy(() => InteractionContextTypeSchema)), ), integration_types: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array(/* @__PURE__ */ z.lazy(() => ApplicationIntegrationTypeSchema)), ), options: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ApplicationCommandAttachmentOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandBooleanOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandChannelOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandIntegerOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandMentionableOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandNumberOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandRoleOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandStringOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandGroupOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandUserOptionResponseSchema), ]), ), ), nsfw: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandRoleOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(8), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandRoleOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(8), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandStringOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(3), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), autocomplete: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), min_length: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.number().check(/* @__PURE__ */ z.minimum(0), /* @__PURE__ */ z.maximum(6000)), ), max_length: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.number().check(/* @__PURE__ */ z.minimum(1), /* @__PURE__ */ z.maximum(6000)), ), choices: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationCommandOptionStringChoiceSchema)) .check(/* @__PURE__ */ z.maxLength(25)), ), }); export const ApplicationCommandStringOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(3), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), autocomplete: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), choices: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array( /* @__PURE__ */ z.lazy(() => ApplicationCommandOptionStringChoiceResponseSchema), ), ), min_length: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.int32()), max_length: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.int32()), }); export const ApplicationCommandSubcommandGroupOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(2), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), options: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandOptionSchema)) .check(/* @__PURE__ */ z.maxLength(25)), ), }); export const ApplicationCommandSubcommandGroupOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(2), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), options: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array( /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandOptionResponseSchema), ), ), }); export const ApplicationCommandSubcommandOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(1), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), options: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ApplicationCommandAttachmentOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandBooleanOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandChannelOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandIntegerOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandMentionableOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandNumberOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandRoleOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandStringOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandUserOptionSchema), ]), ) .check(/* @__PURE__ */ z.maxLength(25)), ), }); export const ApplicationCommandSubcommandOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(1), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), options: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ApplicationCommandAttachmentOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandBooleanOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandChannelOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandIntegerOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandMentionableOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandNumberOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandRoleOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandStringOptionResponseSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandUserOptionResponseSchema), ]), ), ), }); export const ApplicationCommandTypeSchema = /* @__PURE__ */ z.literal([1, 2, 3, 4]); export const ApplicationCommandUpdateRequestSchema = /* @__PURE__ */ zObject({ name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(100)), ), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), options: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array( /* @__PURE__ */ z.union([ /* @__PURE__ */ z.lazy(() => ApplicationCommandAttachmentOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandBooleanOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandChannelOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandIntegerOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandMentionableOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandNumberOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandRoleOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandStringOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandGroupOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandSubcommandOptionSchema), /* @__PURE__ */ z.lazy(() => ApplicationCommandUserOptionSchema), ]), ) .check(/* @__PURE__ */ z.maxLength(25)), ), default_member_permissions: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .number() .check(/* @__PURE__ */ z.minimum(0), /* @__PURE__ */ z.maximum(18014398509481984)), ), dm_permission: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), contexts: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => InteractionContextTypeSchema)) .check(/* @__PURE__ */ z.minLength(1)), ), integration_types: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.lazy(() => ApplicationIntegrationTypeSchema)) .check(/* @__PURE__ */ z.minLength(1)), ), handler: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => ApplicationCommandHandlerSchema)), type: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => ApplicationCommandTypeSchema)), id: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), }); export const ApplicationCommandUserOptionSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(6), name: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(32)), ), ), description: /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.minLength(1), /* @__PURE__ */ z.maxLength(100)), ), ), required: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.boolean()), }); export const ApplicationCommandUserOptionResponseSchema = /* @__PURE__ */ zObject({ type: /* @__PURE__ */ z.literal(6), name: /* @__PURE__ */ z.string(), name_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), name_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), description: /* @__PURE__ */ z.string(), description_localized: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), description_localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record(/* @__PURE__ */ z.string(), /* @__PURE__ */ z.string()), ), required: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), }); export const ApplicationEventWebhooksStatusSchema = /* @__PURE__ */ z.literal([1, 2, 3]); export const ApplicationExplicitContentFilterTypesSchema = /* @__PURE__ */ z.literal([0, 1]); export const ApplicationFormPartialSchema = /* @__PURE__ */ zObject({ description: /* @__PURE__ */ z.nullish( /* @__PURE__ */ zObject({ default: /* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(400)), localizations: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(400)), ), ), }), ), icon: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.string()), cover_image: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.string()), team_id: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), flags: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.number()), interactions_endpoint_url: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.maxLength(2048)) .check(/* @__PURE__ */ z.url()), ), explicit_content_filter: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.lazy(() => ApplicationExplicitContentFilterTypesSchema), ), max_participants: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.int32().check(/* @__PURE__ */ z.minimum(-1)), ), type: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => ApplicationTypesSchema)), tags: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.string().check(/* @__PURE__ */ z.maxLength(20))) .check(/* @__PURE__ */ z.maxLength(5)), ), custom_install_url: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.maxLength(2048)) .check(/* @__PURE__ */ z.url()), ), install_params: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.lazy(() => ApplicationOAuth2InstallParamsSchema), ), role_connections_verification_url: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.maxLength(2048)) .check(/* @__PURE__ */ z.url()), ), integration_types_config: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.record( /* @__PURE__ */ z.string(), /* @__PURE__ */ z.nullable( /* @__PURE__ */ z.lazy(() => ApplicationIntegrationTypeConfigurationSchema), ), ), ), event_webhooks_status: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.literal([1, 2])), event_webhooks_url: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .string() .check(/* @__PURE__ */ z.maxLength(2048)) .check(/* @__PURE__ */ z.url()), ), event_webhooks_types: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.array( /* @__PURE__ */ z.literal([ "APPLICATION_AUTHORIZED", "APPLICATION_DEAUTHORIZED", "ENTITLEMENT_CREATE", "ENTITLEMENT_DELETE", "ENTITLEMENT_UPDATE", "GAME_DIRECT_MESSAGE_CREATE", "GAME_DIRECT_MESSAGE_DELETE", "GAME_DIRECT_MESSAGE_UPDATE", "LOBBY_MESSAGE_CREATE", "LOBBY_MESSAGE_DELETE", "LOBBY_MESSAGE_UPDATE", "QUEST_USER_ENROLLMENT", ]), ), ), }); export const ApplicationIdentityProviderAuthTypeSchema = /* @__PURE__ */ z.literal([ "OIDC", "EPIC_ONLINE_SERVICES_ACCESS_TOKEN", "EPIC_ONLINE_SERVICES_ID_TOKEN", "STEAM_SESSION_TICKET", "UNITY_SERVICES_ID_TOKEN", "DISCORD_BOT_ISSUED_ACCESS_TOKEN", "APPLE_ID_TOKEN", "PLAYSTATION_NETWORK_ID_TOKEN", ]); export const ApplicationIncomingWebhookResponseSchema = /* @__PURE__ */ zObject({ application_id: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), avatar: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.string()), channel_id: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), guild_id: /* @__PURE__ */ z.nullish(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), id: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), name: /* @__PURE__ */ z.string(), type: /* @__PURE__ */ z.literal(3), user: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => UserResponseSchema)), }); export const ApplicationIntegrationTypeSchema = /* @__PURE__ */ z.literal([0, 1]); export const ApplicationIntegrationTypeConfigurationSchema = /* @__PURE__ */ zObject({ oauth2_install_params: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z.lazy(() => ApplicationOAuth2InstallParamsSchema), ), }); export const ApplicationIntegrationTypeConfigurationResponseSchema = /* @__PURE__ */ zObject({ oauth2_install_params: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.lazy(() => ApplicationOAuth2InstallParamsResponseSchema), ), }); export const ApplicationOAuth2InstallParamsSchema = /* @__PURE__ */ zObject({ scopes: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .array(/* @__PURE__ */ z.literal(["applications.commands", "bot"])) .check(/* @__PURE__ */ z.minLength(1)), ), permissions: /* @__PURE__ */ z.nullish( /* @__PURE__ */ z .number() .check(/* @__PURE__ */ z.minimum(0), /* @__PURE__ */ z.maximum(18014398509481984)), ), }); export const ApplicationOAuth2InstallParamsResponseSchema = /* @__PURE__ */ zObject({ scopes: /* @__PURE__ */ z.array(/* @__PURE__ */ z.literal(["applications.commands", "bot"])), permissions: /* @__PURE__ */ z.string(), }); export const ApplicationResponseSchema = /* @__PURE__ */ zObject({ id: /* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema), name: /* @__PURE__ */ z.string(), icon: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.string()), description: /* @__PURE__ */ z.string(), type: /* @__PURE__ */ z.nullable(/* @__PURE__ */ z.lazy(() => ApplicationTypesSchema)), cover_image: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), primary_sku_id: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), bot: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => UserResponseSchema)), slug: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.string()), guild_id: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.lazy(() => SnowflakeTypeSchema)), rpc_origins: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.array(/* @__PURE__ */ z.string())), bot_public: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), bot_require_code_grant: /* @__PURE__ */ z.optional(/* @__PURE__ */ z.boolean()), terms_of_service_url: /* @__PURE__ */ z.optional( /* @__PURE__ */ z.string(