topgg-api-types 0.0.1
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/README.md +73 -0
- package/dist/index-BzCAuhll.d.ts +6 -0
- package/dist/index-Dj7klI6c.d.cts +6 -0
- package/dist/index.cjs +28 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +4 -0
- package/dist/v0/validators.cjs +176 -0
- package/dist/v0/validators.cjs.map +1 -0
- package/dist/v0/validators.d.cts +605 -0
- package/dist/v0/validators.d.ts +605 -0
- package/dist/v0/validators.js +162 -0
- package/dist/v0/validators.js.map +1 -0
- package/dist/v0.cjs +0 -0
- package/dist/v0.d.cts +407 -0
- package/dist/v0.d.ts +407 -0
- package/dist/v0.js +0 -0
- package/dist/v1/validators.cjs +231 -0
- package/dist/v1/validators.cjs.map +1 -0
- package/dist/v1/validators.d.cts +687 -0
- package/dist/v1/validators.d.ts +687 -0
- package/dist/v1/validators.js +206 -0
- package/dist/v1/validators.js.map +1 -0
- package/dist/v1.cjs +0 -0
- package/dist/v1.d.cts +333 -0
- package/dist/v1.d.ts +333 -0
- package/dist/v1.js +0 -0
- package/dist/validators-B3dxgWHu.cjs +54 -0
- package/dist/validators-B3dxgWHu.cjs.map +1 -0
- package/dist/validators-Mlu16sBg.js +9 -0
- package/dist/validators-Mlu16sBg.js.map +1 -0
- package/package.json +64 -0
package/dist/v0.d.ts
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { n as Snowflake, t as ISO8601Date } from "./index-BzCAuhll.js";
|
|
2
|
+
|
|
3
|
+
//#region src/v0/index.d.ts
|
|
4
|
+
type WebhookEventType = "upvote" | "test";
|
|
5
|
+
/**
|
|
6
|
+
* @see https://docs.top.gg/docs/Resources/webhooks#bot-webhooks
|
|
7
|
+
* @deprecated Use `v1` types instead.
|
|
8
|
+
*/
|
|
9
|
+
interface BotWebhookPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Discord ID of the bot that received a vote.
|
|
12
|
+
*/
|
|
13
|
+
bot: Snowflake;
|
|
14
|
+
/**
|
|
15
|
+
* Discord ID of the user that voted.
|
|
16
|
+
*/
|
|
17
|
+
user: Snowflake;
|
|
18
|
+
/**
|
|
19
|
+
* The type of the vote (should always be "upvote" except when using the test button it's "test").
|
|
20
|
+
*/
|
|
21
|
+
type: WebhookEventType;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the weekend multiplier is in effect, meaning users votes count as two.
|
|
24
|
+
*/
|
|
25
|
+
isWeekend: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Query string params found on the /bot/:ID/vote page.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* "?a=1&b=2&c=3"
|
|
31
|
+
*/
|
|
32
|
+
query?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @see https://docs.top.gg/docs/Resources/webhooks#server-webhooks
|
|
36
|
+
* @deprecated Use `v1` types instead.
|
|
37
|
+
*/
|
|
38
|
+
interface ServerWebhookPayload {
|
|
39
|
+
/**
|
|
40
|
+
* Discord ID of the server that received a vote.
|
|
41
|
+
*/
|
|
42
|
+
guild: Snowflake;
|
|
43
|
+
/**
|
|
44
|
+
* Discord ID of the user that voted.
|
|
45
|
+
*/
|
|
46
|
+
user: Snowflake;
|
|
47
|
+
/**
|
|
48
|
+
* The type of the vote (should always be "upvote" except when using the test button it's "test").
|
|
49
|
+
*/
|
|
50
|
+
type: WebhookEventType;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the weekend multiplier is in effect, meaning users votes count as two.
|
|
53
|
+
*/
|
|
54
|
+
query?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* A bot listed on Top.gg.
|
|
58
|
+
*/
|
|
59
|
+
interface Bot {
|
|
60
|
+
/**
|
|
61
|
+
* The Discord ID of the bot
|
|
62
|
+
*/
|
|
63
|
+
id: Snowflake;
|
|
64
|
+
/**
|
|
65
|
+
* The username of the bot
|
|
66
|
+
*/
|
|
67
|
+
username: string;
|
|
68
|
+
/**
|
|
69
|
+
* The discriminator of the bot (legacy Discord feature)
|
|
70
|
+
*/
|
|
71
|
+
discriminator: string;
|
|
72
|
+
/**
|
|
73
|
+
* The avatar hash of the bot's avatar
|
|
74
|
+
*/
|
|
75
|
+
avatar?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The cdn hash of the bot's avatar if the bot has none
|
|
78
|
+
*/
|
|
79
|
+
defAvatar?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The command prefix of the bot
|
|
82
|
+
*/
|
|
83
|
+
prefix: string;
|
|
84
|
+
/**
|
|
85
|
+
* The short description of the bot
|
|
86
|
+
*/
|
|
87
|
+
shortdesc: string;
|
|
88
|
+
/**
|
|
89
|
+
* The detailed long description of the bot
|
|
90
|
+
*/
|
|
91
|
+
longdesc?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Array of tags associated with the bot
|
|
94
|
+
*/
|
|
95
|
+
tags: string[];
|
|
96
|
+
/**
|
|
97
|
+
* The official website URL of the bot
|
|
98
|
+
*/
|
|
99
|
+
website?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The support server URL for the bot
|
|
102
|
+
*/
|
|
103
|
+
support?: string;
|
|
104
|
+
/**
|
|
105
|
+
* The GitHub repository URL of the bot
|
|
106
|
+
*/
|
|
107
|
+
github?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Array of snowflake identifiers of the bot owners
|
|
110
|
+
*/
|
|
111
|
+
owners: Snowflake[];
|
|
112
|
+
/**
|
|
113
|
+
* Array of guild snowflake identifiers where the bot is present
|
|
114
|
+
*/
|
|
115
|
+
guilds: Snowflake[];
|
|
116
|
+
/**
|
|
117
|
+
* The OAuth2 invite URL of the bot
|
|
118
|
+
*/
|
|
119
|
+
invite?: string;
|
|
120
|
+
/**
|
|
121
|
+
* The date when the bot was approved on Top.gg in ISO 8601 format
|
|
122
|
+
*/
|
|
123
|
+
date: ISO8601Date;
|
|
124
|
+
/**
|
|
125
|
+
* The amount of servers the bot has according to posted stats.
|
|
126
|
+
*/
|
|
127
|
+
server_count?: number;
|
|
128
|
+
/**
|
|
129
|
+
* The amount of shards the bot has according to posted stats.
|
|
130
|
+
*/
|
|
131
|
+
shard_count?: number;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the bot is certified on Top.gg
|
|
134
|
+
*/
|
|
135
|
+
certifiedBot: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* The vanity URL of the bot on Top.gg
|
|
138
|
+
*/
|
|
139
|
+
vanity?: string;
|
|
140
|
+
/**
|
|
141
|
+
* The amount of upvotes the bot has
|
|
142
|
+
*/
|
|
143
|
+
points: number;
|
|
144
|
+
/**
|
|
145
|
+
* The amount of upvotes the bot has this month
|
|
146
|
+
*/
|
|
147
|
+
monthlyPoints: number;
|
|
148
|
+
/**
|
|
149
|
+
* The guild id for the donatebot setup
|
|
150
|
+
*/
|
|
151
|
+
donatebotguildid: Snowflake;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Query parameters for searching bots on Top.gg.
|
|
155
|
+
*
|
|
156
|
+
* TODO: there is no documentation on a "search" parameter, but the endpoint is called "search bots" and it would make sense for there to be a search parameter. Need to confirm if this is the case and if so, add it to the types.
|
|
157
|
+
*
|
|
158
|
+
* @see https://docs.top.gg/docs/API/v0/bot#search-bots
|
|
159
|
+
*/
|
|
160
|
+
interface GetSearchBotsQuery {
|
|
161
|
+
/**
|
|
162
|
+
* The amount of bots to return.
|
|
163
|
+
*
|
|
164
|
+
* @minimum 1
|
|
165
|
+
* @maximum 500
|
|
166
|
+
* @default 50
|
|
167
|
+
*/
|
|
168
|
+
limit?: number;
|
|
169
|
+
/**
|
|
170
|
+
* The amount of bots to skip (for pagination).
|
|
171
|
+
*
|
|
172
|
+
* @minimum 0
|
|
173
|
+
* @default 0
|
|
174
|
+
*/
|
|
175
|
+
offset?: number;
|
|
176
|
+
/**
|
|
177
|
+
* The field to sort the bots by. Prefix with `-` for descending order.
|
|
178
|
+
*
|
|
179
|
+
* There is no documented default.
|
|
180
|
+
*/
|
|
181
|
+
sort: keyof Bot | `-${keyof Bot}`;
|
|
182
|
+
/**
|
|
183
|
+
* Comma separated list of fields to include in the response. If not provided, all fields will be included.
|
|
184
|
+
*/
|
|
185
|
+
fields?: string;
|
|
186
|
+
}
|
|
187
|
+
interface GetSearchBotsResponse {
|
|
188
|
+
/**
|
|
189
|
+
* The array of bots that match the search query.
|
|
190
|
+
*/
|
|
191
|
+
results: Bot[];
|
|
192
|
+
/**
|
|
193
|
+
* The total number of bots that match the search query.
|
|
194
|
+
*/
|
|
195
|
+
total: number;
|
|
196
|
+
/**
|
|
197
|
+
* The limit used in the query.
|
|
198
|
+
*/
|
|
199
|
+
limit: number;
|
|
200
|
+
/**
|
|
201
|
+
* The amount of bots skipped (for pagination).
|
|
202
|
+
*/
|
|
203
|
+
offset: number;
|
|
204
|
+
/**
|
|
205
|
+
* The amount of items in the current page of results.
|
|
206
|
+
*/
|
|
207
|
+
count: number;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* ### Routes
|
|
211
|
+
*
|
|
212
|
+
* - GET `/bots/:bot_id`
|
|
213
|
+
*/
|
|
214
|
+
type GetBotResponse = Bot;
|
|
215
|
+
/**
|
|
216
|
+
* Gets the last 1000 voters for your bot.
|
|
217
|
+
*
|
|
218
|
+
* If your bot receives more than 1000 votes monthly you cannot use this endpoints and must use webhooks and implement your own caching instead.
|
|
219
|
+
*
|
|
220
|
+
* This endpoint only returns unique votes, it does not include double votes (weekend votes).
|
|
221
|
+
*
|
|
222
|
+
* ### Routes
|
|
223
|
+
*
|
|
224
|
+
* - GET `/bots/:bot_id/votes`
|
|
225
|
+
*/
|
|
226
|
+
type GetLast1000BotVotesResponse = {
|
|
227
|
+
/**
|
|
228
|
+
* The Discord ID of the user that voted.
|
|
229
|
+
*/
|
|
230
|
+
id: Snowflake;
|
|
231
|
+
/**
|
|
232
|
+
* The username of the user that voted, including discriminator (e.g., "wumpus#0000").
|
|
233
|
+
*
|
|
234
|
+
* TODO: It's called "username" but can be uppsercase?? It would be the global_name then.
|
|
235
|
+
*/
|
|
236
|
+
username: string;
|
|
237
|
+
/**
|
|
238
|
+
* The avatar hash of the user that voted.
|
|
239
|
+
*
|
|
240
|
+
* TODO: Can be null? Can be undefined? Is it always present? Need to confirm.
|
|
241
|
+
*/
|
|
242
|
+
avatar?: string;
|
|
243
|
+
}[];
|
|
244
|
+
/**
|
|
245
|
+
* Specific stats about a bot.
|
|
246
|
+
*
|
|
247
|
+
* ### Routes
|
|
248
|
+
*
|
|
249
|
+
* - GET `/bots/:bot_id/stats`
|
|
250
|
+
*/
|
|
251
|
+
interface GetBotStatsResponse {
|
|
252
|
+
/**
|
|
253
|
+
* The amount of servers the bot is in
|
|
254
|
+
*/
|
|
255
|
+
server_count?: number;
|
|
256
|
+
/**
|
|
257
|
+
* The amount of servers the bot is in per shard. Always present but can be empty.
|
|
258
|
+
*/
|
|
259
|
+
shards: number[];
|
|
260
|
+
/**
|
|
261
|
+
* The amount of shards a bot has according to posted stats.
|
|
262
|
+
*/
|
|
263
|
+
shard_count?: number;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Checking whether or not a user has voted for your bot. Safe to use even if you have over 1k monthly votes.
|
|
267
|
+
*
|
|
268
|
+
* ### Routes
|
|
269
|
+
*
|
|
270
|
+
* - GET `/bots/:bot_id/check`
|
|
271
|
+
*/
|
|
272
|
+
interface GetUserVoteCheckQuery {
|
|
273
|
+
/**
|
|
274
|
+
* The Discord ID of the user to check for a vote.
|
|
275
|
+
*/
|
|
276
|
+
userId: Snowflake;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* The response from checking whether or not a user has voted for your bot.
|
|
280
|
+
*
|
|
281
|
+
* ### Routes
|
|
282
|
+
*
|
|
283
|
+
* - GET `/bots/:bot_id/check`
|
|
284
|
+
*/
|
|
285
|
+
interface GetUserVoteCheckResponse {
|
|
286
|
+
/**
|
|
287
|
+
* 0 if the user has not voted for this bot in the last 12 hours, 1 if they have.
|
|
288
|
+
*/
|
|
289
|
+
voted: 0 | 1;
|
|
290
|
+
}
|
|
291
|
+
interface PostBotStatsBody {
|
|
292
|
+
/**
|
|
293
|
+
* The amount of servers the bot is in. Required if the bot has less than 100 servers, otherwise optional but recommended.
|
|
294
|
+
*
|
|
295
|
+
* If an Array, it acts like shards.
|
|
296
|
+
*/
|
|
297
|
+
server_count: number | number[];
|
|
298
|
+
/**
|
|
299
|
+
* Amount of servers the bot is in per shard.
|
|
300
|
+
*/
|
|
301
|
+
shards?: number[];
|
|
302
|
+
/**
|
|
303
|
+
* The zero-indexed id of the shard posting. Makes server_count set the shard specific server count.
|
|
304
|
+
*/
|
|
305
|
+
shard_id?: number;
|
|
306
|
+
/**
|
|
307
|
+
* The amount of shards the bot has.
|
|
308
|
+
*/
|
|
309
|
+
shard_count?: number;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* A user on Top.gg
|
|
313
|
+
*
|
|
314
|
+
* ### Routes
|
|
315
|
+
*
|
|
316
|
+
* - GET `/users/:user_id`
|
|
317
|
+
*/
|
|
318
|
+
interface User {
|
|
319
|
+
/**
|
|
320
|
+
* The Discord ID for this user.
|
|
321
|
+
*/
|
|
322
|
+
id: Snowflake;
|
|
323
|
+
/**
|
|
324
|
+
* The username of the user, not including discriminator (e.g., "wumpus").
|
|
325
|
+
*/
|
|
326
|
+
username: string;
|
|
327
|
+
/**
|
|
328
|
+
* The discriminator of the user (legacy Discord feature, e.g., "0000").
|
|
329
|
+
*/
|
|
330
|
+
discriminator: string;
|
|
331
|
+
/**
|
|
332
|
+
* The avatar hash of the user's avatar.
|
|
333
|
+
*/
|
|
334
|
+
avatar?: string;
|
|
335
|
+
/**
|
|
336
|
+
* The cdn hash of the user's avatar if the user has none.
|
|
337
|
+
*/
|
|
338
|
+
defAvatar?: string;
|
|
339
|
+
/**
|
|
340
|
+
* The bio of the user. This is a short description that the user can set on their profile. It may be empty or null if the user has not set a bio.
|
|
341
|
+
*
|
|
342
|
+
* This is NOT their in-discord bio.
|
|
343
|
+
*/
|
|
344
|
+
bio?: string;
|
|
345
|
+
/**
|
|
346
|
+
* The banner image URL of the user.
|
|
347
|
+
*/
|
|
348
|
+
banner?: string;
|
|
349
|
+
/**
|
|
350
|
+
* The social usernames of the user
|
|
351
|
+
*/
|
|
352
|
+
social: {
|
|
353
|
+
/**
|
|
354
|
+
* The YouTube channel ID of the user. This is not the full URL, just the channel ID (e.g., "UC_x5XG1OV2P6uZZ5FSM9Ttw").
|
|
355
|
+
*/
|
|
356
|
+
youtube?: string;
|
|
357
|
+
/**
|
|
358
|
+
* The Reddit username of the user (e.g., "spez"). This is not the full URL, just the username.
|
|
359
|
+
*/
|
|
360
|
+
reddit?: string;
|
|
361
|
+
/**
|
|
362
|
+
* The Twitter username of the user (e.g., "jack"). This is not the full URL, just the username.
|
|
363
|
+
*/
|
|
364
|
+
twitter?: string;
|
|
365
|
+
/**
|
|
366
|
+
* The Instagram username of the user (e.g., "instagram"). This is not the full URL, just the username.
|
|
367
|
+
*/
|
|
368
|
+
instagram?: string;
|
|
369
|
+
/**
|
|
370
|
+
* The GitHub username of the user (e.g., "torvalds"). This is not the full URL, just the username.
|
|
371
|
+
*/
|
|
372
|
+
github?: string;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* The custom hex color of the user (not guaranteed to be valid hex). This is a color that the user can set on their profile.
|
|
376
|
+
*/
|
|
377
|
+
color?: string;
|
|
378
|
+
/**
|
|
379
|
+
* The supporter status of the user. This is true if the user has voted for any bot in the last month.
|
|
380
|
+
*
|
|
381
|
+
* TODO: Clarify what "supporter" means in this context. It may refer to users who have voted for any bot in the last month, but this is not explicitly stated in the documentation.
|
|
382
|
+
*/
|
|
383
|
+
supporter: boolean;
|
|
384
|
+
/**
|
|
385
|
+
* The certified status of the user.
|
|
386
|
+
*
|
|
387
|
+
* TODO: Clarify what "certified" means in this context. It may refer to users who are certified bot developers or top.gg staff, but this is not explicitly stated in the documentation.
|
|
388
|
+
*/
|
|
389
|
+
certifiedDev: boolean;
|
|
390
|
+
/**
|
|
391
|
+
* The mod status of the user. This is true if the user is a moderator on Top.gg.
|
|
392
|
+
*/
|
|
393
|
+
mod: boolean;
|
|
394
|
+
/**
|
|
395
|
+
* The website moderator status of the user. This is true if the user is a website moderator on Top.gg.
|
|
396
|
+
*/
|
|
397
|
+
webMod: boolean;
|
|
398
|
+
/**
|
|
399
|
+
* The admin status of the user.
|
|
400
|
+
*
|
|
401
|
+
* TODO: Clarify what "admin" means in this context. It may refer to users who are administrators on Top.gg, but this is not explicitly stated in the documentation.
|
|
402
|
+
*/
|
|
403
|
+
admin: boolean;
|
|
404
|
+
}
|
|
405
|
+
//#endregion
|
|
406
|
+
export { Bot, BotWebhookPayload, GetBotResponse, GetBotStatsResponse, GetLast1000BotVotesResponse, GetSearchBotsQuery, GetSearchBotsResponse, GetUserVoteCheckQuery, GetUserVoteCheckResponse, PostBotStatsBody, ServerWebhookPayload, User, WebhookEventType };
|
|
407
|
+
//# sourceMappingURL=v0.d.ts.map
|
package/dist/v0.js
ADDED
|
File without changes
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
const require_validators = require('../validators-B3dxgWHu.cjs');
|
|
2
|
+
let zod_mini = require("zod/mini");
|
|
3
|
+
zod_mini = require_validators.__toESM(zod_mini);
|
|
4
|
+
|
|
5
|
+
//#region src/v1/validators.ts
|
|
6
|
+
/**
|
|
7
|
+
* The type of a webhook event. This is used to identify the type of the event that is being delivered to your webhook endpoint.
|
|
8
|
+
*
|
|
9
|
+
* Not all webhook events are allowed to be set by an integration - use the `IntegrationSupportedWebhookScopesSchema` to find out which events you can subscribe to as an integration.
|
|
10
|
+
*/
|
|
11
|
+
const WebhookEventTypeSchema = zod_mini.enum([
|
|
12
|
+
"webhook.test",
|
|
13
|
+
"integration.create",
|
|
14
|
+
"integration.delete",
|
|
15
|
+
"vote.create"
|
|
16
|
+
]);
|
|
17
|
+
/**
|
|
18
|
+
* The type of a project helps top.gg synchronize features.
|
|
19
|
+
* For example, a discord bot may have a support server, but this would not make any sense for a discord server.
|
|
20
|
+
*
|
|
21
|
+
* You can use this to further find out the specificity of the project.
|
|
22
|
+
*/
|
|
23
|
+
const ProjectTypeSchema = zod_mini.enum([
|
|
24
|
+
"bot",
|
|
25
|
+
"server",
|
|
26
|
+
"game"
|
|
27
|
+
]);
|
|
28
|
+
/**
|
|
29
|
+
* A Platform is used to identify where the corresponding ID links towards.
|
|
30
|
+
*/
|
|
31
|
+
const ProjectPlatformTypeSchema = zod_mini.enum(["discord", "roblox"]);
|
|
32
|
+
/**
|
|
33
|
+
* A User Source is an enum that represents a user account from an external platform that is linked to a Top.gg user account.
|
|
34
|
+
* Each source has a unique identifer type that we might validate against.
|
|
35
|
+
*
|
|
36
|
+
* If none is passed to any endpoint that accepts a source parameter, it will default to topgg.
|
|
37
|
+
*/
|
|
38
|
+
const UserSourceSchema = zod_mini.enum(["discord", "topgg"]);
|
|
39
|
+
/**
|
|
40
|
+
* Webhook scopes that are supported for integrations.
|
|
41
|
+
*/
|
|
42
|
+
const IntegrationSupportedWebhookScopesSchema = zod_mini.enum(["webhook.test", "vote.create"]);
|
|
43
|
+
/**
|
|
44
|
+
* All error responses follow the [`application/problem+json`](https://datatracker.ietf.org/doc/html/rfc7807) specification.
|
|
45
|
+
*/
|
|
46
|
+
const ErrorSchema = zod_mini.object({
|
|
47
|
+
type: zod_mini.string(),
|
|
48
|
+
title: zod_mini.string(),
|
|
49
|
+
status: zod_mini.number(),
|
|
50
|
+
detail: zod_mini.string()
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Represents a user on Top.gg.
|
|
54
|
+
*/
|
|
55
|
+
const UserSchema = zod_mini.object({
|
|
56
|
+
id: require_validators.SnowflakeSchema,
|
|
57
|
+
platform_id: require_validators.SnowflakeSchema,
|
|
58
|
+
name: zod_mini.string(),
|
|
59
|
+
avatar_url: zod_mini.url()
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* Base project information shared across all project-related responses.
|
|
63
|
+
*/
|
|
64
|
+
const BaseProjectSchema = zod_mini.object({
|
|
65
|
+
id: require_validators.SnowflakeSchema,
|
|
66
|
+
platform: ProjectPlatformTypeSchema,
|
|
67
|
+
platform_id: require_validators.SnowflakeSchema,
|
|
68
|
+
type: ProjectTypeSchema
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Represents a vote on Top.gg.
|
|
72
|
+
*/
|
|
73
|
+
const VoteSchema = zod_mini.object({
|
|
74
|
+
user_id: require_validators.SnowflakeSchema,
|
|
75
|
+
platform_id: require_validators.SnowflakeSchema,
|
|
76
|
+
weight: zod_mini.number(),
|
|
77
|
+
created_at: require_validators.ISO8601DateSchema,
|
|
78
|
+
expires_at: require_validators.ISO8601DateSchema
|
|
79
|
+
});
|
|
80
|
+
/**
|
|
81
|
+
* Represents a vote for a specific project.
|
|
82
|
+
*/
|
|
83
|
+
const ProjectVoteSchema = zod_mini.clone(VoteSchema);
|
|
84
|
+
const WebhookPayloadBaseSchema = (type, data) => zod_mini.object({
|
|
85
|
+
type: zod_mini.literal(type),
|
|
86
|
+
data
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Data included when an integration connection is created.
|
|
90
|
+
*/
|
|
91
|
+
const IntegrationCreateDataSchema = zod_mini.object({
|
|
92
|
+
connection_id: require_validators.SnowflakeSchema,
|
|
93
|
+
webhook_secret: zod_mini.string().check(zod_mini.regex(/^whs_[a-zA-Z0-9]+$/, "Invalid webhook secret")),
|
|
94
|
+
project: BaseProjectSchema,
|
|
95
|
+
user: UserSchema
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* The payload delivered to your webhook endpoint when an integration connection is created.
|
|
99
|
+
* This will be sent if a user clicks "Connect" for your integration on the dashboard.
|
|
100
|
+
*
|
|
101
|
+
* @see https://docs.top.gg/docs/API/v1/integrations#2-topgg-sends-integrationcreate
|
|
102
|
+
*/
|
|
103
|
+
const IntegrationCreateWebhookPayloadSchema = WebhookPayloadBaseSchema("integration.create", IntegrationCreateDataSchema);
|
|
104
|
+
/**
|
|
105
|
+
* The response you must return from your webhook endpoint when you receive an `integration.create` event.
|
|
106
|
+
* This tells Top.gg where to deliver webhook events for this integration connection and which events to deliver.
|
|
107
|
+
*
|
|
108
|
+
* @see https://docs.top.gg/docs/API/v1/integrations#3-respond-with-configuration
|
|
109
|
+
*/
|
|
110
|
+
const IntegrationCreateResponseSchema = zod_mini.object({
|
|
111
|
+
webhook_url: zod_mini.url(),
|
|
112
|
+
routes: zod_mini.array(IntegrationSupportedWebhookScopesSchema).check(zod_mini.refine((arr) => arr.length === new Set(arr).size, "Duplicate webhook scopes are not allowed"))
|
|
113
|
+
});
|
|
114
|
+
/**
|
|
115
|
+
* Data included when an integration connection is deleted.
|
|
116
|
+
*/
|
|
117
|
+
const IntegrationDeleteDataSchema = zod_mini.object({ connection_id: require_validators.SnowflakeSchema });
|
|
118
|
+
/**
|
|
119
|
+
* The payload delivered to your webhook endpoint when an integration connection is deleted.
|
|
120
|
+
*/
|
|
121
|
+
const IntegrationDeleteWebhookPayloadSchema = WebhookPayloadBaseSchema("integration.delete", IntegrationDeleteDataSchema);
|
|
122
|
+
/**
|
|
123
|
+
* Data included when a vote is created.
|
|
124
|
+
*/
|
|
125
|
+
const VoteCreateDataSchema = zod_mini.extend(VoteSchema, {
|
|
126
|
+
project: BaseProjectSchema,
|
|
127
|
+
user: UserSchema
|
|
128
|
+
});
|
|
129
|
+
/**
|
|
130
|
+
* The payload delivered to your webhook endpoint when a user votes for your project and you have subscribed to the `vote.create` event.
|
|
131
|
+
*/
|
|
132
|
+
const VoteCreateWebhookPayloadSchema = WebhookPayloadBaseSchema("vote.create", VoteCreateDataSchema);
|
|
133
|
+
/**
|
|
134
|
+
* Data included in a webhook test event.
|
|
135
|
+
*/
|
|
136
|
+
const WebhookTestDataSchema = zod_mini.object({
|
|
137
|
+
user: UserSchema,
|
|
138
|
+
project: BaseProjectSchema
|
|
139
|
+
});
|
|
140
|
+
/**
|
|
141
|
+
* The payload delivered to your webhook endpoint when you send a test webhook from the dashboard or via the API.
|
|
142
|
+
*/
|
|
143
|
+
const WebhookTestWebhookPayloadSchema = WebhookPayloadBaseSchema("webhook.test", WebhookTestDataSchema);
|
|
144
|
+
/**
|
|
145
|
+
* Response schema for getting the authenticated project.
|
|
146
|
+
*
|
|
147
|
+
* - GET `/v1/projects/@me`
|
|
148
|
+
*
|
|
149
|
+
* @see https://docs.top.gg/docs/API/v1/projects#get-current-project
|
|
150
|
+
*/
|
|
151
|
+
const GetProjectResponseSchema = zod_mini.extend(BaseProjectSchema, {
|
|
152
|
+
name: zod_mini.string(),
|
|
153
|
+
headline: zod_mini.string(),
|
|
154
|
+
tags: zod_mini.array(zod_mini.string()),
|
|
155
|
+
votes: zod_mini.number(),
|
|
156
|
+
votes_total: zod_mini.number(),
|
|
157
|
+
review_score: zod_mini.number(),
|
|
158
|
+
review_count: zod_mini.number()
|
|
159
|
+
});
|
|
160
|
+
/**
|
|
161
|
+
* Query parameters for getting project votes.
|
|
162
|
+
*
|
|
163
|
+
* - GET `/v1/projects/@me/votes`
|
|
164
|
+
*
|
|
165
|
+
* Either `cursor` or `startDate` must be provided.
|
|
166
|
+
*
|
|
167
|
+
* @see https://docs.top.gg/docs/API/v1/projects/#get-votes
|
|
168
|
+
*/
|
|
169
|
+
const GetProjectVotesQuerySchema = zod_mini.object({
|
|
170
|
+
cursor: zod_mini.optional(zod_mini.string()),
|
|
171
|
+
startDate: zod_mini.optional(require_validators.ISO8601DateSchema)
|
|
172
|
+
}).check(zod_mini.refine((data) => data.cursor || data.startDate, "Either cursor or startDate must be provided"));
|
|
173
|
+
/**
|
|
174
|
+
* Response schema for the Get Project Votes endpoint.
|
|
175
|
+
*
|
|
176
|
+
* - GET `/v1/projects/@me/votes`
|
|
177
|
+
*
|
|
178
|
+
* @see https://docs.top.gg/docs/API/v1/projects/#get-votes
|
|
179
|
+
*/
|
|
180
|
+
const GetProjectVotesResponseSchema = zod_mini.object({
|
|
181
|
+
cursor: zod_mini.string(),
|
|
182
|
+
data: zod_mini.array(ProjectVoteSchema)
|
|
183
|
+
});
|
|
184
|
+
/**
|
|
185
|
+
* Query parameters for getting vote status by user.
|
|
186
|
+
*
|
|
187
|
+
* - GET `/v1/projects/@me/votes/:user_id`
|
|
188
|
+
*
|
|
189
|
+
* @see https://docs.top.gg/docs/API/v1/projects/#get-vote-status-by-user
|
|
190
|
+
*/
|
|
191
|
+
const GetVoteStatusByUserQuerySchema = zod_mini.object({ source: zod_mini.optional(UserSourceSchema) });
|
|
192
|
+
/**
|
|
193
|
+
* Response schema for the Get Vote Status By User endpoint.
|
|
194
|
+
*
|
|
195
|
+
* - GET `/v1/projects/@me/votes/:user_id`
|
|
196
|
+
*
|
|
197
|
+
* @see https://docs.top.gg/docs/API/v1/projects/#get-vote-status-by-user
|
|
198
|
+
*/
|
|
199
|
+
const GetVoteStatusByUserResponseSchema = zod_mini.object({
|
|
200
|
+
created_at: require_validators.ISO8601DateSchema,
|
|
201
|
+
expires_at: require_validators.ISO8601DateSchema,
|
|
202
|
+
weight: zod_mini.number()
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
//#endregion
|
|
206
|
+
exports.BaseProjectSchema = BaseProjectSchema;
|
|
207
|
+
exports.ErrorSchema = ErrorSchema;
|
|
208
|
+
exports.GetProjectResponseSchema = GetProjectResponseSchema;
|
|
209
|
+
exports.GetProjectVotesQuerySchema = GetProjectVotesQuerySchema;
|
|
210
|
+
exports.GetProjectVotesResponseSchema = GetProjectVotesResponseSchema;
|
|
211
|
+
exports.GetVoteStatusByUserQuerySchema = GetVoteStatusByUserQuerySchema;
|
|
212
|
+
exports.GetVoteStatusByUserResponseSchema = GetVoteStatusByUserResponseSchema;
|
|
213
|
+
exports.IntegrationCreateDataSchema = IntegrationCreateDataSchema;
|
|
214
|
+
exports.IntegrationCreateResponseSchema = IntegrationCreateResponseSchema;
|
|
215
|
+
exports.IntegrationCreateWebhookPayloadSchema = IntegrationCreateWebhookPayloadSchema;
|
|
216
|
+
exports.IntegrationDeleteDataSchema = IntegrationDeleteDataSchema;
|
|
217
|
+
exports.IntegrationDeleteWebhookPayloadSchema = IntegrationDeleteWebhookPayloadSchema;
|
|
218
|
+
exports.IntegrationSupportedWebhookScopesSchema = IntegrationSupportedWebhookScopesSchema;
|
|
219
|
+
exports.ProjectPlatformTypeSchema = ProjectPlatformTypeSchema;
|
|
220
|
+
exports.ProjectTypeSchema = ProjectTypeSchema;
|
|
221
|
+
exports.ProjectVoteSchema = ProjectVoteSchema;
|
|
222
|
+
exports.UserSchema = UserSchema;
|
|
223
|
+
exports.UserSourceSchema = UserSourceSchema;
|
|
224
|
+
exports.VoteCreateDataSchema = VoteCreateDataSchema;
|
|
225
|
+
exports.VoteCreateWebhookPayloadSchema = VoteCreateWebhookPayloadSchema;
|
|
226
|
+
exports.VoteSchema = VoteSchema;
|
|
227
|
+
exports.WebhookEventTypeSchema = WebhookEventTypeSchema;
|
|
228
|
+
exports.WebhookPayloadBaseSchema = WebhookPayloadBaseSchema;
|
|
229
|
+
exports.WebhookTestDataSchema = WebhookTestDataSchema;
|
|
230
|
+
exports.WebhookTestWebhookPayloadSchema = WebhookTestWebhookPayloadSchema;
|
|
231
|
+
//# sourceMappingURL=validators.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.cjs","names":["z","SnowflakeSchema","ISO8601DateSchema"],"sources":["../../src/v1/validators.ts"],"sourcesContent":["import * as z from \"zod/mini\";\nimport { ISO8601DateSchema, SnowflakeSchema } from \"@utils/validators\";\n\n// # General and Base Schemas\n\n// ## Enums and Constants\n\n/**\n * The type of a webhook event. This is used to identify the type of the event that is being delivered to your webhook endpoint.\n *\n * Not all webhook events are allowed to be set by an integration - use the `IntegrationSupportedWebhookScopesSchema` to find out which events you can subscribe to as an integration.\n */\nexport const WebhookEventTypeSchema = z.enum([\n \"webhook.test\",\n \"integration.create\",\n \"integration.delete\",\n \"vote.create\",\n]);\n\n/**\n * The type of a project helps top.gg synchronize features.\n * For example, a discord bot may have a support server, but this would not make any sense for a discord server.\n *\n * You can use this to further find out the specificity of the project.\n */\nexport const ProjectTypeSchema = z.enum([\"bot\", \"server\", \"game\"]);\n\n/**\n * A Platform is used to identify where the corresponding ID links towards.\n */\nexport const ProjectPlatformTypeSchema = z.enum([\"discord\", \"roblox\"]);\n\n/**\n * A User Source is an enum that represents a user account from an external platform that is linked to a Top.gg user account.\n * Each source has a unique identifer type that we might validate against.\n *\n * If none is passed to any endpoint that accepts a source parameter, it will default to topgg.\n */\nexport const UserSourceSchema = z.enum([\"discord\", \"topgg\"]);\n\n/**\n * Webhook scopes that are supported for integrations.\n */\nexport const IntegrationSupportedWebhookScopesSchema = z.enum([\"webhook.test\", \"vote.create\"]);\n\n/**\n * All error responses follow the [`application/problem+json`](https://datatracker.ietf.org/doc/html/rfc7807) specification.\n */\nexport const ErrorSchema = z.object({\n type: z.string(),\n title: z.string(),\n status: z.number(),\n detail: z.string(),\n});\n\n/**\n * Represents a user on Top.gg.\n */\nexport const UserSchema = z.object({\n /**\n * The user's Top.gg ID.\n */\n id: SnowflakeSchema,\n /**\n * The user's platform ID (e.g., Discord ID).\n */\n platform_id: SnowflakeSchema,\n /**\n * The user's username.\n */\n name: z.string(),\n /**\n * The URL of the user's avatar.\n */\n avatar_url: z.url(),\n});\n\n/**\n * Base project information shared across all project-related responses.\n */\nexport const BaseProjectSchema = z.object({\n /**\n * The project's Top.gg ID.\n */\n id: SnowflakeSchema,\n /**\n * The platform the project is on (e.g., \"discord\").\n */\n platform: ProjectPlatformTypeSchema,\n /**\n * The platform-specific ID of the project (e.g., Discord Bot ID).\n */\n platform_id: SnowflakeSchema,\n /**\n * The type of project (e.g., \"bot\").\n */\n type: ProjectTypeSchema,\n});\n\n/**\n * Represents a vote on Top.gg.\n */\nexport const VoteSchema = z.object({\n /**\n * The Top.gg ID of the user who voted.\n */\n user_id: SnowflakeSchema,\n /**\n * The user's ID on the project's platform (e.g., Discord ID).\n */\n platform_id: SnowflakeSchema,\n /**\n * The amount of votes this vote counted for.\n */\n weight: z.number(),\n /**\n * The timestamp of when the user voted.\n */\n created_at: ISO8601DateSchema,\n /**\n * The timestamp of when the vote expires (i.e., when the user can vote again).\n * This is typically 12 hours after the `created_at` timestamp, but may vary based on the user's voting history and other factors.\n */\n expires_at: ISO8601DateSchema,\n});\n\n/**\n * Represents a vote for a specific project.\n */\nexport const ProjectVoteSchema = z.clone(VoteSchema);\n\nexport const WebhookPayloadBaseSchema = <\n T extends z.infer<typeof WebhookEventTypeSchema>,\n Data extends z.ZodMiniObject,\n>(\n type: T,\n data: Data\n) =>\n z.object({\n type: z.literal(type),\n data: data,\n });\n\n// # Specific Schemas\n\n// ## Integration Schemas\n\n/**\n * Data included when an integration connection is created.\n */\nexport const IntegrationCreateDataSchema = z.object({\n /**\n * The unique identifier for this integration connection.\n */\n connection_id: SnowflakeSchema,\n /**\n * The webhook secret used to verify webhook requests from Top.gg for this connection.\n */\n webhook_secret: z.string().check(z.regex(/^whs_[a-zA-Z0-9]+$/, \"Invalid webhook secret\")),\n /**\n * The project this integration is connected to.\n */\n project: BaseProjectSchema,\n /**\n * The user who created this integration connection.\n */\n user: UserSchema,\n});\n\n/**\n * The payload delivered to your webhook endpoint when an integration connection is created.\n * This will be sent if a user clicks \"Connect\" for your integration on the dashboard.\n *\n * @see https://docs.top.gg/docs/API/v1/integrations#2-topgg-sends-integrationcreate\n */\nexport const IntegrationCreateWebhookPayloadSchema = WebhookPayloadBaseSchema(\n \"integration.create\",\n IntegrationCreateDataSchema\n);\n\n/**\n * The response you must return from your webhook endpoint when you receive an `integration.create` event.\n * This tells Top.gg where to deliver webhook events for this integration connection and which events to deliver.\n *\n * @see https://docs.top.gg/docs/API/v1/integrations#3-respond-with-configuration\n */\nexport const IntegrationCreateResponseSchema = z.object({\n /**\n * The URL where Top.gg should deliver webhook events for this connection.\n */\n webhook_url: z.url(),\n /**\n * An array of webhook scopes to subscribe to.\n *\n * @see https://docs.top.gg/docs/API/v1/webhooks#supported-scopes\n */\n routes: z\n .array(IntegrationSupportedWebhookScopesSchema)\n .check(\n z.refine(\n (arr) => arr.length === new Set(arr).size,\n \"Duplicate webhook scopes are not allowed\"\n )\n ),\n});\n\n/**\n * Data included when an integration connection is deleted.\n */\nexport const IntegrationDeleteDataSchema = z.object({\n /**\n * The unique identifier for the integration connection that was deleted.\n */\n connection_id: SnowflakeSchema,\n});\n\n/**\n * The payload delivered to your webhook endpoint when an integration connection is deleted.\n */\nexport const IntegrationDeleteWebhookPayloadSchema = WebhookPayloadBaseSchema(\n \"integration.delete\",\n IntegrationDeleteDataSchema\n);\n\n// ## Vote Schemas\n\n/**\n * Data included when a vote is created.\n */\nexport const VoteCreateDataSchema = z.extend(VoteSchema, {\n /**\n * The project that was voted for.\n */\n project: BaseProjectSchema,\n /**\n * The user who voted.\n */\n user: UserSchema,\n});\n\n/**\n * The payload delivered to your webhook endpoint when a user votes for your project and you have subscribed to the `vote.create` event.\n */\nexport const VoteCreateWebhookPayloadSchema = WebhookPayloadBaseSchema(\n \"vote.create\",\n VoteCreateDataSchema\n);\n\n// ## Webhook Test Schemas\n\n/**\n * Data included in a webhook test event.\n */\nexport const WebhookTestDataSchema = z.object({\n /**\n * A test user.\n */\n user: UserSchema,\n /**\n * A test project.\n */\n project: BaseProjectSchema,\n});\n\n/**\n * The payload delivered to your webhook endpoint when you send a test webhook from the dashboard or via the API.\n */\nexport const WebhookTestWebhookPayloadSchema = WebhookPayloadBaseSchema(\n \"webhook.test\",\n WebhookTestDataSchema\n);\n\n// ## Project Schemas\n\n/**\n * Response schema for getting the authenticated project.\n *\n * - GET `/v1/projects/@me`\n *\n * @see https://docs.top.gg/docs/API/v1/projects#get-current-project\n */\nexport const GetProjectResponseSchema = z.extend(BaseProjectSchema, {\n /**\n * The project's name.\n */\n name: z.string(),\n /**\n * The project's headline/tagline.\n */\n headline: z.string(),\n /**\n * Tags associated with the project.\n */\n tags: z.array(z.string()),\n /**\n * The number of votes this month.\n */\n votes: z.number(),\n /**\n * The total number of votes all time.\n */\n votes_total: z.number(),\n /**\n * The average review score.\n */\n review_score: z.number(),\n /**\n * The number of reviews.\n */\n review_count: z.number(),\n});\n\n/**\n * Query parameters for getting project votes.\n *\n * - GET `/v1/projects/@me/votes`\n *\n * Either `cursor` or `startDate` must be provided.\n *\n * @see https://docs.top.gg/docs/API/v1/projects/#get-votes\n */\nexport const GetProjectVotesQuerySchema = z\n .object({\n /**\n * Pagination cursor for fetching the next page of votes. if provided, `startDate` is ignored.\n *\n * From the previous response.\n */\n cursor: z.optional(z.string()),\n /**\n * The start date for fetching votes. Only votes created after this date will be returned. Required if `cursor` is not provided.\n *\n * Maximum 1 year in the past.\n *\n * ISO 8601 date string.\n */\n startDate: z.optional(ISO8601DateSchema),\n })\n .check(\n z.refine((data) => data.cursor || data.startDate, \"Either cursor or startDate must be provided\")\n );\n\n/**\n * Response schema for the Get Project Votes endpoint.\n *\n * - GET `/v1/projects/@me/votes`\n *\n * @see https://docs.top.gg/docs/API/v1/projects/#get-votes\n */\nexport const GetProjectVotesResponseSchema = z.object({\n /**\n * Cursor for fetching the next page of votes.\n */\n cursor: z.string(),\n /**\n * An array of votes for the project.\n */\n data: z.array(ProjectVoteSchema),\n});\n\n/**\n * Query parameters for getting vote status by user.\n *\n * - GET `/v1/projects/@me/votes/:user_id`\n *\n * @see https://docs.top.gg/docs/API/v1/projects/#get-vote-status-by-user\n */\nexport const GetVoteStatusByUserQuerySchema = z.object({\n /**\n * The source of the user ID. Defaults to \"topgg\".\n */\n source: z.optional(UserSourceSchema),\n});\n\n/**\n * Response schema for the Get Vote Status By User endpoint.\n *\n * - GET `/v1/projects/@me/votes/:user_id`\n *\n * @see https://docs.top.gg/docs/API/v1/projects/#get-vote-status-by-user\n */\nexport const GetVoteStatusByUserResponseSchema = z.object({\n /**\n * The timestamp of when the user last voted.\n */\n created_at: ISO8601DateSchema,\n /**\n * The timestamp of when the user's vote expires (i.e., when they can vote again).\n */\n expires_at: ISO8601DateSchema,\n /**\n * The amount of votes this vote counted for.\n */\n weight: z.number(),\n});\n"],"mappings":"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"}
|