guilded-api-typings
Advanced tools
Comparing version 0.0.0-dev-20220919205349 to 0.0.0-dev-20220928193632
# guilded-api-typings | ||
## 0.0.0-dev-20220919205349 | ||
## 0.0.0-dev-20220928193632 | ||
### Patch Changes | ||
- 34c82fd: feat: generic typings | ||
## 0.12.0 | ||
### Minor Changes | ||
@@ -6,0 +12,0 @@ |
{ | ||
"name": "guilded-api-typings", | ||
"version": "0.0.0-dev-20220919205349", | ||
"version": "0.0.0-dev-20220928193632", | ||
"description": "Type definitions for the Guilded API.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -16,3 +16,3 @@ /** Represents a error that occurred while interacting with the Guilded REST API. */ | ||
*/ | ||
static channels: '/channels'; | ||
static channels: "/channels"; | ||
/** | ||
@@ -26,3 +26,3 @@ * The endpoint for a channel on Guilded. | ||
*/ | ||
static channel(channelId: string): `/channels/${string}`; | ||
static channel<C extends string>(channelId: C): `/channels/${C}`; | ||
/** | ||
@@ -34,3 +34,3 @@ * The endpoint for a server on Guilded. | ||
*/ | ||
static server(serverId: string): `/servers/${string}`; | ||
static server<S extends string>(serverId: S): `/servers/${S}`; | ||
/** | ||
@@ -43,3 +43,3 @@ * The endpoint for messages on Guilded. | ||
*/ | ||
static messages(channelId: string): `/channels/${string}/messages`; | ||
static messages<C extends string>(channelId: C): `/channels/${C}/messages`; | ||
/** | ||
@@ -54,3 +54,3 @@ * The endpoint for a message on Guilded. | ||
*/ | ||
static message(channelId: string, messageId: string): `/channels/${string}/messages/${string}`; | ||
static message<C extends string, M extends string>(channelId: C, messageId: M): `/channels/${C}/messages/${M}`; | ||
/** | ||
@@ -64,3 +64,3 @@ * The endpoint for a server nickname on Guilded. | ||
*/ | ||
static serverNickname(serverId: string, memberId: string): `/servers/${string}/members/${string}/nickname`; | ||
static serverNickname<S extends string, M extends string>(serverId: S, memberId: M): `/servers/${S}/members/${M}/nickname`; | ||
/** | ||
@@ -74,3 +74,3 @@ * The endpoint for a server member on Guilded. | ||
*/ | ||
static serverMember(serverId: string, memberId: string): `/servers/${string}/members/${string}`; | ||
static serverMember<S extends string, M extends string>(serverId: S, memberId: M): `/servers/${S}/members/${M}`; | ||
/** | ||
@@ -82,3 +82,3 @@ * The endpoint for server members on Guilded. | ||
*/ | ||
static serverMembers(serverId: string): `/servers/${string}/members`; | ||
static serverMembers<S extends string>(serverId: S): `/servers/${S}/members`; | ||
/** | ||
@@ -93,3 +93,3 @@ * The endpoint for a server ban on Guilded. | ||
*/ | ||
static serverBan(serverId: string, banId: string): `/servers/${string}/bans/${string}`; | ||
static serverBan<S extends string, B extends string>(serverId: S, banId: B): `/servers/${S}/bans/${B}`; | ||
/** | ||
@@ -101,3 +101,3 @@ * The endpoint for server bans on Guilded. | ||
*/ | ||
static serverBans(serverId: string): `/servers/${string}/bans`; | ||
static serverBans<S extends string>(serverId: S): `/servers/${S}/bans`; | ||
/** | ||
@@ -110,3 +110,3 @@ * The endpoint for forum topics. | ||
*/ | ||
static forumTopics(channelId: string): `/channels/${string}/topics`; | ||
static forumTopics<C extends string>(channelId: C): `/channels/${C}/topics`; | ||
/** | ||
@@ -121,3 +121,3 @@ * The endpoint for a forum topic. | ||
*/ | ||
static forumTopic(channelId: string, forumTopicId: number): `/channels/${string}/topics/${number}`; | ||
static forumTopic<C extends string, F extends number>(channelId: C, forumTopicId: F): `/channels/${C}/topics/${F}`; | ||
/** | ||
@@ -131,3 +131,3 @@ * The endpoint for a forum topic pin. | ||
*/ | ||
static forumTopicPin(channelId: string, forumTopicId: number): `/channels/${string}/topics/${number}/pin`; | ||
static forumTopicPin<C extends string, F extends number>(channelId: C, forumTopicId: F): `/channels/${C}/topics/${F}/pin`; | ||
/** | ||
@@ -140,3 +140,3 @@ * The endpoint for list items on Guilded. | ||
*/ | ||
static listItems(channelId: string): `/channels/${string}/items`; | ||
static listItems<C extends string>(channelId: C): `/channels/${C}/items`; | ||
/** | ||
@@ -151,3 +151,3 @@ * The endpoint for a list item on Guilded. | ||
*/ | ||
static listItem(channelId: string, listItemId: string): `/channels/${string}/items/${string}`; | ||
static listItem<C extends string, L extends string>(channelId: C, listItemId: L): `/channels/${C}/items/${L}`; | ||
/** | ||
@@ -161,3 +161,3 @@ * The endpoint for list item completions on Guilded. | ||
*/ | ||
static listItemComplete(channelId: string, listItemId: string): `/channels/${string}/items/${string}/complete`; | ||
static listItemComplete<C extends string, L extends string>(channelId: C, listItemId: L): `/channels/${C}/items/${L}/complete`; | ||
/** | ||
@@ -170,3 +170,3 @@ * The endpoint for docs on Guilded. | ||
*/ | ||
static docs(channelId: string): `/channels/${string}/docs`; | ||
static docs<C extends string>(channelId: C): `/channels/${C}/docs`; | ||
/** | ||
@@ -181,3 +181,3 @@ * The endpoint for a doc on Guilded. | ||
*/ | ||
static doc(channelId: string, docId: number): `/channels/${string}/docs/${number}`; | ||
static doc<C extends string, D extends number>(channelId: C, docId: D): `/channels/${C}/docs/${D}`; | ||
/** | ||
@@ -190,3 +190,3 @@ * The endpoint for calendar events on Guilded. | ||
*/ | ||
static calendarEvents(channelId: string): `/channels/${string}/events`; | ||
static calendarEvents<C extends string>(channelId: C): `/channels/${C}/events`; | ||
/** | ||
@@ -201,3 +201,3 @@ * The endpoint for a calendar event on Guilded. | ||
*/ | ||
static calendarEvent(channelId: string, calendarEventId: number): `/channels/${string}/events/${number}`; | ||
static calendarEvent<C extends string, CE extends number>(channelId: C, calendarEventId: CE): `/channels/${C}/events/${CE}`; | ||
/** | ||
@@ -212,3 +212,3 @@ * The endpoint for a calendar event RSVP on Guilded. | ||
*/ | ||
static calendarEventRsvp(channelId: string, calendarEventId: number, userId: string): `/channels/${string}/events/${number}/rsvps/${string}`; | ||
static calendarEventRsvp<C extends string, CE extends number, U extends string>(channelId: C, calendarEventId: CE, userId: U): `/channels/${C}/events/${CE}/rsvps/${U}`; | ||
/** | ||
@@ -220,3 +220,3 @@ * The endpoint for calendar event RSVPs on Guilded. | ||
*/ | ||
static calendarEventRsvps(channelId: string, calendarEventId: number): `/channels/${string}/events/${number}/rsvps`; | ||
static calendarEventRsvps<C extends string, CE extends number>(channelId: C, calendarEventId: CE): string; | ||
/** | ||
@@ -230,3 +230,3 @@ * The endpoint for a content reaction on Guilded. | ||
*/ | ||
static reaction(channelId: string, contentId: string, emoteId: number): `/channels/${string}/content/${string}/emotes/${number}`; | ||
static reaction<C extends string, Co extends string, E extends number>(channelId: C, contentId: Co, emoteId: E): `/channels/${C}/content/${Co}/emotes/${E}`; | ||
/** | ||
@@ -239,3 +239,3 @@ * The endpoint for server member XP on Guilded. | ||
*/ | ||
static serverMemberXp(serverId: string, memberId: string): `/servers/${string}/members/${string}/xp`; | ||
static serverMemberXp<S extends string, M extends string>(serverId: S, memberId: M): `/servers/${S}/members/${M}/xp`; | ||
/** | ||
@@ -248,3 +248,3 @@ * The endpoint for server role XP on Guilded. | ||
*/ | ||
static serverRoleXp(serverId: string, roleId: number): `/servers/${string}/roles/${number}/xp`; | ||
static serverRoleXp<S extends string, R extends number>(serverId: S, roleId: R): `/servers/${S}/roles/${R}/xp`; | ||
/** | ||
@@ -258,3 +258,3 @@ * The endpoint for a server member social link on Guilded. | ||
*/ | ||
static socialLink(serverId: string, memberId: string, type: string): `/servers/${string}/members/${string}/social-links/${string}`; | ||
static socialLink<S extends string, M extends string, T extends string>(serverId: S, memberId: M, type: T): `/servers/${S}/members/${M}/social-links/${T}`; | ||
/** | ||
@@ -268,3 +268,3 @@ * The endpoint for a group member on Guilded. | ||
*/ | ||
static groupMember(groupId: string, memberId: string): `/groups/${string}/members/${string}`; | ||
static groupMember<G extends string, M extends string>(groupId: G, memberId: M): `/groups/${G}/members/${M}`; | ||
/** | ||
@@ -279,3 +279,3 @@ * The endpoint for a server member role on Guilded. | ||
*/ | ||
static serverMemberRole(serverId: string, memberId: string, roleId: number): `/servers/${string}/members/${string}/roles/${number}`; | ||
static serverMemberRole<S extends string, M extends string, R extends number>(serverId: S, memberId: M, roleId: R): `/servers/${S}/members/${M}/roles/${R}`; | ||
/** | ||
@@ -288,3 +288,3 @@ * The endpoint for server member roles on Guilded. | ||
*/ | ||
static serverMemberRoles(serverId: string, memberId: string): `/servers/${string}/members/${string}/roles`; | ||
static serverMemberRoles<S extends string, M extends string>(serverId: S, memberId: M): `/servers/${S}/members/${M}/roles`; | ||
/** | ||
@@ -297,3 +297,3 @@ * The endpoint for webhooks on Guilded. | ||
*/ | ||
static webhooks(serverId: string): `/servers/${string}/webhooks`; | ||
static webhooks<S extends string>(serverId: S): `/servers/${S}/webhooks`; | ||
/** | ||
@@ -308,3 +308,3 @@ * The endpoint for a webhook on Guilded. | ||
*/ | ||
static webhook(serverId: string, webhookId: string): `/servers/${string}/webhooks/${string}`; | ||
static webhook<S extends string, W extends string>(serverId: S, webhookId: W): `/servers/${S}/webhooks/${W}`; | ||
/** | ||
@@ -316,4 +316,4 @@ * The endpoint for a webhook execution on Guilded. | ||
*/ | ||
static webhookExecute(webhookId: string, webhookToken: string): `/webhooks/${string}/${string}`; | ||
static webhookExecute<W extends string, WT extends string>(webhookId: W, webhookToken: WT): `/webhooks/${W}/${WT}`; | ||
} | ||
//# sourceMappingURL=REST.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
129684