@mahesvara/discord-mcpserver 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/index.js +4 -2833
  2. package/dist/schemas/channel.d.ts +176 -0
  3. package/dist/schemas/channel.js +146 -0
  4. package/dist/schemas/common.d.ts +23 -0
  5. package/dist/schemas/common.js +71 -0
  6. package/dist/schemas/community.d.ts +181 -0
  7. package/dist/schemas/community.js +60 -0
  8. package/dist/schemas/emoji.d.ts +59 -0
  9. package/dist/schemas/emoji.js +29 -0
  10. package/dist/schemas/event.d.ts +62 -0
  11. package/dist/schemas/event.js +33 -0
  12. package/dist/schemas/guild.d.ts +85 -0
  13. package/dist/schemas/guild.js +42 -0
  14. package/dist/schemas/index.d.ts +12 -855
  15. package/dist/schemas/index.js +13 -617
  16. package/dist/schemas/invite.d.ts +40 -0
  17. package/dist/schemas/invite.js +32 -0
  18. package/dist/schemas/member.d.ts +60 -0
  19. package/dist/schemas/member.js +33 -0
  20. package/dist/schemas/message.d.ts +121 -0
  21. package/dist/schemas/message.js +61 -0
  22. package/dist/schemas/moderation.d.ts +343 -0
  23. package/dist/schemas/moderation.js +152 -0
  24. package/dist/schemas/role.d.ts +126 -0
  25. package/dist/schemas/role.js +73 -0
  26. package/dist/schemas/webhook.d.ts +51 -0
  27. package/dist/schemas/webhook.js +33 -0
  28. package/dist/server.d.ts +2 -0
  29. package/dist/server.js +6 -0
  30. package/dist/tools/channel.d.ts +2 -0
  31. package/dist/tools/channel.js +572 -0
  32. package/dist/tools/community.d.ts +2 -0
  33. package/dist/tools/community.js +268 -0
  34. package/dist/tools/emoji.d.ts +2 -0
  35. package/dist/tools/emoji.js +247 -0
  36. package/dist/tools/event.d.ts +2 -0
  37. package/dist/tools/event.js +170 -0
  38. package/dist/tools/guild.d.ts +2 -0
  39. package/dist/tools/guild.js +198 -0
  40. package/dist/tools/index.d.ts +2 -0
  41. package/dist/tools/index.js +24 -0
  42. package/dist/tools/invite.d.ts +2 -0
  43. package/dist/tools/invite.js +143 -0
  44. package/dist/tools/member.d.ts +2 -0
  45. package/dist/tools/member.js +200 -0
  46. package/dist/tools/message.d.ts +2 -0
  47. package/dist/tools/message.js +386 -0
  48. package/dist/tools/moderation.d.ts +2 -0
  49. package/dist/tools/moderation.js +641 -0
  50. package/dist/tools/role.d.ts +2 -0
  51. package/dist/tools/role.js +420 -0
  52. package/dist/tools/webhook.d.ts +2 -0
  53. package/dist/tools/webhook.js +199 -0
  54. package/package.json +1 -1
@@ -0,0 +1,176 @@
1
+ import { z } from "zod";
2
+ export declare const ListChannelsSchema: z.ZodObject<{
3
+ guild_id: z.ZodString;
4
+ type: z.ZodDefault<z.ZodEnum<["text", "voice", "category", "all"]>>;
5
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
6
+ }, "strict", z.ZodTypeAny, {
7
+ type: "text" | "voice" | "category" | "all";
8
+ response_format: import("../types.js").ResponseFormat;
9
+ guild_id: string;
10
+ }, {
11
+ guild_id: string;
12
+ type?: "text" | "voice" | "category" | "all" | undefined;
13
+ response_format?: import("../types.js").ResponseFormat | undefined;
14
+ }>;
15
+ export declare const GetChannelSchema: z.ZodObject<{
16
+ channel_id: z.ZodString;
17
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
18
+ }, "strict", z.ZodTypeAny, {
19
+ response_format: import("../types.js").ResponseFormat;
20
+ channel_id: string;
21
+ }, {
22
+ channel_id: string;
23
+ response_format?: import("../types.js").ResponseFormat | undefined;
24
+ }>;
25
+ export declare const CreateChannelSchema: z.ZodObject<{
26
+ guild_id: z.ZodString;
27
+ name: z.ZodString;
28
+ type: z.ZodDefault<z.ZodEnum<["text", "voice", "category", "forum"]>>;
29
+ topic: z.ZodOptional<z.ZodString>;
30
+ parent_id: z.ZodOptional<z.ZodString>;
31
+ nsfw: z.ZodOptional<z.ZodBoolean>;
32
+ bitrate: z.ZodOptional<z.ZodNumber>;
33
+ user_limit: z.ZodOptional<z.ZodNumber>;
34
+ default_reaction_emoji: z.ZodOptional<z.ZodString>;
35
+ default_sort_order: z.ZodOptional<z.ZodEnum<["latest_activity", "creation_date"]>>;
36
+ default_forum_layout: z.ZodOptional<z.ZodEnum<["not_set", "list_view", "gallery_view"]>>;
37
+ }, "strict", z.ZodTypeAny, {
38
+ name: string;
39
+ type: "text" | "voice" | "category" | "forum";
40
+ guild_id: string;
41
+ topic?: string | undefined;
42
+ parent_id?: string | undefined;
43
+ nsfw?: boolean | undefined;
44
+ bitrate?: number | undefined;
45
+ user_limit?: number | undefined;
46
+ default_reaction_emoji?: string | undefined;
47
+ default_sort_order?: "latest_activity" | "creation_date" | undefined;
48
+ default_forum_layout?: "not_set" | "list_view" | "gallery_view" | undefined;
49
+ }, {
50
+ name: string;
51
+ guild_id: string;
52
+ type?: "text" | "voice" | "category" | "forum" | undefined;
53
+ topic?: string | undefined;
54
+ parent_id?: string | undefined;
55
+ nsfw?: boolean | undefined;
56
+ bitrate?: number | undefined;
57
+ user_limit?: number | undefined;
58
+ default_reaction_emoji?: string | undefined;
59
+ default_sort_order?: "latest_activity" | "creation_date" | undefined;
60
+ default_forum_layout?: "not_set" | "list_view" | "gallery_view" | undefined;
61
+ }>;
62
+ export declare const DeleteChannelSchema: z.ZodObject<{
63
+ channel_id: z.ZodString;
64
+ }, "strict", z.ZodTypeAny, {
65
+ channel_id: string;
66
+ }, {
67
+ channel_id: string;
68
+ }>;
69
+ export declare const EditChannelSchema: z.ZodObject<{
70
+ channel_id: z.ZodString;
71
+ name: z.ZodOptional<z.ZodString>;
72
+ topic: z.ZodOptional<z.ZodString>;
73
+ parent_id: z.ZodOptional<z.ZodString>;
74
+ position: z.ZodOptional<z.ZodNumber>;
75
+ nsfw: z.ZodOptional<z.ZodBoolean>;
76
+ bitrate: z.ZodOptional<z.ZodNumber>;
77
+ user_limit: z.ZodOptional<z.ZodNumber>;
78
+ default_reaction_emoji: z.ZodOptional<z.ZodString>;
79
+ default_sort_order: z.ZodOptional<z.ZodEnum<["latest_activity", "creation_date"]>>;
80
+ default_forum_layout: z.ZodOptional<z.ZodEnum<["not_set", "list_view", "gallery_view"]>>;
81
+ }, "strict", z.ZodTypeAny, {
82
+ channel_id: string;
83
+ name?: string | undefined;
84
+ topic?: string | undefined;
85
+ parent_id?: string | undefined;
86
+ nsfw?: boolean | undefined;
87
+ bitrate?: number | undefined;
88
+ user_limit?: number | undefined;
89
+ default_reaction_emoji?: string | undefined;
90
+ default_sort_order?: "latest_activity" | "creation_date" | undefined;
91
+ default_forum_layout?: "not_set" | "list_view" | "gallery_view" | undefined;
92
+ position?: number | undefined;
93
+ }, {
94
+ channel_id: string;
95
+ name?: string | undefined;
96
+ topic?: string | undefined;
97
+ parent_id?: string | undefined;
98
+ nsfw?: boolean | undefined;
99
+ bitrate?: number | undefined;
100
+ user_limit?: number | undefined;
101
+ default_reaction_emoji?: string | undefined;
102
+ default_sort_order?: "latest_activity" | "creation_date" | undefined;
103
+ default_forum_layout?: "not_set" | "list_view" | "gallery_view" | undefined;
104
+ position?: number | undefined;
105
+ }>;
106
+ export declare const PermissionOverwriteSchema: z.ZodObject<{
107
+ id: z.ZodString;
108
+ type: z.ZodEnum<["role", "member"]>;
109
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
110
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ type: "role" | "member";
113
+ id: string;
114
+ allow?: string[] | undefined;
115
+ deny?: string[] | undefined;
116
+ }, {
117
+ type: "role" | "member";
118
+ id: string;
119
+ allow?: string[] | undefined;
120
+ deny?: string[] | undefined;
121
+ }>;
122
+ export declare const SetChannelPermissionsSchema: z.ZodObject<{
123
+ channel_id: z.ZodString;
124
+ target_id: z.ZodString;
125
+ target_type: z.ZodEnum<["role", "member"]>;
126
+ allow: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
127
+ deny: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
128
+ }, "strict", z.ZodTypeAny, {
129
+ channel_id: string;
130
+ target_id: string;
131
+ target_type: "role" | "member";
132
+ allow?: string[] | undefined;
133
+ deny?: string[] | undefined;
134
+ }, {
135
+ channel_id: string;
136
+ target_id: string;
137
+ target_type: "role" | "member";
138
+ allow?: string[] | undefined;
139
+ deny?: string[] | undefined;
140
+ }>;
141
+ export declare const RemoveChannelPermissionsSchema: z.ZodObject<{
142
+ channel_id: z.ZodString;
143
+ target_id: z.ZodString;
144
+ }, "strict", z.ZodTypeAny, {
145
+ channel_id: string;
146
+ target_id: string;
147
+ }, {
148
+ channel_id: string;
149
+ target_id: string;
150
+ }>;
151
+ export declare const GetChannelPermissionsSchema: z.ZodObject<{
152
+ channel_id: z.ZodString;
153
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
154
+ }, "strict", z.ZodTypeAny, {
155
+ response_format: import("../types.js").ResponseFormat;
156
+ channel_id: string;
157
+ }, {
158
+ channel_id: string;
159
+ response_format?: import("../types.js").ResponseFormat | undefined;
160
+ }>;
161
+ export declare const SyncChannelPermissionsSchema: z.ZodObject<{
162
+ channel_id: z.ZodString;
163
+ }, "strict", z.ZodTypeAny, {
164
+ channel_id: string;
165
+ }, {
166
+ channel_id: string;
167
+ }>;
168
+ export type ListChannelsInput = z.infer<typeof ListChannelsSchema>;
169
+ export type GetChannelInput = z.infer<typeof GetChannelSchema>;
170
+ export type CreateChannelInput = z.infer<typeof CreateChannelSchema>;
171
+ export type DeleteChannelInput = z.infer<typeof DeleteChannelSchema>;
172
+ export type EditChannelInput = z.infer<typeof EditChannelSchema>;
173
+ export type SetChannelPermissionsInput = z.infer<typeof SetChannelPermissionsSchema>;
174
+ export type RemoveChannelPermissionsInput = z.infer<typeof RemoveChannelPermissionsSchema>;
175
+ export type GetChannelPermissionsInput = z.infer<typeof GetChannelPermissionsSchema>;
176
+ export type SyncChannelPermissionsInput = z.infer<typeof SyncChannelPermissionsSchema>;
@@ -0,0 +1,146 @@
1
+ import { z } from "zod";
2
+ import { GuildIdSchema, ChannelIdSchema, ResponseFormatSchema } from "./common.js";
3
+ export const ListChannelsSchema = z.object({
4
+ guild_id: GuildIdSchema,
5
+ type: z.enum(["text", "voice", "category", "all"])
6
+ .default("all")
7
+ .describe("Filter by channel type"),
8
+ response_format: ResponseFormatSchema
9
+ }).strict();
10
+ export const GetChannelSchema = z.object({
11
+ channel_id: ChannelIdSchema,
12
+ response_format: ResponseFormatSchema
13
+ }).strict();
14
+ export const CreateChannelSchema = z.object({
15
+ guild_id: GuildIdSchema,
16
+ name: z.string()
17
+ .min(1)
18
+ .max(100)
19
+ .describe("Channel name"),
20
+ type: z.enum(["text", "voice", "category", "forum"])
21
+ .default("text")
22
+ .describe("Channel type: 'text', 'voice', 'category', or 'forum'"),
23
+ topic: z.string()
24
+ .max(1024)
25
+ .optional()
26
+ .describe("Channel topic (text/forum channels only)"),
27
+ parent_id: ChannelIdSchema.optional()
28
+ .describe("Category ID to create channel under (not for categories)"),
29
+ nsfw: z.boolean()
30
+ .optional()
31
+ .describe("Whether the channel is NSFW (text/forum channels only)"),
32
+ bitrate: z.number()
33
+ .int()
34
+ .min(8000)
35
+ .max(384000)
36
+ .optional()
37
+ .describe("Bitrate for voice channels (8000-384000)"),
38
+ user_limit: z.number()
39
+ .int()
40
+ .min(0)
41
+ .max(99)
42
+ .optional()
43
+ .describe("User limit for voice channels (0 = unlimited)"),
44
+ default_reaction_emoji: z.string()
45
+ .optional()
46
+ .describe("Default reaction emoji for forum posts - use emoji character (e.g., '👍') or custom emoji ID"),
47
+ default_sort_order: z.enum(["latest_activity", "creation_date"])
48
+ .optional()
49
+ .describe("Default sort order for forum posts"),
50
+ default_forum_layout: z.enum(["not_set", "list_view", "gallery_view"])
51
+ .optional()
52
+ .describe("Default layout for forum channel")
53
+ }).strict();
54
+ export const DeleteChannelSchema = z.object({
55
+ channel_id: ChannelIdSchema
56
+ }).strict();
57
+ export const EditChannelSchema = z.object({
58
+ channel_id: ChannelIdSchema,
59
+ name: z.string()
60
+ .min(1)
61
+ .max(100)
62
+ .optional()
63
+ .describe("New channel name"),
64
+ topic: z.string()
65
+ .max(1024)
66
+ .optional()
67
+ .describe("New channel topic"),
68
+ parent_id: ChannelIdSchema.optional()
69
+ .describe("Move channel to a different category (use 'none' to remove from category)"),
70
+ position: z.number()
71
+ .int()
72
+ .min(0)
73
+ .optional()
74
+ .describe("New position of the channel"),
75
+ nsfw: z.boolean()
76
+ .optional()
77
+ .describe("Whether the channel is NSFW"),
78
+ bitrate: z.number()
79
+ .int()
80
+ .min(8000)
81
+ .max(384000)
82
+ .optional()
83
+ .describe("Bitrate for voice channels"),
84
+ user_limit: z.number()
85
+ .int()
86
+ .min(0)
87
+ .max(99)
88
+ .optional()
89
+ .describe("User limit for voice channels"),
90
+ default_reaction_emoji: z.string()
91
+ .optional()
92
+ .describe("Default reaction emoji for forum posts - use emoji character (e.g., '👍') or custom emoji ID, use 'none' to remove"),
93
+ default_sort_order: z.enum(["latest_activity", "creation_date"])
94
+ .optional()
95
+ .describe("Default sort order for forum posts"),
96
+ default_forum_layout: z.enum(["not_set", "list_view", "gallery_view"])
97
+ .optional()
98
+ .describe("Default layout for forum channel")
99
+ }).strict();
100
+ // Permission schemas
101
+ export const PermissionOverwriteSchema = z.object({
102
+ id: z.string()
103
+ .min(17)
104
+ .max(20)
105
+ .regex(/^\d+$/)
106
+ .describe("Role or User ID to set permissions for"),
107
+ type: z.enum(["role", "member"])
108
+ .describe("Whether this is a role or member permission override"),
109
+ allow: z.array(z.string())
110
+ .optional()
111
+ .describe("Permissions to allow (e.g., ['ViewChannel', 'SendMessages'])"),
112
+ deny: z.array(z.string())
113
+ .optional()
114
+ .describe("Permissions to deny (e.g., ['SendMessages', 'AddReactions'])")
115
+ });
116
+ export const SetChannelPermissionsSchema = z.object({
117
+ channel_id: ChannelIdSchema,
118
+ target_id: z.string()
119
+ .min(17)
120
+ .max(20)
121
+ .regex(/^\d+$/)
122
+ .describe("Role or User ID to set permissions for"),
123
+ target_type: z.enum(["role", "member"])
124
+ .describe("Whether target is a role or member"),
125
+ allow: z.array(z.string())
126
+ .optional()
127
+ .describe("Permissions to allow (e.g., ['ViewChannel', 'SendMessages', 'ReadMessageHistory'])"),
128
+ deny: z.array(z.string())
129
+ .optional()
130
+ .describe("Permissions to deny (e.g., ['SendMessages', 'AddReactions'])")
131
+ }).strict();
132
+ export const RemoveChannelPermissionsSchema = z.object({
133
+ channel_id: ChannelIdSchema,
134
+ target_id: z.string()
135
+ .min(17)
136
+ .max(20)
137
+ .regex(/^\d+$/)
138
+ .describe("Role or User ID to remove permission overrides for")
139
+ }).strict();
140
+ export const GetChannelPermissionsSchema = z.object({
141
+ channel_id: ChannelIdSchema,
142
+ response_format: ResponseFormatSchema
143
+ }).strict();
144
+ export const SyncChannelPermissionsSchema = z.object({
145
+ channel_id: ChannelIdSchema
146
+ }).strict();
@@ -0,0 +1,23 @@
1
+ import { z } from "zod";
2
+ import { ResponseFormat } from "../types.js";
3
+ export declare const ResponseFormatSchema: z.ZodDefault<z.ZodNativeEnum<typeof ResponseFormat>>;
4
+ export declare const PaginationSchema: z.ZodObject<{
5
+ limit: z.ZodDefault<z.ZodNumber>;
6
+ offset: z.ZodDefault<z.ZodNumber>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ limit: number;
9
+ offset: number;
10
+ }, {
11
+ limit?: number | undefined;
12
+ offset?: number | undefined;
13
+ }>;
14
+ export declare const GuildIdSchema: z.ZodString;
15
+ export declare const ChannelIdSchema: z.ZodString;
16
+ export declare const UserIdSchema: z.ZodString;
17
+ export declare const RoleIdSchema: z.ZodString;
18
+ export declare const MessageIdSchema: z.ZodString;
19
+ export declare const WebhookIdSchema: z.ZodString;
20
+ export declare const EmojiIdSchema: z.ZodString;
21
+ export declare const StickerIdSchema: z.ZodString;
22
+ export declare const EventIdSchema: z.ZodString;
23
+ export declare const AutoModRuleIdSchema: z.ZodString;
@@ -0,0 +1,71 @@
1
+ import { z } from "zod";
2
+ import { ResponseFormat } from "../types.js";
3
+ // Response format schema
4
+ export const ResponseFormatSchema = z.nativeEnum(ResponseFormat)
5
+ .default(ResponseFormat.JSON)
6
+ .describe("Output format: 'markdown' for human-readable or 'json' for structured data");
7
+ // Pagination schema
8
+ export const PaginationSchema = z.object({
9
+ limit: z.number()
10
+ .int()
11
+ .min(1)
12
+ .max(100)
13
+ .default(20)
14
+ .describe("Maximum number of results to return (1-100)"),
15
+ offset: z.number()
16
+ .int()
17
+ .min(0)
18
+ .default(0)
19
+ .describe("Number of results to skip for pagination")
20
+ });
21
+ // ID schemas (Discord snowflakes)
22
+ export const GuildIdSchema = z.string()
23
+ .min(17)
24
+ .max(20)
25
+ .regex(/^\d+$/, "Guild ID must be numeric")
26
+ .describe("Discord server/guild ID (snowflake)");
27
+ export const ChannelIdSchema = z.string()
28
+ .min(17)
29
+ .max(20)
30
+ .regex(/^\d+$/, "Channel ID must be numeric")
31
+ .describe("Discord channel ID (snowflake)");
32
+ export const UserIdSchema = z.string()
33
+ .min(17)
34
+ .max(20)
35
+ .regex(/^\d+$/, "User ID must be numeric")
36
+ .describe("Discord user ID (snowflake)");
37
+ export const RoleIdSchema = z.string()
38
+ .min(17)
39
+ .max(20)
40
+ .regex(/^\d+$/, "Role ID must be numeric")
41
+ .describe("Discord role ID (snowflake)");
42
+ export const MessageIdSchema = z.string()
43
+ .min(17)
44
+ .max(20)
45
+ .regex(/^\d+$/, "Message ID must be numeric")
46
+ .describe("Discord message ID (snowflake)");
47
+ export const WebhookIdSchema = z.string()
48
+ .min(17)
49
+ .max(20)
50
+ .regex(/^\d+$/, "Webhook ID must be numeric")
51
+ .describe("Discord webhook ID (snowflake)");
52
+ export const EmojiIdSchema = z.string()
53
+ .min(17)
54
+ .max(20)
55
+ .regex(/^\d+$/, "Emoji ID must be numeric")
56
+ .describe("Discord emoji ID (snowflake)");
57
+ export const StickerIdSchema = z.string()
58
+ .min(17)
59
+ .max(20)
60
+ .regex(/^\d+$/, "Sticker ID must be numeric")
61
+ .describe("Discord sticker ID (snowflake)");
62
+ export const EventIdSchema = z.string()
63
+ .min(17)
64
+ .max(20)
65
+ .regex(/^\d+$/, "Event ID must be numeric")
66
+ .describe("Discord scheduled event ID (snowflake)");
67
+ export const AutoModRuleIdSchema = z.string()
68
+ .min(17)
69
+ .max(20)
70
+ .regex(/^\d+$/, "Rule ID must be numeric")
71
+ .describe("Auto moderation rule ID (snowflake)");
@@ -0,0 +1,181 @@
1
+ import { z } from "zod";
2
+ export declare const GetWelcomeScreenSchema: z.ZodObject<{
3
+ guild_id: z.ZodString;
4
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
5
+ }, "strict", z.ZodTypeAny, {
6
+ response_format: import("../types.js").ResponseFormat;
7
+ guild_id: string;
8
+ }, {
9
+ guild_id: string;
10
+ response_format?: import("../types.js").ResponseFormat | undefined;
11
+ }>;
12
+ export declare const EditWelcomeScreenSchema: z.ZodObject<{
13
+ guild_id: z.ZodString;
14
+ enabled: z.ZodOptional<z.ZodBoolean>;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ welcome_channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ channel_id: z.ZodString;
18
+ description: z.ZodString;
19
+ emoji_id: z.ZodOptional<z.ZodString>;
20
+ emoji_name: z.ZodOptional<z.ZodString>;
21
+ }, "strip", z.ZodTypeAny, {
22
+ description: string;
23
+ channel_id: string;
24
+ emoji_id?: string | undefined;
25
+ emoji_name?: string | undefined;
26
+ }, {
27
+ description: string;
28
+ channel_id: string;
29
+ emoji_id?: string | undefined;
30
+ emoji_name?: string | undefined;
31
+ }>, "many">>;
32
+ }, "strict", z.ZodTypeAny, {
33
+ guild_id: string;
34
+ description?: string | undefined;
35
+ enabled?: boolean | undefined;
36
+ welcome_channels?: {
37
+ description: string;
38
+ channel_id: string;
39
+ emoji_id?: string | undefined;
40
+ emoji_name?: string | undefined;
41
+ }[] | undefined;
42
+ }, {
43
+ guild_id: string;
44
+ description?: string | undefined;
45
+ enabled?: boolean | undefined;
46
+ welcome_channels?: {
47
+ description: string;
48
+ channel_id: string;
49
+ emoji_id?: string | undefined;
50
+ emoji_name?: string | undefined;
51
+ }[] | undefined;
52
+ }>;
53
+ export declare const GetOnboardingSchema: z.ZodObject<{
54
+ guild_id: z.ZodString;
55
+ response_format: z.ZodDefault<z.ZodNativeEnum<typeof import("../types.js").ResponseFormat>>;
56
+ }, "strict", z.ZodTypeAny, {
57
+ response_format: import("../types.js").ResponseFormat;
58
+ guild_id: string;
59
+ }, {
60
+ guild_id: string;
61
+ response_format?: import("../types.js").ResponseFormat | undefined;
62
+ }>;
63
+ export declare const EditOnboardingSchema: z.ZodObject<{
64
+ guild_id: z.ZodString;
65
+ prompts: z.ZodOptional<z.ZodArray<z.ZodObject<{
66
+ id: z.ZodOptional<z.ZodString>;
67
+ type: z.ZodEnum<["multiple_choice", "dropdown"]>;
68
+ title: z.ZodString;
69
+ single_select: z.ZodDefault<z.ZodBoolean>;
70
+ required: z.ZodDefault<z.ZodBoolean>;
71
+ in_onboarding: z.ZodDefault<z.ZodBoolean>;
72
+ options: z.ZodArray<z.ZodObject<{
73
+ id: z.ZodOptional<z.ZodString>;
74
+ title: z.ZodString;
75
+ description: z.ZodOptional<z.ZodString>;
76
+ emoji_id: z.ZodOptional<z.ZodString>;
77
+ emoji_name: z.ZodOptional<z.ZodString>;
78
+ role_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
79
+ channel_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
80
+ }, "strip", z.ZodTypeAny, {
81
+ title: string;
82
+ description?: string | undefined;
83
+ id?: string | undefined;
84
+ emoji_id?: string | undefined;
85
+ emoji_name?: string | undefined;
86
+ role_ids?: string[] | undefined;
87
+ channel_ids?: string[] | undefined;
88
+ }, {
89
+ title: string;
90
+ description?: string | undefined;
91
+ id?: string | undefined;
92
+ emoji_id?: string | undefined;
93
+ emoji_name?: string | undefined;
94
+ role_ids?: string[] | undefined;
95
+ channel_ids?: string[] | undefined;
96
+ }>, "many">;
97
+ }, "strip", z.ZodTypeAny, {
98
+ title: string;
99
+ options: {
100
+ title: string;
101
+ description?: string | undefined;
102
+ id?: string | undefined;
103
+ emoji_id?: string | undefined;
104
+ emoji_name?: string | undefined;
105
+ role_ids?: string[] | undefined;
106
+ channel_ids?: string[] | undefined;
107
+ }[];
108
+ type: "multiple_choice" | "dropdown";
109
+ single_select: boolean;
110
+ required: boolean;
111
+ in_onboarding: boolean;
112
+ id?: string | undefined;
113
+ }, {
114
+ title: string;
115
+ options: {
116
+ title: string;
117
+ description?: string | undefined;
118
+ id?: string | undefined;
119
+ emoji_id?: string | undefined;
120
+ emoji_name?: string | undefined;
121
+ role_ids?: string[] | undefined;
122
+ channel_ids?: string[] | undefined;
123
+ }[];
124
+ type: "multiple_choice" | "dropdown";
125
+ id?: string | undefined;
126
+ single_select?: boolean | undefined;
127
+ required?: boolean | undefined;
128
+ in_onboarding?: boolean | undefined;
129
+ }>, "many">>;
130
+ default_channel_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
131
+ enabled: z.ZodOptional<z.ZodBoolean>;
132
+ mode: z.ZodOptional<z.ZodEnum<["onboarding_default", "onboarding_advanced"]>>;
133
+ }, "strict", z.ZodTypeAny, {
134
+ guild_id: string;
135
+ enabled?: boolean | undefined;
136
+ prompts?: {
137
+ title: string;
138
+ options: {
139
+ title: string;
140
+ description?: string | undefined;
141
+ id?: string | undefined;
142
+ emoji_id?: string | undefined;
143
+ emoji_name?: string | undefined;
144
+ role_ids?: string[] | undefined;
145
+ channel_ids?: string[] | undefined;
146
+ }[];
147
+ type: "multiple_choice" | "dropdown";
148
+ single_select: boolean;
149
+ required: boolean;
150
+ in_onboarding: boolean;
151
+ id?: string | undefined;
152
+ }[] | undefined;
153
+ default_channel_ids?: string[] | undefined;
154
+ mode?: "onboarding_default" | "onboarding_advanced" | undefined;
155
+ }, {
156
+ guild_id: string;
157
+ enabled?: boolean | undefined;
158
+ prompts?: {
159
+ title: string;
160
+ options: {
161
+ title: string;
162
+ description?: string | undefined;
163
+ id?: string | undefined;
164
+ emoji_id?: string | undefined;
165
+ emoji_name?: string | undefined;
166
+ role_ids?: string[] | undefined;
167
+ channel_ids?: string[] | undefined;
168
+ }[];
169
+ type: "multiple_choice" | "dropdown";
170
+ id?: string | undefined;
171
+ single_select?: boolean | undefined;
172
+ required?: boolean | undefined;
173
+ in_onboarding?: boolean | undefined;
174
+ }[] | undefined;
175
+ default_channel_ids?: string[] | undefined;
176
+ mode?: "onboarding_default" | "onboarding_advanced" | undefined;
177
+ }>;
178
+ export type GetWelcomeScreenInput = z.infer<typeof GetWelcomeScreenSchema>;
179
+ export type EditWelcomeScreenInput = z.infer<typeof EditWelcomeScreenSchema>;
180
+ export type GetOnboardingInput = z.infer<typeof GetOnboardingSchema>;
181
+ export type EditOnboardingInput = z.infer<typeof EditOnboardingSchema>;
@@ -0,0 +1,60 @@
1
+ import { z } from "zod";
2
+ import { GuildIdSchema, ChannelIdSchema, RoleIdSchema, ResponseFormatSchema } from "./common.js";
3
+ // Welcome Screen schemas
4
+ export const GetWelcomeScreenSchema = z.object({
5
+ guild_id: GuildIdSchema,
6
+ response_format: ResponseFormatSchema
7
+ }).strict();
8
+ export const EditWelcomeScreenSchema = z.object({
9
+ guild_id: GuildIdSchema,
10
+ enabled: z.boolean()
11
+ .optional()
12
+ .describe("Whether the welcome screen is enabled"),
13
+ description: z.string()
14
+ .max(140)
15
+ .optional()
16
+ .describe("The server description shown in the welcome screen (max 140 chars)"),
17
+ welcome_channels: z.array(z.object({
18
+ channel_id: ChannelIdSchema,
19
+ description: z.string().max(50).describe("Channel description (max 50 chars)"),
20
+ emoji_id: z.string().optional().describe("Custom emoji ID (only for custom server emojis)"),
21
+ emoji_name: z.string().optional().describe("Unicode emoji character (e.g., '👍') or custom emoji name if using emoji_id")
22
+ }))
23
+ .max(5)
24
+ .optional()
25
+ .describe("Welcome screen channels (max 5)")
26
+ }).strict();
27
+ // Onboarding schemas
28
+ export const GetOnboardingSchema = z.object({
29
+ guild_id: GuildIdSchema,
30
+ response_format: ResponseFormatSchema
31
+ }).strict();
32
+ export const EditOnboardingSchema = z.object({
33
+ guild_id: GuildIdSchema,
34
+ prompts: z.array(z.object({
35
+ id: z.string().optional().describe("Prompt ID (required for editing existing prompts)"),
36
+ type: z.enum(["multiple_choice", "dropdown"]).describe("Prompt type"),
37
+ title: z.string().max(100).describe("Prompt title"),
38
+ single_select: z.boolean().default(true).describe("Whether only one option can be selected"),
39
+ required: z.boolean().default(false).describe("Whether this prompt is required"),
40
+ in_onboarding: z.boolean().default(true).describe("Whether shown during onboarding"),
41
+ options: z.array(z.object({
42
+ id: z.string().optional().describe("Option ID (required for editing existing options)"),
43
+ title: z.string().max(50).describe("Option title"),
44
+ description: z.string().max(100).optional().describe("Option description"),
45
+ emoji_id: z.string().optional().describe("Custom emoji ID"),
46
+ emoji_name: z.string().optional().describe("Emoji name"),
47
+ role_ids: z.array(RoleIdSchema).optional().describe("Roles to assign when selected (at least one role OR channel required)"),
48
+ channel_ids: z.array(ChannelIdSchema).optional().describe("Channels to show when selected (at least one role OR channel required)")
49
+ })).min(1).describe("Available options for this prompt")
50
+ })).optional().describe("Onboarding prompts/questions"),
51
+ default_channel_ids: z.array(ChannelIdSchema)
52
+ .optional()
53
+ .describe("Channels shown to new members by default"),
54
+ enabled: z.boolean()
55
+ .optional()
56
+ .describe("Whether onboarding is enabled"),
57
+ mode: z.enum(["onboarding_default", "onboarding_advanced"])
58
+ .optional()
59
+ .describe("Onboarding mode")
60
+ }).strict();