@frogbotai/piece-discord 0.22.0 → 0.24.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.
package/dist/index.d.ts CHANGED
@@ -1,38 +1,834 @@
1
- import { type PieceFactoryConfig } from 'frogbot/pieces';
2
- export declare const discordActions: readonly ["sendMessageWithBot", "send_message_webhook", "add_role_to_member", "remove_role_from_member", "list_guild_members", "find_channel"];
3
- export declare const discordScopes: readonly [];
4
- export declare function createDiscord(config?: PieceFactoryConfig): import("frogbot/pieces").Piece & {
5
- /** Send Message with Bot: Send messages via bot to any channel or thread you want, with an optional file attachment. */
6
- sendMessageWithBot: import("node_modules/frogbot/dist/tools/types").AnyTool;
7
- /** Send Message Webhook: Send a discord message via webhook */
8
- sendMessageWebhook: import("node_modules/frogbot/dist/tools/types").AnyTool;
9
- /** Request Approval in a Channel: send a message to a channel asking for approval and wait for a response */
10
- requestApprovalMessage: import("node_modules/frogbot/dist/tools/types").AnyTool;
11
- /** Add role to member: Add Guild Member Role */
12
- addRoleToMember: import("node_modules/frogbot/dist/tools/types").AnyTool;
13
- /** Remove role from member: Remove Guild Member Role */
14
- removeRoleFromMember: import("node_modules/frogbot/dist/tools/types").AnyTool;
15
- /** Remove member from guild: Remove Guild Member */
16
- removeMemberFromGuild: import("node_modules/frogbot/dist/tools/types").AnyTool;
17
- /** List guild members: List Guild Members */
18
- listGuildMembers: import("node_modules/frogbot/dist/tools/types").AnyTool;
19
- /** Rename channel: rename a channel */
20
- renameChannel: import("node_modules/frogbot/dist/tools/types").AnyTool;
21
- /** Create channel: create a channel */
22
- createChannel: import("node_modules/frogbot/dist/tools/types").AnyTool;
23
- /** Delete channel: delete a channel */
24
- deleteChannel: import("node_modules/frogbot/dist/tools/types").AnyTool;
25
- /** Find channel: find a channel by name */
26
- findChannel: import("node_modules/frogbot/dist/tools/types").AnyTool;
27
- /** Remove ban from user: Removes the guild ban from a user */
28
- removeBanFromUser: import("node_modules/frogbot/dist/tools/types").AnyTool;
29
- /** Create guild role: Creates a new role on the specified guild */
30
- createGuildRole: import("node_modules/frogbot/dist/tools/types").AnyTool;
31
- /** Delete guild role: Deletes the specified role from the specified guild */
32
- deleteGuildRole: import("node_modules/frogbot/dist/tools/types").AnyTool;
33
- /** Ban guild member: Bans a guild member */
34
- banGuildMember: import("node_modules/frogbot/dist/tools/types").AnyTool;
35
- /** Custom API Call: Make a custom API call to a specific endpoint */
36
- customApiCall: import("node_modules/frogbot/dist/tools/types").AnyTool;
37
- };
1
+ import type { z } from 'zod';
2
+ import { createDiscordClient } from './client.js';
3
+ export declare const discordActions: readonly ["sendMessage", "sendWebhookMessage", "requestApproval", "addRoleToMember", "removeRoleFromMember", "removeMember", "listMembers", "renameChannel", "createChannel", "deleteChannel", "findChannel", "unbanMember", "createRole", "deleteRole", "banMember", "sendApiRequest"];
4
+ export declare const discordTriggers: readonly ["commandReceived", "componentReceived", "messageCreated", "reactionAdded", "reactionRemoved"];
5
+ export declare const createDiscord: import("frogbot").PieceFactory<{
6
+ readonly slug: "discord";
7
+ readonly label: "Discord";
8
+ readonly admin: {
9
+ readonly description: "Manage Discord communities and connect agents to messages and interactions";
10
+ readonly group: "Communication";
11
+ };
12
+ readonly auth: z.ZodObject<{
13
+ botToken: z.ZodString;
14
+ }, z.core.$strip>;
15
+ readonly options: z.ZodObject<{
16
+ applicationId: z.ZodOptional<z.ZodString>;
17
+ publicKey: z.ZodOptional<z.ZodString>;
18
+ botUsername: z.ZodOptional<z.ZodString>;
19
+ mentionRoleIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
20
+ respondToChannelIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
21
+ respondToGlobalMentions: z.ZodDefault<z.ZodBoolean>;
22
+ }, z.core.$strip>;
23
+ readonly client: typeof createDiscordClient;
24
+ readonly webhook: {
25
+ parse({ req }: {
26
+ req: import("frogbot").FrogbotRequest;
27
+ }): {
28
+ event: string;
29
+ };
30
+ };
31
+ readonly channel: {
32
+ adapter({ auth, options }: {
33
+ auth: {
34
+ botToken: string;
35
+ };
36
+ options: {
37
+ mentionRoleIds: string[];
38
+ respondToChannelIds: string[];
39
+ respondToGlobalMentions: boolean;
40
+ applicationId?: string | undefined;
41
+ publicKey?: string | undefined;
42
+ botUsername?: string | undefined;
43
+ };
44
+ }): import("@chat-adapter/discord").DiscordAdapter;
45
+ identity(): Promise<null>;
46
+ };
47
+ readonly actions: readonly [{
48
+ slug: string;
49
+ description: string;
50
+ input: z.ZodObject<{
51
+ channelId: z.ZodString;
52
+ message: z.ZodOptional<z.ZodString>;
53
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
54
+ fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
55
+ name: z.ZodOptional<z.ZodString>;
56
+ }, z.core.$strip>>>;
57
+ }, z.core.$strip>;
58
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
59
+ idempotent: false;
60
+ options: {
61
+ channelId: typeof import("./options.js").channelOptions;
62
+ };
63
+ run({ client, input, req }: {
64
+ input: {
65
+ channelId: string;
66
+ attachments: {
67
+ fileId: string | number;
68
+ name?: string | undefined;
69
+ }[];
70
+ message?: string | undefined;
71
+ };
72
+ client: {
73
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
74
+ status: number;
75
+ headers: {
76
+ [k: string]: string;
77
+ };
78
+ body: unknown;
79
+ }>;
80
+ };
81
+ options: object;
82
+ req: import("frogbot").FrogbotRequest;
83
+ }): Promise<Record<string, unknown>>;
84
+ }, {
85
+ slug: string;
86
+ description: string;
87
+ input: z.ZodObject<{
88
+ webhookUrl: z.ZodURL;
89
+ username: z.ZodOptional<z.ZodString>;
90
+ content: z.ZodString;
91
+ avatarUrl: z.ZodOptional<z.ZodURL>;
92
+ embeds: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
93
+ tts: z.ZodDefault<z.ZodBoolean>;
94
+ }, z.core.$strip>;
95
+ output: z.ZodObject<{
96
+ success: z.ZodBoolean;
97
+ }, z.core.$strip>;
98
+ idempotent: false;
99
+ run({ client, input }: {
100
+ input: {
101
+ webhookUrl: string;
102
+ content: string;
103
+ embeds: Record<string, unknown>[];
104
+ tts: boolean;
105
+ username?: string | undefined;
106
+ avatarUrl?: string | undefined;
107
+ };
108
+ client: {
109
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
110
+ status: number;
111
+ headers: {
112
+ [k: string]: string;
113
+ };
114
+ body: unknown;
115
+ }>;
116
+ };
117
+ options: object;
118
+ req: import("frogbot").FrogbotRequest;
119
+ }): Promise<{
120
+ success: true;
121
+ }>;
122
+ }, {
123
+ slug: string;
124
+ description: string;
125
+ input: z.ZodObject<{
126
+ channelId: z.ZodString;
127
+ message: z.ZodString;
128
+ reviewUrl: z.ZodURL;
129
+ buttonLabel: z.ZodDefault<z.ZodString>;
130
+ }, z.core.$strip>;
131
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
132
+ idempotent: false;
133
+ options: {
134
+ channelId: typeof import("./options.js").channelOptions;
135
+ };
136
+ run({ client, input }: {
137
+ input: {
138
+ channelId: string;
139
+ message: string;
140
+ reviewUrl: string;
141
+ buttonLabel: string;
142
+ };
143
+ client: {
144
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
145
+ status: number;
146
+ headers: {
147
+ [k: string]: string;
148
+ };
149
+ body: unknown;
150
+ }>;
151
+ };
152
+ options: object;
153
+ req: import("frogbot").FrogbotRequest;
154
+ }): Promise<Record<string, unknown>>;
155
+ }, {
156
+ slug: string;
157
+ description: string;
158
+ input: z.ZodObject<{
159
+ guildId: z.ZodString;
160
+ userId: z.ZodString;
161
+ roleId: z.ZodString;
162
+ }, z.core.$strip>;
163
+ output: z.ZodObject<{
164
+ success: z.ZodBoolean;
165
+ }, z.core.$strip>;
166
+ idempotent: boolean;
167
+ options: Partial<{
168
+ guildId: (args: {
169
+ input: Partial<{
170
+ guildId: string;
171
+ userId: string;
172
+ roleId: string;
173
+ }>;
174
+ client: {
175
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
176
+ status: number;
177
+ headers: {
178
+ [k: string]: string;
179
+ };
180
+ body: unknown;
181
+ }>;
182
+ };
183
+ options: object;
184
+ req: import("frogbot").FrogbotRequest;
185
+ }) => Promise<import("frogbot").PieceOption[]>;
186
+ userId: (args: {
187
+ input: Partial<{
188
+ guildId: string;
189
+ userId: string;
190
+ roleId: string;
191
+ }>;
192
+ client: {
193
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
194
+ status: number;
195
+ headers: {
196
+ [k: string]: string;
197
+ };
198
+ body: unknown;
199
+ }>;
200
+ };
201
+ options: object;
202
+ req: import("frogbot").FrogbotRequest;
203
+ }) => Promise<import("frogbot").PieceOption[]>;
204
+ roleId: (args: {
205
+ input: Partial<{
206
+ guildId: string;
207
+ userId: string;
208
+ roleId: string;
209
+ }>;
210
+ client: {
211
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
212
+ status: number;
213
+ headers: {
214
+ [k: string]: string;
215
+ };
216
+ body: unknown;
217
+ }>;
218
+ };
219
+ options: object;
220
+ req: import("frogbot").FrogbotRequest;
221
+ }) => Promise<import("frogbot").PieceOption[]>;
222
+ }>;
223
+ run({ client, input: value }: {
224
+ input: {
225
+ guildId: string;
226
+ userId: string;
227
+ roleId: string;
228
+ };
229
+ client: {
230
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
231
+ status: number;
232
+ headers: {
233
+ [k: string]: string;
234
+ };
235
+ body: unknown;
236
+ }>;
237
+ };
238
+ options: object;
239
+ req: import("frogbot").FrogbotRequest;
240
+ }): Promise<{
241
+ success: true;
242
+ }>;
243
+ }, {
244
+ slug: string;
245
+ description: string;
246
+ input: z.ZodObject<{
247
+ guildId: z.ZodString;
248
+ userId: z.ZodString;
249
+ roleId: z.ZodString;
250
+ }, z.core.$strip>;
251
+ output: z.ZodObject<{
252
+ success: z.ZodBoolean;
253
+ }, z.core.$strip>;
254
+ idempotent: boolean;
255
+ options: Partial<{
256
+ guildId: (args: {
257
+ input: Partial<{
258
+ guildId: string;
259
+ userId: string;
260
+ roleId: string;
261
+ }>;
262
+ client: {
263
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
264
+ status: number;
265
+ headers: {
266
+ [k: string]: string;
267
+ };
268
+ body: unknown;
269
+ }>;
270
+ };
271
+ options: object;
272
+ req: import("frogbot").FrogbotRequest;
273
+ }) => Promise<import("frogbot").PieceOption[]>;
274
+ userId: (args: {
275
+ input: Partial<{
276
+ guildId: string;
277
+ userId: string;
278
+ roleId: string;
279
+ }>;
280
+ client: {
281
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
282
+ status: number;
283
+ headers: {
284
+ [k: string]: string;
285
+ };
286
+ body: unknown;
287
+ }>;
288
+ };
289
+ options: object;
290
+ req: import("frogbot").FrogbotRequest;
291
+ }) => Promise<import("frogbot").PieceOption[]>;
292
+ roleId: (args: {
293
+ input: Partial<{
294
+ guildId: string;
295
+ userId: string;
296
+ roleId: string;
297
+ }>;
298
+ client: {
299
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
300
+ status: number;
301
+ headers: {
302
+ [k: string]: string;
303
+ };
304
+ body: unknown;
305
+ }>;
306
+ };
307
+ options: object;
308
+ req: import("frogbot").FrogbotRequest;
309
+ }) => Promise<import("frogbot").PieceOption[]>;
310
+ }>;
311
+ run({ client, input: value }: {
312
+ input: {
313
+ guildId: string;
314
+ userId: string;
315
+ roleId: string;
316
+ };
317
+ client: {
318
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
319
+ status: number;
320
+ headers: {
321
+ [k: string]: string;
322
+ };
323
+ body: unknown;
324
+ }>;
325
+ };
326
+ options: object;
327
+ req: import("frogbot").FrogbotRequest;
328
+ }): Promise<{
329
+ success: true;
330
+ }>;
331
+ }, {
332
+ slug: string;
333
+ description: string;
334
+ input: z.ZodObject<{
335
+ guildId: z.ZodString;
336
+ userId: z.ZodString;
337
+ }, z.core.$strip>;
338
+ output: z.ZodObject<{
339
+ success: z.ZodBoolean;
340
+ }, z.core.$strip>;
341
+ idempotent: boolean;
342
+ options: Partial<{
343
+ guildId: (args: {
344
+ input: Partial<{
345
+ guildId: string;
346
+ userId: string;
347
+ }>;
348
+ client: {
349
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
350
+ status: number;
351
+ headers: {
352
+ [k: string]: string;
353
+ };
354
+ body: unknown;
355
+ }>;
356
+ };
357
+ options: object;
358
+ req: import("frogbot").FrogbotRequest;
359
+ }) => Promise<import("frogbot").PieceOption[]>;
360
+ userId: (args: {
361
+ input: Partial<{
362
+ guildId: string;
363
+ userId: string;
364
+ }>;
365
+ client: {
366
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
367
+ status: number;
368
+ headers: {
369
+ [k: string]: string;
370
+ };
371
+ body: unknown;
372
+ }>;
373
+ };
374
+ options: object;
375
+ req: import("frogbot").FrogbotRequest;
376
+ }) => Promise<import("frogbot").PieceOption[]>;
377
+ }>;
378
+ run({ client, input: value }: {
379
+ input: {
380
+ guildId: string;
381
+ userId: string;
382
+ };
383
+ client: {
384
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
385
+ status: number;
386
+ headers: {
387
+ [k: string]: string;
388
+ };
389
+ body: unknown;
390
+ }>;
391
+ };
392
+ options: object;
393
+ req: import("frogbot").FrogbotRequest;
394
+ }): Promise<{
395
+ success: true;
396
+ }>;
397
+ }, {
398
+ slug: string;
399
+ description: string;
400
+ input: z.ZodObject<{
401
+ guildId: z.ZodString;
402
+ search: z.ZodString;
403
+ limit: z.ZodDefault<z.ZodNumber>;
404
+ }, z.core.$strip>;
405
+ output: z.ZodArray<z.ZodObject<{
406
+ label: z.ZodString;
407
+ value: z.ZodString;
408
+ }, z.core.$strip>>;
409
+ idempotent: true;
410
+ options: {
411
+ guildId: typeof import("./options.js").guildOptions;
412
+ };
413
+ run({ client, input }: {
414
+ input: {
415
+ guildId: string;
416
+ search: string;
417
+ limit: number;
418
+ };
419
+ client: {
420
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
421
+ status: number;
422
+ headers: {
423
+ [k: string]: string;
424
+ };
425
+ body: unknown;
426
+ }>;
427
+ };
428
+ options: object;
429
+ req: import("frogbot").FrogbotRequest;
430
+ }): Promise<{
431
+ label: string;
432
+ value: string;
433
+ }[]>;
434
+ }, {
435
+ slug: string;
436
+ description: string;
437
+ input: z.ZodObject<{
438
+ channelId: z.ZodString;
439
+ name: z.ZodString;
440
+ }, z.core.$strip>;
441
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
442
+ idempotent: true;
443
+ options: {
444
+ channelId: typeof import("./options.js").channelOptions;
445
+ };
446
+ run({ client, input }: {
447
+ input: {
448
+ channelId: string;
449
+ name: string;
450
+ };
451
+ client: {
452
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
453
+ status: number;
454
+ headers: {
455
+ [k: string]: string;
456
+ };
457
+ body: unknown;
458
+ }>;
459
+ };
460
+ options: object;
461
+ req: import("frogbot").FrogbotRequest;
462
+ }): Promise<Record<string, unknown>>;
463
+ }, {
464
+ slug: string;
465
+ description: string;
466
+ input: z.ZodObject<{
467
+ guildId: z.ZodString;
468
+ name: z.ZodString;
469
+ topic: z.ZodOptional<z.ZodString>;
470
+ }, z.core.$strip>;
471
+ output: z.ZodObject<{
472
+ success: z.ZodBoolean;
473
+ channel: z.ZodObject<{
474
+ id: z.ZodString;
475
+ name: z.ZodString;
476
+ }, z.core.$strip>;
477
+ }, z.core.$strip>;
478
+ idempotent: false;
479
+ options: {
480
+ guildId: typeof import("./options.js").guildOptions;
481
+ };
482
+ run({ client, input }: {
483
+ input: {
484
+ guildId: string;
485
+ name: string;
486
+ topic?: string | undefined;
487
+ };
488
+ client: {
489
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
490
+ status: number;
491
+ headers: {
492
+ [k: string]: string;
493
+ };
494
+ body: unknown;
495
+ }>;
496
+ };
497
+ options: object;
498
+ req: import("frogbot").FrogbotRequest;
499
+ }): Promise<{
500
+ success: true;
501
+ channel: {
502
+ id: string;
503
+ name: string;
504
+ };
505
+ }>;
506
+ }, {
507
+ slug: string;
508
+ description: string;
509
+ input: z.ZodObject<{
510
+ channelId: z.ZodString;
511
+ }, z.core.$strip>;
512
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
513
+ idempotent: true;
514
+ options: {
515
+ channelId: typeof import("./options.js").channelOptions;
516
+ };
517
+ run({ client, input }: {
518
+ input: {
519
+ channelId: string;
520
+ };
521
+ client: {
522
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
523
+ status: number;
524
+ headers: {
525
+ [k: string]: string;
526
+ };
527
+ body: unknown;
528
+ }>;
529
+ };
530
+ options: object;
531
+ req: import("frogbot").FrogbotRequest;
532
+ }): Promise<Record<string, unknown>>;
533
+ }, {
534
+ slug: string;
535
+ description: string;
536
+ input: z.ZodObject<{
537
+ guildId: z.ZodString;
538
+ name: z.ZodString;
539
+ }, z.core.$strip>;
540
+ output: z.ZodObject<{
541
+ success: z.ZodBoolean;
542
+ channelId: z.ZodOptional<z.ZodString>;
543
+ }, z.core.$strip>;
544
+ idempotent: true;
545
+ options: {
546
+ guildId: typeof import("./options.js").guildOptions;
547
+ };
548
+ run({ client, input }: {
549
+ input: {
550
+ guildId: string;
551
+ name: string;
552
+ };
553
+ client: {
554
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
555
+ status: number;
556
+ headers: {
557
+ [k: string]: string;
558
+ };
559
+ body: unknown;
560
+ }>;
561
+ };
562
+ options: object;
563
+ req: import("frogbot").FrogbotRequest;
564
+ }): Promise<{
565
+ success: boolean;
566
+ channelId: any;
567
+ }>;
568
+ }, {
569
+ slug: string;
570
+ description: string;
571
+ input: z.ZodObject<{
572
+ guildId: z.ZodString;
573
+ userId: z.ZodString;
574
+ reason: z.ZodOptional<z.ZodString>;
575
+ }, z.core.$strip>;
576
+ output: z.ZodObject<{
577
+ success: z.ZodBoolean;
578
+ }, z.core.$strip>;
579
+ idempotent: true;
580
+ options: {
581
+ guildId: typeof import("./options.js").guildOptions;
582
+ };
583
+ run({ client, input }: {
584
+ input: {
585
+ guildId: string;
586
+ userId: string;
587
+ reason?: string | undefined;
588
+ };
589
+ client: {
590
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
591
+ status: number;
592
+ headers: {
593
+ [k: string]: string;
594
+ };
595
+ body: unknown;
596
+ }>;
597
+ };
598
+ options: object;
599
+ req: import("frogbot").FrogbotRequest;
600
+ }): Promise<{
601
+ success: true;
602
+ }>;
603
+ }, {
604
+ slug: string;
605
+ description: string;
606
+ input: z.ZodObject<{
607
+ guildId: z.ZodString;
608
+ name: z.ZodString;
609
+ color: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
610
+ displaySeparately: z.ZodOptional<z.ZodBoolean>;
611
+ mentionable: z.ZodOptional<z.ZodBoolean>;
612
+ reason: z.ZodOptional<z.ZodString>;
613
+ }, z.core.$strip>;
614
+ output: z.ZodObject<{
615
+ success: z.ZodBoolean;
616
+ role: z.ZodObject<{
617
+ id: z.ZodString;
618
+ name: z.ZodString;
619
+ }, z.core.$strip>;
620
+ }, z.core.$strip>;
621
+ idempotent: false;
622
+ options: {
623
+ guildId: typeof import("./options.js").guildOptions;
624
+ };
625
+ run({ client, input }: {
626
+ input: {
627
+ guildId: string;
628
+ name: string;
629
+ color?: number | undefined;
630
+ displaySeparately?: boolean | undefined;
631
+ mentionable?: boolean | undefined;
632
+ reason?: string | undefined;
633
+ };
634
+ client: {
635
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
636
+ status: number;
637
+ headers: {
638
+ [k: string]: string;
639
+ };
640
+ body: unknown;
641
+ }>;
642
+ };
643
+ options: object;
644
+ req: import("frogbot").FrogbotRequest;
645
+ }): Promise<{
646
+ success: true;
647
+ role: {
648
+ id: string;
649
+ name: string;
650
+ };
651
+ }>;
652
+ }, {
653
+ slug: string;
654
+ description: string;
655
+ input: z.ZodObject<{
656
+ guildId: z.ZodString;
657
+ roleId: z.ZodString;
658
+ reason: z.ZodOptional<z.ZodString>;
659
+ }, z.core.$strip>;
660
+ output: z.ZodObject<{
661
+ success: z.ZodBoolean;
662
+ }, z.core.$strip>;
663
+ idempotent: true;
664
+ options: {
665
+ guildId: typeof import("./options.js").guildOptions;
666
+ roleId: typeof import("./options.js").roleOptions;
667
+ };
668
+ run({ client, input }: {
669
+ input: {
670
+ guildId: string;
671
+ roleId: string;
672
+ reason?: string | undefined;
673
+ };
674
+ client: {
675
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
676
+ status: number;
677
+ headers: {
678
+ [k: string]: string;
679
+ };
680
+ body: unknown;
681
+ }>;
682
+ };
683
+ options: object;
684
+ req: import("frogbot").FrogbotRequest;
685
+ }): Promise<{
686
+ success: true;
687
+ }>;
688
+ }, {
689
+ slug: string;
690
+ description: string;
691
+ input: z.ZodObject<{
692
+ guildId: z.ZodString;
693
+ userId: z.ZodString;
694
+ reason: z.ZodOptional<z.ZodString>;
695
+ }, z.core.$strip>;
696
+ output: z.ZodObject<{
697
+ success: z.ZodBoolean;
698
+ }, z.core.$strip>;
699
+ idempotent: true;
700
+ options: {
701
+ guildId: typeof import("./options.js").guildOptions;
702
+ };
703
+ run({ client, input }: {
704
+ input: {
705
+ guildId: string;
706
+ userId: string;
707
+ reason?: string | undefined;
708
+ };
709
+ client: {
710
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
711
+ status: number;
712
+ headers: {
713
+ [k: string]: string;
714
+ };
715
+ body: unknown;
716
+ }>;
717
+ };
718
+ options: object;
719
+ req: import("frogbot").FrogbotRequest;
720
+ }): Promise<{
721
+ success: true;
722
+ }>;
723
+ }, {
724
+ slug: string;
725
+ description: string;
726
+ input: z.ZodObject<{
727
+ path: z.ZodString;
728
+ method: z.ZodEnum<{
729
+ GET: "GET";
730
+ PUT: "PUT";
731
+ DELETE: "DELETE";
732
+ POST: "POST";
733
+ PATCH: "PATCH";
734
+ }>;
735
+ headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
736
+ queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
737
+ body: z.ZodOptional<z.ZodUnknown>;
738
+ }, z.core.$strip>;
739
+ output: z.ZodObject<{
740
+ status: z.ZodNumber;
741
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
742
+ body: z.ZodUnknown;
743
+ }, z.core.$strip>;
744
+ idempotent: false;
745
+ run({ client, input }: {
746
+ input: {
747
+ path: string;
748
+ method: "GET" | "PUT" | "DELETE" | "POST" | "PATCH";
749
+ headers: Record<string, string>;
750
+ queryParams: Record<string, string | number | boolean>;
751
+ body?: unknown;
752
+ };
753
+ client: {
754
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
755
+ status: number;
756
+ headers: {
757
+ [k: string]: string;
758
+ };
759
+ body: unknown;
760
+ }>;
761
+ };
762
+ options: object;
763
+ req: import("frogbot").FrogbotRequest;
764
+ }): Promise<{
765
+ status: number;
766
+ headers: {
767
+ [k: string]: string;
768
+ };
769
+ body: unknown;
770
+ }>;
771
+ }];
772
+ readonly triggers: readonly [{
773
+ slug: string;
774
+ description: string;
775
+ type: "app";
776
+ event: string;
777
+ input: z.ZodObject<{}, z.core.$strip>;
778
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
779
+ sample: {};
780
+ run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
781
+ data: Record<string, unknown>;
782
+ dedupeKey: string;
783
+ }[]>;
784
+ }, {
785
+ slug: string;
786
+ description: string;
787
+ type: "app";
788
+ event: string;
789
+ input: z.ZodObject<{}, z.core.$strip>;
790
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
791
+ sample: {};
792
+ run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
793
+ data: Record<string, unknown>;
794
+ dedupeKey: string;
795
+ }[]>;
796
+ }, {
797
+ slug: string;
798
+ description: string;
799
+ type: "app";
800
+ event: string;
801
+ input: z.ZodObject<{}, z.core.$strip>;
802
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
803
+ sample: {};
804
+ run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
805
+ data: Record<string, unknown>;
806
+ dedupeKey: string;
807
+ }[]>;
808
+ }, {
809
+ slug: string;
810
+ description: string;
811
+ type: "app";
812
+ event: string;
813
+ input: z.ZodObject<{}, z.core.$strip>;
814
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
815
+ sample: {};
816
+ run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
817
+ data: Record<string, unknown>;
818
+ dedupeKey: string;
819
+ }[]>;
820
+ }, {
821
+ slug: string;
822
+ description: string;
823
+ type: "app";
824
+ event: string;
825
+ input: z.ZodObject<{}, z.core.$strip>;
826
+ output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
827
+ sample: {};
828
+ run({ req }: import("frogbot").PieceRunArgs<object, object, import("./client.js").DiscordClient>): Promise<{
829
+ data: Record<string, unknown>;
830
+ dedupeKey: string;
831
+ }[]>;
832
+ }];
833
+ }>;
38
834
  //# sourceMappingURL=index.d.ts.map