@frogbotai/piece-discord 0.27.0 → 0.29.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/actions.d.ts CHANGED
@@ -1,512 +1,420 @@
1
- import { type PieceRunArgs } from 'frogbot/pieces';
1
+ import type { PieceActionDefinition } from 'frogbot/pieces';
2
2
  import { z } from 'zod';
3
- import { type DiscordClient } from './client.js';
4
- import { channelOptions, guildOptions, roleOptions } from './options.js';
5
- type Run<T> = PieceRunArgs<T, object, DiscordClient>;
6
- declare const sendMessageInput: z.ZodObject<{
3
+ export declare const sendMessage: PieceActionDefinition<z.ZodObject<{
7
4
  channelId: z.ZodString;
8
5
  message: z.ZodOptional<z.ZodString>;
9
6
  attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
10
7
  fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
11
8
  name: z.ZodOptional<z.ZodString>;
12
9
  }, z.core.$strip>>>;
13
- }, z.core.$strip>;
14
- export declare const sendMessage: {
15
- slug: string;
16
- description: string;
17
- input: z.ZodObject<{
18
- channelId: z.ZodString;
19
- message: z.ZodOptional<z.ZodString>;
20
- attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
21
- fileId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
22
- name: z.ZodOptional<z.ZodString>;
23
- }, z.core.$strip>>>;
24
- }, z.core.$strip>;
25
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
26
- idempotent: false;
27
- options: {
28
- channelId: typeof channelOptions;
29
- };
30
- run({ client, input, req }: Run<z.output<typeof sendMessageInput>>): Promise<Record<string, unknown>>;
10
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
11
+ mentionRoleIds: string[];
12
+ respondToChannelIds: string[];
13
+ respondToGlobalMentions: boolean;
14
+ apiUrl?: string | undefined;
15
+ applicationId?: string | undefined;
16
+ publicKey?: string | undefined;
17
+ botUsername?: string | undefined;
18
+ }, {
19
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
20
+ status: number;
21
+ headers: {
22
+ [k: string]: string;
23
+ };
24
+ body: unknown;
25
+ }>;
26
+ }, Record<string, unknown>> & {
27
+ slug: "sendMessage";
31
28
  };
32
- declare const requestApprovalInput: z.ZodObject<{
29
+ export declare const requestApproval: PieceActionDefinition<z.ZodObject<{
33
30
  channelId: z.ZodString;
34
31
  message: z.ZodString;
35
32
  reviewUrl: z.ZodURL;
36
33
  buttonLabel: z.ZodDefault<z.ZodString>;
37
- }, z.core.$strip>;
38
- export declare const requestApproval: {
39
- slug: string;
40
- description: string;
41
- input: z.ZodObject<{
42
- channelId: z.ZodString;
43
- message: z.ZodString;
44
- reviewUrl: z.ZodURL;
45
- buttonLabel: z.ZodDefault<z.ZodString>;
46
- }, z.core.$strip>;
47
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
48
- idempotent: false;
49
- options: {
50
- channelId: typeof channelOptions;
51
- };
52
- run({ client, input }: Run<z.output<typeof requestApprovalInput>>): Promise<Record<string, unknown>>;
34
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
35
+ mentionRoleIds: string[];
36
+ respondToChannelIds: string[];
37
+ respondToGlobalMentions: boolean;
38
+ apiUrl?: string | undefined;
39
+ applicationId?: string | undefined;
40
+ publicKey?: string | undefined;
41
+ botUsername?: string | undefined;
42
+ }, {
43
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
44
+ status: number;
45
+ headers: {
46
+ [k: string]: string;
47
+ };
48
+ body: unknown;
49
+ }>;
50
+ }, Record<string, unknown>> & {
51
+ slug: "requestApproval";
53
52
  };
54
- declare const webhookInput: z.ZodObject<{
53
+ export declare const sendWebhookMessage: PieceActionDefinition<z.ZodObject<{
55
54
  webhookUrl: z.ZodURL;
56
55
  username: z.ZodOptional<z.ZodString>;
57
56
  content: z.ZodString;
58
57
  avatarUrl: z.ZodOptional<z.ZodURL>;
59
58
  embeds: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
60
59
  tts: z.ZodDefault<z.ZodBoolean>;
61
- }, z.core.$strip>;
62
- export declare const sendWebhookMessage: {
63
- slug: string;
64
- description: string;
65
- input: z.ZodObject<{
66
- webhookUrl: z.ZodURL;
67
- username: z.ZodOptional<z.ZodString>;
68
- content: z.ZodString;
69
- avatarUrl: z.ZodOptional<z.ZodURL>;
70
- embeds: z.ZodDefault<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
71
- tts: z.ZodDefault<z.ZodBoolean>;
72
- }, z.core.$strip>;
73
- output: z.ZodObject<{
74
- success: z.ZodBoolean;
75
- }, z.core.$strip>;
76
- idempotent: false;
77
- run({ client, input }: Run<z.output<typeof webhookInput>>): Promise<{
78
- success: true;
60
+ }, z.core.$strip>, z.ZodObject<{
61
+ success: z.ZodBoolean;
62
+ }, z.core.$strip>, {
63
+ mentionRoleIds: string[];
64
+ respondToChannelIds: string[];
65
+ respondToGlobalMentions: boolean;
66
+ apiUrl?: string | undefined;
67
+ applicationId?: string | undefined;
68
+ publicKey?: string | undefined;
69
+ botUsername?: string | undefined;
70
+ }, {
71
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
72
+ status: number;
73
+ headers: {
74
+ [k: string]: string;
75
+ };
76
+ body: unknown;
79
77
  }>;
78
+ }, {
79
+ success: boolean;
80
+ }> & {
81
+ slug: "sendWebhookMessage";
80
82
  };
81
- export declare const addRoleToMember: {
82
- slug: string;
83
- description: string;
84
- input: z.ZodObject<{
85
- guildId: z.ZodString;
86
- userId: z.ZodString;
87
- roleId: z.ZodString;
88
- }, z.core.$strip>;
89
- output: z.ZodObject<{
90
- success: z.ZodBoolean;
91
- }, z.core.$strip>;
92
- idempotent: boolean;
93
- options: Partial<{
94
- guildId: (args: {
95
- input: Partial<{
96
- guildId: string;
97
- userId: string;
98
- roleId: string;
99
- }>;
100
- client: {
101
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
102
- status: number;
103
- headers: {
104
- [k: string]: string;
105
- };
106
- body: unknown;
107
- }>;
108
- };
109
- options: object;
110
- req: import("frogbot").FrogBotRequest;
111
- }) => Promise<import("frogbot").PieceOption[]>;
112
- userId: (args: {
113
- input: Partial<{
114
- guildId: string;
115
- userId: string;
116
- roleId: string;
117
- }>;
118
- client: {
119
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
120
- status: number;
121
- headers: {
122
- [k: string]: string;
123
- };
124
- body: unknown;
125
- }>;
126
- };
127
- options: object;
128
- req: import("frogbot").FrogBotRequest;
129
- }) => Promise<import("frogbot").PieceOption[]>;
130
- roleId: (args: {
131
- input: Partial<{
132
- guildId: string;
133
- userId: string;
134
- roleId: string;
135
- }>;
136
- client: {
137
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
138
- status: number;
139
- headers: {
140
- [k: string]: string;
141
- };
142
- body: unknown;
143
- }>;
144
- };
145
- options: object;
146
- req: import("frogbot").FrogBotRequest;
147
- }) => Promise<import("frogbot").PieceOption[]>;
148
- }>;
149
- run({ client, input: value }: Run<{
150
- guildId: string;
151
- userId: string;
152
- roleId: string;
153
- }>): Promise<{
154
- success: true;
83
+ export declare const addRoleToMember: PieceActionDefinition<z.ZodObject<{
84
+ guildId: z.ZodString;
85
+ userId: z.ZodString;
86
+ roleId: z.ZodString;
87
+ }, z.core.$strip>, z.ZodObject<{
88
+ success: z.ZodBoolean;
89
+ }, z.core.$strip>, {
90
+ mentionRoleIds: string[];
91
+ respondToChannelIds: string[];
92
+ respondToGlobalMentions: boolean;
93
+ apiUrl?: string | undefined;
94
+ applicationId?: string | undefined;
95
+ publicKey?: string | undefined;
96
+ botUsername?: string | undefined;
97
+ }, {
98
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
99
+ status: number;
100
+ headers: {
101
+ [k: string]: string;
102
+ };
103
+ body: unknown;
155
104
  }>;
105
+ }, {
106
+ success: boolean;
107
+ }> & {
108
+ slug: "addRoleToMember";
156
109
  };
157
- export declare const removeRoleFromMember: {
158
- slug: string;
159
- description: string;
160
- input: z.ZodObject<{
161
- guildId: z.ZodString;
162
- userId: z.ZodString;
163
- roleId: z.ZodString;
164
- }, z.core.$strip>;
165
- output: z.ZodObject<{
166
- success: z.ZodBoolean;
167
- }, z.core.$strip>;
168
- idempotent: boolean;
169
- options: Partial<{
170
- guildId: (args: {
171
- input: Partial<{
172
- guildId: string;
173
- userId: string;
174
- roleId: string;
175
- }>;
176
- client: {
177
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
178
- status: number;
179
- headers: {
180
- [k: string]: string;
181
- };
182
- body: unknown;
183
- }>;
184
- };
185
- options: object;
186
- req: import("frogbot").FrogBotRequest;
187
- }) => Promise<import("frogbot").PieceOption[]>;
188
- userId: (args: {
189
- input: Partial<{
190
- guildId: string;
191
- userId: string;
192
- roleId: string;
193
- }>;
194
- client: {
195
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
196
- status: number;
197
- headers: {
198
- [k: string]: string;
199
- };
200
- body: unknown;
201
- }>;
202
- };
203
- options: object;
204
- req: import("frogbot").FrogBotRequest;
205
- }) => Promise<import("frogbot").PieceOption[]>;
206
- roleId: (args: {
207
- input: Partial<{
208
- guildId: string;
209
- userId: string;
210
- roleId: string;
211
- }>;
212
- client: {
213
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
214
- status: number;
215
- headers: {
216
- [k: string]: string;
217
- };
218
- body: unknown;
219
- }>;
220
- };
221
- options: object;
222
- req: import("frogbot").FrogBotRequest;
223
- }) => Promise<import("frogbot").PieceOption[]>;
224
- }>;
225
- run({ client, input: value }: Run<{
226
- guildId: string;
227
- userId: string;
228
- roleId: string;
229
- }>): Promise<{
230
- success: true;
110
+ export declare const removeRoleFromMember: PieceActionDefinition<z.ZodObject<{
111
+ guildId: z.ZodString;
112
+ userId: z.ZodString;
113
+ roleId: z.ZodString;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ success: z.ZodBoolean;
116
+ }, z.core.$strip>, {
117
+ mentionRoleIds: string[];
118
+ respondToChannelIds: string[];
119
+ respondToGlobalMentions: boolean;
120
+ apiUrl?: string | undefined;
121
+ applicationId?: string | undefined;
122
+ publicKey?: string | undefined;
123
+ botUsername?: string | undefined;
124
+ }, {
125
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
126
+ status: number;
127
+ headers: {
128
+ [k: string]: string;
129
+ };
130
+ body: unknown;
231
131
  }>;
132
+ }, {
133
+ success: boolean;
134
+ }> & {
135
+ slug: "removeRoleFromMember";
232
136
  };
233
- export declare const removeMember: {
234
- slug: string;
235
- description: string;
236
- input: z.ZodObject<{
237
- guildId: z.ZodString;
238
- userId: z.ZodString;
239
- }, z.core.$strip>;
240
- output: z.ZodObject<{
241
- success: z.ZodBoolean;
242
- }, z.core.$strip>;
243
- idempotent: boolean;
244
- options: Partial<{
245
- guildId: (args: {
246
- input: Partial<{
247
- guildId: string;
248
- userId: string;
249
- }>;
250
- client: {
251
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
252
- status: number;
253
- headers: {
254
- [k: string]: string;
255
- };
256
- body: unknown;
257
- }>;
258
- };
259
- options: object;
260
- req: import("frogbot").FrogBotRequest;
261
- }) => Promise<import("frogbot").PieceOption[]>;
262
- userId: (args: {
263
- input: Partial<{
264
- guildId: string;
265
- userId: string;
266
- }>;
267
- client: {
268
- request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
269
- status: number;
270
- headers: {
271
- [k: string]: string;
272
- };
273
- body: unknown;
274
- }>;
275
- };
276
- options: object;
277
- req: import("frogbot").FrogBotRequest;
278
- }) => Promise<import("frogbot").PieceOption[]>;
279
- }>;
280
- run({ client, input: value }: Run<{
281
- guildId: string;
282
- userId: string;
283
- }>): Promise<{
284
- success: true;
137
+ export declare const removeMember: PieceActionDefinition<z.ZodObject<{
138
+ guildId: z.ZodString;
139
+ userId: z.ZodString;
140
+ }, z.core.$strip>, z.ZodObject<{
141
+ success: z.ZodBoolean;
142
+ }, z.core.$strip>, {
143
+ mentionRoleIds: string[];
144
+ respondToChannelIds: string[];
145
+ respondToGlobalMentions: boolean;
146
+ apiUrl?: string | undefined;
147
+ applicationId?: string | undefined;
148
+ publicKey?: string | undefined;
149
+ botUsername?: string | undefined;
150
+ }, {
151
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
152
+ status: number;
153
+ headers: {
154
+ [k: string]: string;
155
+ };
156
+ body: unknown;
285
157
  }>;
158
+ }, {
159
+ success: boolean;
160
+ }> & {
161
+ slug: "removeMember";
286
162
  };
287
- declare const listMembersInput: z.ZodObject<{
163
+ export declare const listMembers: PieceActionDefinition<z.ZodObject<{
288
164
  guildId: z.ZodString;
289
165
  search: z.ZodString;
290
166
  limit: z.ZodDefault<z.ZodNumber>;
291
- }, z.core.$strip>;
292
- export declare const listMembers: {
293
- slug: string;
294
- description: string;
295
- input: z.ZodObject<{
296
- guildId: z.ZodString;
297
- search: z.ZodString;
298
- limit: z.ZodDefault<z.ZodNumber>;
299
- }, z.core.$strip>;
300
- output: z.ZodArray<z.ZodObject<{
301
- label: z.ZodString;
302
- value: z.ZodString;
303
- }, z.core.$strip>>;
304
- idempotent: true;
305
- options: {
306
- guildId: typeof guildOptions;
307
- };
308
- run({ client, input }: Run<z.output<typeof listMembersInput>>): Promise<{
309
- label: string;
310
- value: string;
311
- }[]>;
167
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
168
+ label: z.ZodString;
169
+ value: z.ZodString;
170
+ }, z.core.$strip>>, {
171
+ mentionRoleIds: string[];
172
+ respondToChannelIds: string[];
173
+ respondToGlobalMentions: boolean;
174
+ apiUrl?: string | undefined;
175
+ applicationId?: string | undefined;
176
+ publicKey?: string | undefined;
177
+ botUsername?: string | undefined;
178
+ }, {
179
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
180
+ status: number;
181
+ headers: {
182
+ [k: string]: string;
183
+ };
184
+ body: unknown;
185
+ }>;
186
+ }, {
187
+ label: string;
188
+ value: string;
189
+ }[]> & {
190
+ slug: "listMembers";
312
191
  };
313
- declare const renameChannelInput: z.ZodObject<{
192
+ export declare const renameChannel: PieceActionDefinition<z.ZodObject<{
314
193
  channelId: z.ZodString;
315
194
  name: z.ZodString;
316
- }, z.core.$strip>;
317
- export declare const renameChannel: {
318
- slug: string;
319
- description: string;
320
- input: z.ZodObject<{
321
- channelId: z.ZodString;
322
- name: z.ZodString;
323
- }, z.core.$strip>;
324
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
325
- idempotent: true;
326
- options: {
327
- channelId: typeof channelOptions;
328
- };
329
- run({ client, input }: Run<z.output<typeof renameChannelInput>>): Promise<Record<string, unknown>>;
195
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
196
+ mentionRoleIds: string[];
197
+ respondToChannelIds: string[];
198
+ respondToGlobalMentions: boolean;
199
+ apiUrl?: string | undefined;
200
+ applicationId?: string | undefined;
201
+ publicKey?: string | undefined;
202
+ botUsername?: string | undefined;
203
+ }, {
204
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
205
+ status: number;
206
+ headers: {
207
+ [k: string]: string;
208
+ };
209
+ body: unknown;
210
+ }>;
211
+ }, Record<string, unknown>> & {
212
+ slug: "renameChannel";
330
213
  };
331
- declare const createChannelInput: z.ZodObject<{
214
+ export declare const createChannel: PieceActionDefinition<z.ZodObject<{
332
215
  guildId: z.ZodString;
333
216
  name: z.ZodString;
334
217
  topic: z.ZodOptional<z.ZodString>;
335
- }, z.core.$strip>;
336
- export declare const createChannel: {
337
- slug: string;
338
- description: string;
339
- input: z.ZodObject<{
340
- guildId: z.ZodString;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ success: z.ZodBoolean;
220
+ channel: z.ZodObject<{
221
+ id: z.ZodString;
341
222
  name: z.ZodString;
342
- topic: z.ZodOptional<z.ZodString>;
343
- }, z.core.$strip>;
344
- output: z.ZodObject<{
345
- success: z.ZodBoolean;
346
- channel: z.ZodObject<{
347
- id: z.ZodString;
348
- name: z.ZodString;
349
- }, z.core.$strip>;
350
223
  }, z.core.$strip>;
351
- idempotent: false;
352
- options: {
353
- guildId: typeof guildOptions;
354
- };
355
- run({ client, input }: Run<z.output<typeof createChannelInput>>): Promise<{
356
- success: true;
357
- channel: {
358
- id: string;
359
- name: string;
224
+ }, z.core.$strip>, {
225
+ mentionRoleIds: string[];
226
+ respondToChannelIds: string[];
227
+ respondToGlobalMentions: boolean;
228
+ apiUrl?: string | undefined;
229
+ applicationId?: string | undefined;
230
+ publicKey?: string | undefined;
231
+ botUsername?: string | undefined;
232
+ }, {
233
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
234
+ status: number;
235
+ headers: {
236
+ [k: string]: string;
360
237
  };
238
+ body: unknown;
361
239
  }>;
240
+ }, {
241
+ success: boolean;
242
+ channel: {
243
+ id: string;
244
+ name: string;
245
+ };
246
+ }> & {
247
+ slug: "createChannel";
362
248
  };
363
- declare const deleteChannelInput: z.ZodObject<{
249
+ export declare const deleteChannel: PieceActionDefinition<z.ZodObject<{
364
250
  channelId: z.ZodString;
365
- }, z.core.$strip>;
366
- export declare const deleteChannel: {
367
- slug: string;
368
- description: string;
369
- input: z.ZodObject<{
370
- channelId: z.ZodString;
371
- }, z.core.$strip>;
372
- output: z.ZodRecord<z.ZodString, z.ZodUnknown>;
373
- idempotent: true;
374
- options: {
375
- channelId: typeof channelOptions;
376
- };
377
- run({ client, input }: Run<z.output<typeof deleteChannelInput>>): Promise<Record<string, unknown>>;
251
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodUnknown>, {
252
+ mentionRoleIds: string[];
253
+ respondToChannelIds: string[];
254
+ respondToGlobalMentions: boolean;
255
+ apiUrl?: string | undefined;
256
+ applicationId?: string | undefined;
257
+ publicKey?: string | undefined;
258
+ botUsername?: string | undefined;
259
+ }, {
260
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
261
+ status: number;
262
+ headers: {
263
+ [k: string]: string;
264
+ };
265
+ body: unknown;
266
+ }>;
267
+ }, Record<string, unknown>> & {
268
+ slug: "deleteChannel";
378
269
  };
379
- declare const findChannelInput: z.ZodObject<{
270
+ export declare const findChannel: PieceActionDefinition<z.ZodObject<{
380
271
  guildId: z.ZodString;
381
272
  name: z.ZodString;
382
- }, z.core.$strip>;
383
- export declare const findChannel: {
384
- slug: string;
385
- description: string;
386
- input: z.ZodObject<{
387
- guildId: z.ZodString;
388
- name: z.ZodString;
389
- }, z.core.$strip>;
390
- output: z.ZodObject<{
391
- success: z.ZodBoolean;
392
- channelId: z.ZodOptional<z.ZodString>;
393
- }, z.core.$strip>;
394
- idempotent: true;
395
- options: {
396
- guildId: typeof guildOptions;
397
- };
398
- run({ client, input }: Run<z.output<typeof findChannelInput>>): Promise<{
399
- success: boolean;
400
- channelId: any;
273
+ }, z.core.$strip>, z.ZodObject<{
274
+ success: z.ZodBoolean;
275
+ channelId: z.ZodOptional<z.ZodString>;
276
+ }, z.core.$strip>, {
277
+ mentionRoleIds: string[];
278
+ respondToChannelIds: string[];
279
+ respondToGlobalMentions: boolean;
280
+ apiUrl?: string | undefined;
281
+ applicationId?: string | undefined;
282
+ publicKey?: string | undefined;
283
+ botUsername?: string | undefined;
284
+ }, {
285
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
286
+ status: number;
287
+ headers: {
288
+ [k: string]: string;
289
+ };
290
+ body: unknown;
401
291
  }>;
292
+ }, {
293
+ success: boolean;
294
+ channelId?: string | undefined;
295
+ }> & {
296
+ slug: "findChannel";
402
297
  };
403
- declare const moderationInput: z.ZodObject<{
298
+ export declare const unbanMember: PieceActionDefinition<z.ZodObject<{
404
299
  guildId: z.ZodString;
405
300
  userId: z.ZodString;
406
301
  reason: z.ZodOptional<z.ZodString>;
407
- }, z.core.$strip>;
408
- export declare const unbanMember: {
409
- slug: string;
410
- description: string;
411
- input: z.ZodObject<{
412
- guildId: z.ZodString;
413
- userId: z.ZodString;
414
- reason: z.ZodOptional<z.ZodString>;
415
- }, z.core.$strip>;
416
- output: z.ZodObject<{
417
- success: z.ZodBoolean;
418
- }, z.core.$strip>;
419
- idempotent: true;
420
- options: {
421
- guildId: typeof guildOptions;
422
- };
423
- run({ client, input }: Run<z.output<typeof moderationInput>>): Promise<{
424
- success: true;
302
+ }, z.core.$strip>, z.ZodObject<{
303
+ success: z.ZodBoolean;
304
+ }, z.core.$strip>, {
305
+ mentionRoleIds: string[];
306
+ respondToChannelIds: string[];
307
+ respondToGlobalMentions: boolean;
308
+ apiUrl?: string | undefined;
309
+ applicationId?: string | undefined;
310
+ publicKey?: string | undefined;
311
+ botUsername?: string | undefined;
312
+ }, {
313
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
314
+ status: number;
315
+ headers: {
316
+ [k: string]: string;
317
+ };
318
+ body: unknown;
425
319
  }>;
320
+ }, {
321
+ success: boolean;
322
+ }> & {
323
+ slug: "unbanMember";
426
324
  };
427
- export declare const banMember: {
428
- slug: string;
429
- description: string;
430
- input: z.ZodObject<{
431
- guildId: z.ZodString;
432
- userId: z.ZodString;
433
- reason: z.ZodOptional<z.ZodString>;
434
- }, z.core.$strip>;
435
- output: z.ZodObject<{
436
- success: z.ZodBoolean;
437
- }, z.core.$strip>;
438
- idempotent: true;
439
- options: {
440
- guildId: typeof guildOptions;
441
- };
442
- run({ client, input }: Run<z.output<typeof moderationInput>>): Promise<{
443
- success: true;
325
+ export declare const banMember: PieceActionDefinition<z.ZodObject<{
326
+ guildId: z.ZodString;
327
+ userId: z.ZodString;
328
+ reason: z.ZodOptional<z.ZodString>;
329
+ }, z.core.$strip>, z.ZodObject<{
330
+ success: z.ZodBoolean;
331
+ }, z.core.$strip>, {
332
+ mentionRoleIds: string[];
333
+ respondToChannelIds: string[];
334
+ respondToGlobalMentions: boolean;
335
+ apiUrl?: string | undefined;
336
+ applicationId?: string | undefined;
337
+ publicKey?: string | undefined;
338
+ botUsername?: string | undefined;
339
+ }, {
340
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
341
+ status: number;
342
+ headers: {
343
+ [k: string]: string;
344
+ };
345
+ body: unknown;
444
346
  }>;
347
+ }, {
348
+ success: boolean;
349
+ }> & {
350
+ slug: "banMember";
445
351
  };
446
- declare const createRoleInput: z.ZodObject<{
352
+ export declare const createRole: PieceActionDefinition<z.ZodObject<{
447
353
  guildId: z.ZodString;
448
354
  name: z.ZodString;
449
355
  color: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
450
356
  displaySeparately: z.ZodOptional<z.ZodBoolean>;
451
357
  mentionable: z.ZodOptional<z.ZodBoolean>;
452
358
  reason: z.ZodOptional<z.ZodString>;
453
- }, z.core.$strip>;
454
- export declare const createRole: {
455
- slug: string;
456
- description: string;
457
- input: z.ZodObject<{
458
- guildId: z.ZodString;
359
+ }, z.core.$strip>, z.ZodObject<{
360
+ success: z.ZodBoolean;
361
+ role: z.ZodObject<{
362
+ id: z.ZodString;
459
363
  name: z.ZodString;
460
- color: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
461
- displaySeparately: z.ZodOptional<z.ZodBoolean>;
462
- mentionable: z.ZodOptional<z.ZodBoolean>;
463
- reason: z.ZodOptional<z.ZodString>;
464
- }, z.core.$strip>;
465
- output: z.ZodObject<{
466
- success: z.ZodBoolean;
467
- role: z.ZodObject<{
468
- id: z.ZodString;
469
- name: z.ZodString;
470
- }, z.core.$strip>;
471
364
  }, z.core.$strip>;
472
- idempotent: false;
473
- options: {
474
- guildId: typeof guildOptions;
475
- };
476
- run({ client, input }: Run<z.output<typeof createRoleInput>>): Promise<{
477
- success: true;
478
- role: {
479
- id: string;
480
- name: string;
365
+ }, z.core.$strip>, {
366
+ mentionRoleIds: string[];
367
+ respondToChannelIds: string[];
368
+ respondToGlobalMentions: boolean;
369
+ apiUrl?: string | undefined;
370
+ applicationId?: string | undefined;
371
+ publicKey?: string | undefined;
372
+ botUsername?: string | undefined;
373
+ }, {
374
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
375
+ status: number;
376
+ headers: {
377
+ [k: string]: string;
481
378
  };
379
+ body: unknown;
482
380
  }>;
381
+ }, {
382
+ success: boolean;
383
+ role: {
384
+ id: string;
385
+ name: string;
386
+ };
387
+ }> & {
388
+ slug: "createRole";
483
389
  };
484
- declare const deleteRoleInput: z.ZodObject<{
390
+ export declare const deleteRole: PieceActionDefinition<z.ZodObject<{
485
391
  guildId: z.ZodString;
486
392
  roleId: z.ZodString;
487
393
  reason: z.ZodOptional<z.ZodString>;
488
- }, z.core.$strip>;
489
- export declare const deleteRole: {
490
- slug: string;
491
- description: string;
492
- input: z.ZodObject<{
493
- guildId: z.ZodString;
494
- roleId: z.ZodString;
495
- reason: z.ZodOptional<z.ZodString>;
496
- }, z.core.$strip>;
497
- output: z.ZodObject<{
498
- success: z.ZodBoolean;
499
- }, z.core.$strip>;
500
- idempotent: true;
501
- options: {
502
- guildId: typeof guildOptions;
503
- roleId: typeof roleOptions;
504
- };
505
- run({ client, input }: Run<z.output<typeof deleteRoleInput>>): Promise<{
506
- success: true;
394
+ }, z.core.$strip>, z.ZodObject<{
395
+ success: z.ZodBoolean;
396
+ }, z.core.$strip>, {
397
+ mentionRoleIds: string[];
398
+ respondToChannelIds: string[];
399
+ respondToGlobalMentions: boolean;
400
+ apiUrl?: string | undefined;
401
+ applicationId?: string | undefined;
402
+ publicKey?: string | undefined;
403
+ botUsername?: string | undefined;
404
+ }, {
405
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
406
+ status: number;
407
+ headers: {
408
+ [k: string]: string;
409
+ };
410
+ body: unknown;
507
411
  }>;
412
+ }, {
413
+ success: boolean;
414
+ }> & {
415
+ slug: "deleteRole";
508
416
  };
509
- declare const customApiInput: z.ZodObject<{
417
+ export declare const sendApiRequest: PieceActionDefinition<z.ZodObject<{
510
418
  path: z.ZodString;
511
419
  method: z.ZodEnum<{
512
420
  GET: "GET";
@@ -518,36 +426,31 @@ declare const customApiInput: z.ZodObject<{
518
426
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
519
427
  queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
520
428
  body: z.ZodOptional<z.ZodUnknown>;
521
- }, z.core.$strip>;
522
- export declare const sendApiRequest: {
523
- slug: string;
524
- description: string;
525
- input: z.ZodObject<{
526
- path: z.ZodString;
527
- method: z.ZodEnum<{
528
- GET: "GET";
529
- PUT: "PUT";
530
- DELETE: "DELETE";
531
- POST: "POST";
532
- PATCH: "PATCH";
533
- }>;
534
- headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
535
- queryParams: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
536
- body: z.ZodOptional<z.ZodUnknown>;
537
- }, z.core.$strip>;
538
- output: z.ZodObject<{
539
- status: z.ZodNumber;
540
- headers: z.ZodRecord<z.ZodString, z.ZodString>;
541
- body: z.ZodUnknown;
542
- }, z.core.$strip>;
543
- idempotent: false;
544
- run({ client, input }: Run<z.output<typeof customApiInput>>): Promise<{
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ status: z.ZodNumber;
431
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
432
+ body: z.ZodUnknown;
433
+ }, z.core.$strip>, {
434
+ mentionRoleIds: string[];
435
+ respondToChannelIds: string[];
436
+ respondToGlobalMentions: boolean;
437
+ apiUrl?: string | undefined;
438
+ applicationId?: string | undefined;
439
+ publicKey?: string | undefined;
440
+ botUsername?: string | undefined;
441
+ }, {
442
+ request: ({ method, path, body, headers, authenticated, }: import("./client.js").DiscordRequest) => Promise<{
545
443
  status: number;
546
444
  headers: {
547
445
  [k: string]: string;
548
446
  };
549
447
  body: unknown;
550
448
  }>;
449
+ }, {
450
+ status: number;
451
+ headers: Record<string, string>;
452
+ body: unknown;
453
+ }> & {
454
+ slug: "sendApiRequest";
551
455
  };
552
- export {};
553
456
  //# sourceMappingURL=actions.d.ts.map