guilded-api-typings
Advanced tools
Comparing version 0.2.1 to 0.3.0
# guilded-api-typings | ||
## 0.3.0 | ||
### Minor Changes | ||
- 727d276: # Features | ||
- Add `server` to `Routes` | ||
- Change `APIChannelType` into enum | ||
- Add `APIChannelTypeString` | ||
- Replace `APIEmbedThumbnail` and `APIEmbedImage` with `APIEmbedMedia` | ||
- Change `APIListItemNote` to `APINote` | ||
- Change `APIListItemNoteSummary` to `APINoteSummary` | ||
- Change `APIListItemNotePayload` to `APINotePayload` | ||
- Change `APIMessageType` into enum | ||
- Add `APIMessageTypeString` | ||
- Change `APIContentReaction` to `APIReaction` | ||
- Add `APIServer` | ||
- Add `APIServerType` | ||
- Add `APIServerTypeString` | ||
- Change `APIServerMemberNicknamePayload` to `APIServerNicknamePayload` | ||
- Change `APIServerXPPayload` to `APIServerXpPayload` | ||
- Chnage `APIForumThread` to `APITopic` | ||
- Change `APIForumThreadPayload` to `APITopicPayload` | ||
- Change `APIUserType` into enum | ||
- Add `APIUserTypeString` | ||
- Change `serverMemberNickname` to `serverNickname` in `Routes` | ||
- Change `forums` to `topics` in `Routes` | ||
- Change `serverMemberXP` to `serverMemberXp` in `Routes` | ||
- Change `serverRoleXP` to `serverRoleXp` in `Routes` | ||
- Add `APIMessagePayloadResolvable` | ||
- Add `APIMessageEditPayloadResolvable` | ||
# Fixes | ||
- Fix consistency in docs | ||
- Update to new route for topics | ||
## 0.2.1 | ||
@@ -4,0 +41,0 @@ |
@@ -1,31 +0,44 @@ | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
'use strict'; | ||
var __createBinding = | ||
(this && this.__createBinding) || | ||
(Object.create | ||
? function (o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { | ||
enumerable: true, | ||
get: function () { | ||
return m[k]; | ||
}, | ||
}; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
} | ||
: function (o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
}); | ||
var __exportStar = | ||
(this && this.__exportStar) || | ||
function (m, exports) { | ||
for (var p in m) | ||
if (p !== 'default' && !Object.prototype.hasOwnProperty.call(exports, p)) | ||
__createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
// Structures | ||
__exportStar(require("./structures/Channel"), exports); | ||
__exportStar(require("./structures/Doc"), exports); | ||
__exportStar(require("./structures/Embed"), exports); | ||
__exportStar(require("./structures/ForumThread"), exports); | ||
__exportStar(require("./structures/ListItem"), exports); | ||
__exportStar(require("./structures/Message"), exports); | ||
__exportStar(require("./structures/Server"), exports); | ||
__exportStar(require("./structures/User"), exports); | ||
__exportStar(require("./structures/Webhook"), exports); | ||
__exportStar(require('./structures/Channel'), exports); | ||
__exportStar(require('./structures/Doc'), exports); | ||
__exportStar(require('./structures/Embed'), exports); | ||
__exportStar(require('./structures/ListItem'), exports); | ||
__exportStar(require('./structures/Message'), exports); | ||
__exportStar(require('./structures/Server'), exports); | ||
__exportStar(require('./structures/Topic'), exports); | ||
__exportStar(require('./structures/User'), exports); | ||
__exportStar(require('./structures/Webhook'), exports); | ||
// WS | ||
__exportStar(require("./WSEvents"), exports); | ||
__exportStar(require('./WS'), exports); | ||
// Routes | ||
__exportStar(require("./Routes"), exports); | ||
//# sourceMappingURL=index.js.map | ||
__exportStar(require('./Routes'), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,213 +0,224 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.Routes = void 0; | ||
/** The Guilded REST API endpoints. */ | ||
/** The REST API endpoints for Guilded. */ | ||
exports.Routes = { | ||
/** | ||
* The REST API enpoint for channels. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelCreate | ||
*/ | ||
channels: () => `/channels`, | ||
/** | ||
* The REST API endpoint for a channel. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelRead | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelUpdate | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelDelete | ||
*/ | ||
channel: (channelId) => `/channels/${channelId}`, | ||
/** | ||
* The REST API endpoint for channel messages. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageCreate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageReadMany | ||
*/ | ||
messages: (channelId) => `/channels/${channelId}/messages`, | ||
/** | ||
* The REST API endpoint for a channel message. | ||
* @param channelId The ID of the channel. | ||
* @param messageId The ID of the message. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageRead | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageUpdate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageDelete | ||
*/ | ||
message: (channelId, messageId) => `/channels/${channelId}/messages/${messageId}`, | ||
/** | ||
* The REST API endpoint for a member nickname. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameUpdate | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameDelete | ||
*/ | ||
serverMemberNickname: (serverId, userId) => `/servers/${serverId}/members/${userId}/nickname`, | ||
/** | ||
* The REST API endpoint for a server member. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberRead | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberDelete | ||
*/ | ||
serverMember: (serverId, userId) => `/servers/${serverId}/members/${userId}`, | ||
/** | ||
* The REST API endpoint for server members. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberReadMany | ||
*/ | ||
serverMembers: (serverId) => `/servers/${serverId}/members`, | ||
/** | ||
* The REST API endpoint for a server ban. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanCreate | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanRead | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanDelete | ||
*/ | ||
serverBan: (serverId, userId) => `/servers/${serverId}/bans/${userId}`, | ||
/** | ||
* The REST API endpoint for server bans. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanReadMany | ||
*/ | ||
serverBans: (serverId) => `/servers/${serverId}/bans`, | ||
/** | ||
* The REST API endpoint for channel forums. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/forums/ForumThreadCreate | ||
*/ | ||
forums: (channelId) => `/channels/${channelId}/forum`, | ||
/** | ||
* The REST API endpoint for channel list items. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemReadMany | ||
*/ | ||
listItems: (channelId) => `/channels/${channelId}/items`, | ||
/** | ||
* The REST API endpoint for a channel list item. | ||
* @param channelId The ID of the channel. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemRead | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemUpdate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemDelete | ||
*/ | ||
listItem: (channelId, listItemId) => `/channels/${channelId}/items/${listItemId}`, | ||
/** | ||
* The REST API endpoint for completing and uncompleting a channel list item. | ||
* @param channelId The ID of the channel. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteDelete | ||
*/ | ||
listItemComplete: (channelId, listItemId) => `/channels/${channelId}/items/${listItemId}/complete`, | ||
/** | ||
* The REST API endpoint for channel docs. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocCreate | ||
* @see https://www.guilded.gg/docs/api/docs/DocReadMany | ||
*/ | ||
docs: (channelId) => `/channels/${channelId}/docs`, | ||
/** | ||
* The REST API endpoint for a channel doc. | ||
* @param channelId The ID of the channel. | ||
* @param docId The ID of the doc. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocRead | ||
* @see https://www.guilded.gg/docs/api/docs/DocUpdate | ||
* @see https://www.guilded.gg/docs/api/docs/DocDelete | ||
*/ | ||
doc: (channelId, docId) => `/channels/${channelId}/docs/${docId}`, | ||
/** | ||
* The REST API endpoint for a content reaction. | ||
* @param channelId The ID of the channel. | ||
* @param contentId The ID of the content. | ||
* @param emoteId The ID of the emote. | ||
* | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReactionCreate | ||
*/ | ||
reaction: (channelId, contentId, emoteId) => `/channels/${channelId}/content/${contentId}/emotes/${emoteId}`, | ||
/** | ||
* The REST API endpoint for server member XP. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForUserCreate | ||
*/ | ||
serverMemberXP: (serverId, userId) => `/servers/${serverId}/members/${userId}/xp`, | ||
/** | ||
* The REST API endpoint for server role XP. | ||
* @param serverId The ID of the server. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForRoleCreate | ||
*/ | ||
serverRoleXP: (serverId, roleId) => `/servers/${serverId}/roles/${roleId}/xp`, | ||
/** | ||
* The REST API endpoint for a server member social link. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* @param type The type of social link. | ||
* | ||
* @see https://www.guilded.gg/docs/api/socialLinks/MemberSocialLinkRead | ||
*/ | ||
socialLink: (serverId, userId, type) => `/servers/${serverId}/members/${userId}/social-links/${type}`, | ||
/** | ||
* The REST API endpoint for a group member. | ||
* @param groupId The ID of the group. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipDelete | ||
*/ | ||
groupMember: (groupId, userId) => `/groups/${groupId}/members/${userId}`, | ||
/** | ||
* The REST API endpoint for a server member role. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipDelete | ||
*/ | ||
serverMemberRole: (serverId, userId, roleId) => `/servers/${serverId}/members/${userId}/roles/${roleId}`, | ||
/** | ||
* The REST API endpoint for server member roles. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipReadMany | ||
*/ | ||
serverMemberRoles: (serverId, userId) => `/servers/${serverId}/members/${userId}/roles`, | ||
/** | ||
* The REST API endpoint for server webhooks. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookCreate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookReadMany | ||
*/ | ||
webhooks: (serverId) => `/servers/${serverId}/webhooks`, | ||
/** | ||
* The REST API endpoint for a server webhook. | ||
* @param serverId The ID of the server. | ||
* @param webhookId The ID of the webhook. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookRead | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookUpdate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookDelete | ||
*/ | ||
webhook: (serverId, webhookId) => `/servers/${serverId}/webhooks/${webhookId}`, | ||
/** | ||
* The enpoint for channels on Guilded. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelCreate | ||
*/ | ||
channels: () => `/channels`, | ||
/** | ||
* The endpoint for a channel on Guilded. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelRead | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelUpdate | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelDelete | ||
*/ | ||
channel: (channelId) => `/channels/${channelId}`, | ||
/** | ||
* The endpoint for a server on Guilded. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/servers/ServerRead | ||
*/ | ||
server: (serverId) => `/servers/${serverId}`, | ||
/** | ||
* The endpoint for messages on Guilded. | ||
* @param channelId The ID of the channel the messages belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageCreate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageReadMany | ||
*/ | ||
messages: (channelId) => `/channels/${channelId}/messages`, | ||
/** | ||
* The endpoint for a message on Guilded. | ||
* @param channelId The ID of the channel the message belongs to. | ||
* @param messageId The ID of the message. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageRead | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageUpdate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageDelete | ||
*/ | ||
message: (channelId, messageId) => `/channels/${channelId}/messages/${messageId}`, | ||
/** | ||
* The endpoint for a server nickname on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameUpdate | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameDelete | ||
*/ | ||
serverNickname: (serverId, memberId) => `/servers/${serverId}/members/${memberId}/nickname`, | ||
/** | ||
* The endpoint for a server member on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberRead | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberDelete | ||
*/ | ||
serverMember: (serverId, memberId) => `/servers/${serverId}/members/${memberId}`, | ||
/** | ||
* The endpoint for server members on Guilded. | ||
* @param serverId The ID of the server the members belong to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberReadMany | ||
*/ | ||
serverMembers: (serverId) => `/servers/${serverId}/members`, | ||
/** | ||
* The endpoint for a server ban on Guilded. | ||
* @param serverId The ID of the server the ban belongs to. | ||
* @param banId The ID of the ban. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanCreate | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanRead | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanDelete | ||
*/ | ||
serverBan: (serverId, banId) => `/servers/${serverId}/bans/${banId}`, | ||
/** | ||
* The endpoint for server bans on Guilded. | ||
* @param serverId The ID of the server the bans belong to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanReadMany | ||
*/ | ||
serverBans: (serverId) => `/servers/${serverId}/bans`, | ||
/** | ||
* The endpoint for topics. | ||
* @param channelId The ID of the channel the topics belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicCreate | ||
*/ | ||
topics: (channelId) => `/channels/${channelId}/topics`, | ||
/** | ||
* The endpoint for list items on Guilded. | ||
* @param channelId The ID of the channel the list items belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemReadMany | ||
*/ | ||
listItems: (channelId) => `/channels/${channelId}/items`, | ||
/** | ||
* The endpoint for a list item on Guilded. | ||
* @param channelId The ID of the channel the list item belongs to. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemRead | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemUpdate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemDelete | ||
*/ | ||
listItem: (channelId, listItemId) => `/channels/${channelId}/items/${listItemId}`, | ||
/** | ||
* The endpoint for list item completions on Guilded. | ||
* @param channelId The ID of the channel the list item belongs to. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteDelete | ||
*/ | ||
listItemComplete: (channelId, listItemId) => | ||
`/channels/${channelId}/items/${listItemId}/complete`, | ||
/** | ||
* The endpoint for docs on Guilded. | ||
* @param channelId The ID of the channel the docs belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocCreate | ||
* @see https://www.guilded.gg/docs/api/docs/DocReadMany | ||
*/ | ||
docs: (channelId) => `/channels/${channelId}/docs`, | ||
/** | ||
* The endpoint for a doc on Guilded. | ||
* @param channelId The ID of the channel the doc belongs to. | ||
* @param docId The ID of the doc. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocRead | ||
* @see https://www.guilded.gg/docs/api/docs/DocUpdate | ||
* @see https://www.guilded.gg/docs/api/docs/DocDelete | ||
*/ | ||
doc: (channelId, docId) => `/channels/${channelId}/docs/${docId}`, | ||
/** | ||
* The endpoint for a content reaction on Guilded. | ||
* @param channelId The ID of the channel the content belongs to. | ||
* @param contentId The ID of the content. | ||
* @param emoteId The ID of the emote. | ||
* | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReactionCreate | ||
*/ | ||
reaction: (channelId, contentId, emoteId) => | ||
`/channels/${channelId}/content/${contentId}/emotes/${emoteId}`, | ||
/** | ||
* The endpoint for server member XP on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForUserCreate | ||
*/ | ||
serverMemberXp: (serverId, memberId) => `/servers/${serverId}/members/${memberId}/xp`, | ||
/** | ||
* The endpoint for server role XP on Guilded. | ||
* @param serverId The ID of the server the role belongs to. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForRoleCreate | ||
*/ | ||
serverRoleXp: (serverId, roleId) => `/servers/${serverId}/roles/${roleId}/xp`, | ||
/** | ||
* The endpoint for a server member social link on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* @param type The type of social link. | ||
* | ||
* @see https://www.guilded.gg/docs/api/socialLinks/MemberSocialLinkRead | ||
*/ | ||
socialLink: (serverId, memberId, type) => | ||
`/servers/${serverId}/members/${memberId}/social-links/${type}`, | ||
/** | ||
* The endpoint for a group member on Guilded. | ||
* @param groupId The ID of the group the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipDelete | ||
*/ | ||
groupMember: (groupId, memberId) => `/groups/${groupId}/members/${memberId}`, | ||
/** | ||
* The endpoint for a server member role on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipDelete | ||
*/ | ||
serverMemberRole: (serverId, memberId, roleId) => | ||
`/servers/${serverId}/members/${memberId}/roles/${roleId}`, | ||
/** | ||
* The endpoint for server member roles on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipReadMany | ||
*/ | ||
serverMemberRoles: (serverId, memberId) => `/servers/${serverId}/members/${memberId}/roles`, | ||
/** | ||
* The endpoint for webhooks on Guilded. | ||
* @param serverId The ID of the server the webhooks belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookCreate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookReadMany | ||
*/ | ||
webhooks: (serverId) => `/servers/${serverId}/webhooks`, | ||
/** | ||
* The endpoint for a webhook on Guilded. | ||
* @param serverId The ID of the server the webhook belongs to. | ||
* @param webhookId The ID of the webhook. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookRead | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookUpdate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookDelete | ||
*/ | ||
webhook: (serverId, webhookId) => `/servers/${serverId}/webhooks/${webhookId}`, | ||
}; | ||
//# sourceMappingURL=Routes.js.map | ||
//# sourceMappingURL=Routes.js.map |
@@ -1,3 +0,21 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Channel.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.APIChannelType = void 0; | ||
/** | ||
* The type of a channel on Guilded. | ||
* @see https://www.guilded.gg/docs/api/channels/ServerChannel | ||
*/ | ||
var APIChannelType; | ||
(function (APIChannelType) { | ||
APIChannelType['Announcements'] = 'announcements'; | ||
APIChannelType['Chat'] = 'chat'; | ||
APIChannelType['Calendar'] = 'calendar'; | ||
APIChannelType['Forums'] = 'forums'; | ||
APIChannelType['Media'] = 'media'; | ||
APIChannelType['Docs'] = 'docs'; | ||
APIChannelType['Voice'] = 'voice'; | ||
APIChannelType['List'] = 'list'; | ||
APIChannelType['Scheduling'] = 'scheduling'; | ||
APIChannelType['Stream'] = 'stream'; | ||
})((APIChannelType = exports.APIChannelType || (exports.APIChannelType = {}))); | ||
//# sourceMappingURL=Channel.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Doc.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
//# sourceMappingURL=Doc.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Embed.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
//# sourceMappingURL=Embed.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=ListItem.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
//# sourceMappingURL=ListItem.js.map |
@@ -1,3 +0,13 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Message.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.APIMessageType = void 0; | ||
/** | ||
* The type of a message on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatMessage | ||
*/ | ||
var APIMessageType; | ||
(function (APIMessageType) { | ||
APIMessageType['Default'] = 'default'; | ||
APIMessageType['System'] = 'system'; | ||
})((APIMessageType = exports.APIMessageType || (exports.APIMessageType = {}))); | ||
//# sourceMappingURL=Message.js.map |
@@ -1,3 +0,19 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Server.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.APIServerType = void 0; | ||
/** | ||
* The type of a server on Guilded. | ||
* @see https://www.guilded.gg/docs/api/servers/Server | ||
*/ | ||
var APIServerType; | ||
(function (APIServerType) { | ||
APIServerType['Team'] = 'team'; | ||
APIServerType['Organization'] = 'organization'; | ||
APIServerType['Community'] = 'community'; | ||
APIServerType['Clan'] = 'clan'; | ||
APIServerType['Guild'] = 'guild'; | ||
APIServerType['Friends'] = 'friends'; | ||
APIServerType['Streaming'] = 'streaming'; | ||
APIServerType['Other'] = 'other'; | ||
})((APIServerType = exports.APIServerType || (exports.APIServerType = {}))); | ||
//# sourceMappingURL=Server.js.map |
@@ -1,3 +0,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=User.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.APIUserType = void 0; | ||
/** | ||
* The type of a user on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/User | ||
* @see https://www.guilded.gg/docs/api/members/UserSummary | ||
*/ | ||
var APIUserType; | ||
(function (APIUserType) { | ||
APIUserType['Bot'] = 'bot'; | ||
APIUserType['User'] = 'user'; | ||
})((APIUserType = exports.APIUserType || (exports.APIUserType = {}))); | ||
//# sourceMappingURL=User.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=Webhook.js.map | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
//# sourceMappingURL=Webhook.js.map |
{ | ||
"name": "guilded-api-typings", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"description": "Type definitions for the Guilded API.", | ||
@@ -12,5 +12,5 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"build": "yarn clear && yarn tsc", | ||
"clear": "yarn rimraf lib typings", | ||
"prepublishOnly": "yarn build" | ||
"build": "run clear && tsc", | ||
"clear": "rimraf lib typings", | ||
"prepublishOnly": "run build" | ||
}, | ||
@@ -17,0 +17,0 @@ "keywords": [ |
<div align="center"> | ||
<br /> | ||
<a href="https://guildedts.js.org"><img src="https://guildedts.js.org/media/banner.jpg" width="500" alt="Guilded.TS"/></a> | ||
<h3><strong>Type definitions for the <a href="https://www.guilded.gg">Guilded</a> API.</strong></h3> | ||
<a href="https://guildedts.js.org"> | ||
<img src="https://guildedts.js.org/media/banner.jpg" width="500" alt="Guilded.TS"/> | ||
</a> | ||
<h3>Type definitions for the <a href="https://guilded.gg">Guilded</a> API.</h3> | ||
<br /> | ||
<div> | ||
<a href="https://www.npmjs.com/package/guilded-api-typings"><img src="https://img.shields.io/npm/v/guilded-api-typings?style=for-the-badge" alt="Version" /></a> | ||
<a href="https://www.npmjs.com/package/guilded-api-typings"><img src="https://img.shields.io/npm/dt/guilded-api-typings?style=for-the-badge" alt="Downloads" /></a> | ||
<a href="https://www.npmjs.com/package/guilded-api-typings"><img src="https://img.shields.io/npm/l/guilded-api-typings?style=for-the-badge" alt="License: Apache-2.0"> | ||
<A href="https://guilded.gg/guildedts"> | ||
<img src="https://shields.yoki-labs.xyz/shields/vanity/guildedts?style=for-the-badge" alt="Guilded server"> | ||
</a> | ||
<a href="https://npmjs.com/guilded-api-typings"> | ||
<img src="https://img.shields.io/npm/v/guilded-api-typings?style=for-the-badge" alt="Version" /> | ||
</a> | ||
<a href="https://npmjs.com/guilded-api-typings"> | ||
<img src="https://img.shields.io/npm/dt/guilded-api-typings?style=for-the-badge" alt="Downloads" /> | ||
</a> | ||
<a href="https://github.com/guildedts/guilded.ts/blob/main/LICENSE"> | ||
<img src="https://img.shields.io/github/license/guildedts/guilded.ts?style=for-the-badge" alt="License" /> | ||
</a> | ||
</div> | ||
<br /> | ||
</div> | ||
@@ -15,23 +27,14 @@ | ||
- [GitHub](https://github.com/guildedts/guilded.ts) | ||
- [NPM](https://www.npmjs.com/package/guilded.ts) | ||
- [Guilded.TS Guilded Server](https://www.guilded.gg/guildedts) | ||
- [Guilded API Guilded server](https://www.guilded.gg/API-Official) | ||
- [Guide](https://guide.guildedts.js.org) | ||
- [Documentation](https://guildedts.js.org) | ||
- [GitHub](https://github.com/guildedts/guilded.ts/tree/main/packages/guilded-api-typings) | ||
- [NPM](https://npmjs.com/guilded-api-typings) | ||
- [Documentation](https://guildedts.js.org/modules/guilded_api_typings) | ||
# Installation | ||
``` | ||
npm i guilded-api-typings | ||
yarn add guilded-api-typings | ||
pnpm add guilded-api-typings | ||
``` | ||
- `npm i guilded-api-typings` | ||
- `yarn add guilded-api-typings` | ||
- `pnpm add guilded-api-typings` | ||
# Contributing | ||
[Contribute to Guilded.TS.](https://github.com/guildedts/guilded.ts/tree/main/.github/CONTRIBUTING.md) | ||
--- | ||
**Maintained by [Gamertike](https://www.gamertike.com). | Inspired by [discord.js](https://discord.js.org).** | ||
**Maintained by [Gamertike](https://gamertike.com) | [Contribute](https://github.com/guildedts/guilded.ts/tree/main/.github/CONTRIBUTING.md) | Inspired by [discord.js](https://discord.js.org)** |
export * from './structures/Channel'; | ||
export * from './structures/Doc'; | ||
export * from './structures/Embed'; | ||
export * from './structures/ForumThread'; | ||
export * from './structures/ListItem'; | ||
export * from './structures/Message'; | ||
export * from './structures/Server'; | ||
export * from './structures/Topic'; | ||
export * from './structures/User'; | ||
export * from './structures/Webhook'; | ||
export * from './WSEvents'; | ||
export * from './WS'; | ||
export * from './Routes'; | ||
//# sourceMappingURL=index.d.ts.map | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,210 +0,241 @@ | ||
/** The Guilded REST API endpoints. */ | ||
/** The REST API endpoints for Guilded. */ | ||
export declare const Routes: { | ||
/** | ||
* The REST API enpoint for channels. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelCreate | ||
*/ | ||
channels: () => '/channels'; | ||
/** | ||
* The REST API endpoint for a channel. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelRead | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelUpdate | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelDelete | ||
*/ | ||
channel: (channelId: string) => `/channels/${string}`; | ||
/** | ||
* The REST API endpoint for channel messages. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageCreate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageReadMany | ||
*/ | ||
messages: (channelId: string) => `/channels/${string}/messages`; | ||
/** | ||
* The REST API endpoint for a channel message. | ||
* @param channelId The ID of the channel. | ||
* @param messageId The ID of the message. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageRead | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageUpdate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageDelete | ||
*/ | ||
message: (channelId: string, messageId: string) => `/channels/${string}/messages/${string}`; | ||
/** | ||
* The REST API endpoint for a member nickname. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameUpdate | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameDelete | ||
*/ | ||
serverMemberNickname: (serverId: string, userId: string) => `/servers/${string}/members/${string}/nickname`; | ||
/** | ||
* The REST API endpoint for a server member. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberRead | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberDelete | ||
*/ | ||
serverMember: (serverId: string, userId: string) => `/servers/${string}/members/${string}`; | ||
/** | ||
* The REST API endpoint for server members. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberReadMany | ||
*/ | ||
serverMembers: (serverId: string) => `/servers/${string}/members`; | ||
/** | ||
* The REST API endpoint for a server ban. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanCreate | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanRead | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanDelete | ||
*/ | ||
serverBan: (serverId: string, userId: string) => `/servers/${string}/bans/${string}`; | ||
/** | ||
* The REST API endpoint for server bans. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanReadMany | ||
*/ | ||
serverBans: (serverId: string) => `/servers/${string}/bans`; | ||
/** | ||
* The REST API endpoint for channel forums. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/forums/ForumThreadCreate | ||
*/ | ||
forums: (channelId: string) => `/channels/${string}/forum`; | ||
/** | ||
* The REST API endpoint for channel list items. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemReadMany | ||
*/ | ||
listItems: (channelId: string) => `/channels/${string}/items`; | ||
/** | ||
* The REST API endpoint for a channel list item. | ||
* @param channelId The ID of the channel. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemRead | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemUpdate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemDelete | ||
*/ | ||
listItem: (channelId: string, listItemId: string) => `/channels/${string}/items/${string}`; | ||
/** | ||
* The REST API endpoint for completing and uncompleting a channel list item. | ||
* @param channelId The ID of the channel. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteDelete | ||
*/ | ||
listItemComplete: (channelId: string, listItemId: string) => `/channels/${string}/items/${string}/complete`; | ||
/** | ||
* The REST API endpoint for channel docs. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocCreate | ||
* @see https://www.guilded.gg/docs/api/docs/DocReadMany | ||
*/ | ||
docs: (channelId: string) => `/channels/${string}/docs`; | ||
/** | ||
* The REST API endpoint for a channel doc. | ||
* @param channelId The ID of the channel. | ||
* @param docId The ID of the doc. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocRead | ||
* @see https://www.guilded.gg/docs/api/docs/DocUpdate | ||
* @see https://www.guilded.gg/docs/api/docs/DocDelete | ||
*/ | ||
doc: (channelId: string, docId: number) => `/channels/${string}/docs/${number}`; | ||
/** | ||
* The REST API endpoint for a content reaction. | ||
* @param channelId The ID of the channel. | ||
* @param contentId The ID of the content. | ||
* @param emoteId The ID of the emote. | ||
* | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReactionCreate | ||
*/ | ||
reaction: (channelId: string, contentId: string, emoteId: number) => `/channels/${string}/content/${string}/emotes/${number}`; | ||
/** | ||
* The REST API endpoint for server member XP. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForUserCreate | ||
*/ | ||
serverMemberXP: (serverId: string, userId: string) => `/servers/${string}/members/${string}/xp`; | ||
/** | ||
* The REST API endpoint for server role XP. | ||
* @param serverId The ID of the server. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForRoleCreate | ||
*/ | ||
serverRoleXP: (serverId: string, roleId: number) => `/servers/${string}/roles/${number}/xp`; | ||
/** | ||
* The REST API endpoint for a server member social link. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* @param type The type of social link. | ||
* | ||
* @see https://www.guilded.gg/docs/api/socialLinks/MemberSocialLinkRead | ||
*/ | ||
socialLink: (serverId: string, userId: string, type: string) => `/servers/${string}/members/${string}/social-links/${string}`; | ||
/** | ||
* The REST API endpoint for a group member. | ||
* @param groupId The ID of the group. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipDelete | ||
*/ | ||
groupMember: (groupId: string, userId: string) => `/groups/${string}/members/${string}`; | ||
/** | ||
* The REST API endpoint for a server member role. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipDelete | ||
*/ | ||
serverMemberRole: (serverId: string, userId: string, roleId: number) => `/servers/${string}/members/${string}/roles/${number}`; | ||
/** | ||
* The REST API endpoint for server member roles. | ||
* @param serverId The ID of the server. | ||
* @param userId The ID of the user. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipReadMany | ||
*/ | ||
serverMemberRoles: (serverId: string, userId: string) => `/servers/${string}/members/${string}/roles`; | ||
/** | ||
* The REST API endpoint for server webhooks. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookCreate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookReadMany | ||
*/ | ||
webhooks: (serverId: string) => `/servers/${string}/webhooks`; | ||
/** | ||
* The REST API endpoint for a server webhook. | ||
* @param serverId The ID of the server. | ||
* @param webhookId The ID of the webhook. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookRead | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookUpdate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookDelete | ||
*/ | ||
webhook: (serverId: string, webhookId: string) => `/servers/${string}/webhooks/${string}`; | ||
/** | ||
* The enpoint for channels on Guilded. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelCreate | ||
*/ | ||
channels: () => '/channels'; | ||
/** | ||
* The endpoint for a channel on Guilded. | ||
* @param channelId The ID of the channel. | ||
* | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelRead | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelUpdate | ||
* @see https://www.guilded.gg/docs/api/channels/ChannelDelete | ||
*/ | ||
channel: (channelId: string) => `/channels/${string}`; | ||
/** | ||
* The endpoint for a server on Guilded. | ||
* @param serverId The ID of the server. | ||
* | ||
* @see https://www.guilded.gg/docs/api/servers/ServerRead | ||
*/ | ||
server: (serverId: string) => `/servers/${string}`; | ||
/** | ||
* The endpoint for messages on Guilded. | ||
* @param channelId The ID of the channel the messages belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageCreate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageReadMany | ||
*/ | ||
messages: (channelId: string) => `/channels/${string}/messages`; | ||
/** | ||
* The endpoint for a message on Guilded. | ||
* @param channelId The ID of the channel the message belongs to. | ||
* @param messageId The ID of the message. | ||
* | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageRead | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageUpdate | ||
* @see https://www.guilded.gg/docs/api/chat/ChannelMessageDelete | ||
*/ | ||
message: (channelId: string, messageId: string) => `/channels/${string}/messages/${string}`; | ||
/** | ||
* The endpoint for a server nickname on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameUpdate | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameDelete | ||
*/ | ||
serverNickname: ( | ||
serverId: string, | ||
memberId: string, | ||
) => `/servers/${string}/members/${string}/nickname`; | ||
/** | ||
* The endpoint for a server member on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberRead | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberDelete | ||
*/ | ||
serverMember: (serverId: string, memberId: string) => `/servers/${string}/members/${string}`; | ||
/** | ||
* The endpoint for server members on Guilded. | ||
* @param serverId The ID of the server the members belong to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberReadMany | ||
*/ | ||
serverMembers: (serverId: string) => `/servers/${string}/members`; | ||
/** | ||
* The endpoint for a server ban on Guilded. | ||
* @param serverId The ID of the server the ban belongs to. | ||
* @param banId The ID of the ban. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanCreate | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanRead | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanDelete | ||
*/ | ||
serverBan: (serverId: string, banId: string) => `/servers/${string}/bans/${string}`; | ||
/** | ||
* The endpoint for server bans on Guilded. | ||
* @param serverId The ID of the server the bans belong to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBanReadMany | ||
*/ | ||
serverBans: (serverId: string) => `/servers/${string}/bans`; | ||
/** | ||
* The endpoint for topics. | ||
* @param channelId The ID of the channel the topics belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/forums/ForumTopicCreate | ||
*/ | ||
topics: (channelId: string) => `/channels/${string}/topics`; | ||
/** | ||
* The endpoint for list items on Guilded. | ||
* @param channelId The ID of the channel the list items belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemReadMany | ||
*/ | ||
listItems: (channelId: string) => `/channels/${string}/items`; | ||
/** | ||
* The endpoint for a list item on Guilded. | ||
* @param channelId The ID of the channel the list item belongs to. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemRead | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemUpdate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemDelete | ||
*/ | ||
listItem: (channelId: string, listItemId: string) => `/channels/${string}/items/${string}`; | ||
/** | ||
* The endpoint for list item completions on Guilded. | ||
* @param channelId The ID of the channel the list item belongs to. | ||
* @param listItemId The ID of the list item. | ||
* | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteCreate | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCompleteDelete | ||
*/ | ||
listItemComplete: ( | ||
channelId: string, | ||
listItemId: string, | ||
) => `/channels/${string}/items/${string}/complete`; | ||
/** | ||
* The endpoint for docs on Guilded. | ||
* @param channelId The ID of the channel the docs belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocCreate | ||
* @see https://www.guilded.gg/docs/api/docs/DocReadMany | ||
*/ | ||
docs: (channelId: string) => `/channels/${string}/docs`; | ||
/** | ||
* The endpoint for a doc on Guilded. | ||
* @param channelId The ID of the channel the doc belongs to. | ||
* @param docId The ID of the doc. | ||
* | ||
* @see https://www.guilded.gg/docs/api/docs/DocRead | ||
* @see https://www.guilded.gg/docs/api/docs/DocUpdate | ||
* @see https://www.guilded.gg/docs/api/docs/DocDelete | ||
*/ | ||
doc: (channelId: string, docId: number) => `/channels/${string}/docs/${number}`; | ||
/** | ||
* The endpoint for a content reaction on Guilded. | ||
* @param channelId The ID of the channel the content belongs to. | ||
* @param contentId The ID of the content. | ||
* @param emoteId The ID of the emote. | ||
* | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReactionCreate | ||
*/ | ||
reaction: ( | ||
channelId: string, | ||
contentId: string, | ||
emoteId: number, | ||
) => `/channels/${string}/content/${string}/emotes/${number}`; | ||
/** | ||
* The endpoint for server member XP on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForUserCreate | ||
*/ | ||
serverMemberXp: ( | ||
serverId: string, | ||
memberId: string, | ||
) => `/servers/${string}/members/${string}/xp`; | ||
/** | ||
* The endpoint for server role XP on Guilded. | ||
* @param serverId The ID of the server the role belongs to. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForRoleCreate | ||
*/ | ||
serverRoleXp: (serverId: string, roleId: number) => `/servers/${string}/roles/${number}/xp`; | ||
/** | ||
* The endpoint for a server member social link on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* @param type The type of social link. | ||
* | ||
* @see https://www.guilded.gg/docs/api/socialLinks/MemberSocialLinkRead | ||
*/ | ||
socialLink: ( | ||
serverId: string, | ||
memberId: string, | ||
type: string, | ||
) => `/servers/${string}/members/${string}/social-links/${string}`; | ||
/** | ||
* The endpoint for a group member on Guilded. | ||
* @param groupId The ID of the group the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/groupMembership/GroupMembershipDelete | ||
*/ | ||
groupMember: (groupId: string, memberId: string) => `/groups/${string}/members/${string}`; | ||
/** | ||
* The endpoint for a server member role on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* @param roleId The ID of the role. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipCreate | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipDelete | ||
*/ | ||
serverMemberRole: ( | ||
serverId: string, | ||
memberId: string, | ||
roleId: number, | ||
) => `/servers/${string}/members/${string}/roles/${number}`; | ||
/** | ||
* The endpoint for server member roles on Guilded. | ||
* @param serverId The ID of the server the member belongs to. | ||
* @param memberId The ID of the member. | ||
* | ||
* @see https://www.guilded.gg/docs/api/roleMembership/RoleMembershipReadMany | ||
*/ | ||
serverMemberRoles: ( | ||
serverId: string, | ||
memberId: string, | ||
) => `/servers/${string}/members/${string}/roles`; | ||
/** | ||
* The endpoint for webhooks on Guilded. | ||
* @param serverId The ID of the server the webhooks belongs to. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookCreate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookReadMany | ||
*/ | ||
webhooks: (serverId: string) => `/servers/${string}/webhooks`; | ||
/** | ||
* The endpoint for a webhook on Guilded. | ||
* @param serverId The ID of the server the webhook belongs to. | ||
* @param webhookId The ID of the webhook. | ||
* | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookRead | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookUpdate | ||
* @see https://www.guilded.gg/docs/api/webhook/WebhookDelete | ||
*/ | ||
webhook: (serverId: string, webhookId: string) => `/servers/${string}/webhooks/${string}`; | ||
}; | ||
//# sourceMappingURL=Routes.d.ts.map | ||
//# sourceMappingURL=Routes.d.ts.map |
/** | ||
* The API channel model. | ||
* Represents a channel on Guilded. | ||
* @see https://www.guilded.gg/docs/api/channels/ServerChannel | ||
*/ | ||
export interface APIChannel { | ||
/** The ID of the channel. */ | ||
id: string; | ||
/** The type of channel. */ | ||
type: APIChannelType; | ||
/** The name of the channel. */ | ||
name: string; | ||
/** The topic of the channel. */ | ||
topic?: string; | ||
/** The date the channel was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the channel. */ | ||
createdBy: string; | ||
/** The date the channel was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the server the channel belongs to. */ | ||
serverId: string; | ||
/** The ID of the parent channel. */ | ||
parentId?: string; | ||
/** The ID of the category the channel belongs to. */ | ||
categoryId?: number; | ||
/** The ID of the group the channel belongs to. */ | ||
groupId: string; | ||
/** Whether this channel is public. */ | ||
isPublic?: boolean; | ||
/** The ID of the user who archived the channel. */ | ||
archivedBy?: string; | ||
/** The date the channel was archived. */ | ||
archivedAt?: string; | ||
/** The ID of the channel. */ | ||
id: string; | ||
/** The type of the channel. */ | ||
type: APIChannelTypeString; | ||
/** The name of the channel. */ | ||
name: string; | ||
/** The topic of the channel. */ | ||
topic?: string; | ||
/** The date the channel was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the channel. */ | ||
createdBy: string; | ||
/** The date the channel was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the server the channel belongs to. */ | ||
serverId: string; | ||
/** The ID of the parent channel the channel belongs to. */ | ||
parentId?: string; | ||
/** The ID of the category the channel belongs to. */ | ||
categoryId?: number; | ||
/** The ID of the group the channel belongs to. */ | ||
groupId: string; | ||
/** Whether the channel is public. */ | ||
isPublic?: boolean; | ||
/** The ID of the user that archived the channel. */ | ||
archivedBy?: string; | ||
/** The date the channel was archived. */ | ||
archivedAt?: string; | ||
} | ||
/** | ||
* The API channel types. | ||
* The type of a channel on Guilded. | ||
* @see https://www.guilded.gg/docs/api/channels/ServerChannel | ||
*/ | ||
export declare type APIChannelType = 'announcements' | 'chat' | 'calendar' | 'forums' | 'media' | 'docs' | 'voice' | 'list' | 'scheduling' | 'stream'; | ||
export declare enum APIChannelType { | ||
Announcements = 'announcements', | ||
Chat = 'chat', | ||
Calendar = 'calendar', | ||
Forums = 'forums', | ||
Media = 'media', | ||
Docs = 'docs', | ||
Voice = 'voice', | ||
List = 'list', | ||
Scheduling = 'scheduling', | ||
Stream = 'stream', | ||
} | ||
/** | ||
* The type string of a channel on Guilded. | ||
* @see https://www.guilded.gg/docs/api/channels/ServerChannel | ||
*/ | ||
export declare type APIChannelTypeString = `${APIChannelType}`; | ||
/** | ||
* The payload for creating a channel. | ||
@@ -45,10 +61,12 @@ * @see https://www.guilded.gg/docs/api/channels/ChannelCreate | ||
export interface APIChannelPayload extends APIChannelEditPayload { | ||
/** The type of channel. */ | ||
type?: APIChannelType; | ||
/** The ID of the server to create the channel in. */ | ||
serverId: string; | ||
/** The ID of the group to create the channel in. */ | ||
groupId?: string; | ||
/** The ID of the category to create the channel in. */ | ||
categoryId?: number; | ||
/** The name of the channel. */ | ||
name: string; | ||
/** The type of the channel. */ | ||
type: APIChannelTypeString; | ||
/** The ID of the server the channel belongs to. */ | ||
serverId?: string; | ||
/** The ID of the group the channel belongs to. */ | ||
groupId?: string; | ||
/** The ID of the category the channel belongs to. */ | ||
categoryId?: number; | ||
} | ||
@@ -60,31 +78,47 @@ /** | ||
export interface APIChannelEditPayload { | ||
/** The name of the channel. */ | ||
name?: string; | ||
/** The topic of the channel. */ | ||
topic?: string; | ||
/** Whether this channel is public. */ | ||
isPublic?: boolean; | ||
/** The name of the channel. */ | ||
name?: string; | ||
/** The topic of the channel. */ | ||
topic?: string; | ||
/** Whether the channel is public. */ | ||
isPublic?: boolean; | ||
} | ||
/** | ||
* The API mentions model. | ||
* Represents mentions on Guilded. | ||
* @see https://www.guilded.gg/docs/api/channels/Mentions | ||
*/ | ||
export interface APIMentions { | ||
/** The users that were mentioned. */ | ||
users?: { | ||
id: string; | ||
}[]; | ||
/** The channels that were mentioned. */ | ||
channels?: { | ||
id: string; | ||
}[]; | ||
/** The roles that were mentioned. */ | ||
roles?: { | ||
id: number; | ||
}[]; | ||
/** Whether `@everyone` was mentioned. */ | ||
everyone?: boolean; | ||
/** Whether `@here` was mentioned. */ | ||
here?: boolean; | ||
/** The users that were mentioned. */ | ||
users?: { | ||
id: string; | ||
}[]; | ||
/** The channels that were mentioned. */ | ||
channels?: { | ||
id: string; | ||
}[]; | ||
/** The roles that were mentioned. */ | ||
roles?: { | ||
id: number; | ||
}[]; | ||
/** Whether everyone was mentioned. */ | ||
everyone?: boolean; | ||
/** Whether here was mentioned. */ | ||
here?: boolean; | ||
} | ||
//# sourceMappingURL=Channel.d.ts.map | ||
/** | ||
* Represents a content reaction on Guilded. | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReaction | ||
*/ | ||
export interface APIReaction { | ||
/** The ID of the reaction. */ | ||
id: number; | ||
/** The ID of the server the reaction belongs to. */ | ||
serverId?: string; | ||
/** The date the reaction was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the reaction. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the reaction. */ | ||
createdByWebhookId?: string; | ||
} | ||
//# sourceMappingURL=Channel.d.ts.map |
@@ -1,27 +0,27 @@ | ||
import { APIMentions } from "./Channel"; | ||
import { APIMentions } from './Channel'; | ||
/** | ||
* The API doc model. | ||
* Represents a doc on Guilded. | ||
* @see https://www.guilded.gg/docs/api/docs/Doc | ||
*/ | ||
export interface APIDoc { | ||
/** The ID of the doc. */ | ||
id: number; | ||
/** The ID of the server the doc belongs to. */ | ||
serverId: string; | ||
/** The ID of the channel the doc belongs to. */ | ||
channelId: string; | ||
/** The title of the doc. */ | ||
title: string; | ||
/** The content of the doc. */ | ||
content: string; | ||
/** The mentions of the doc. */ | ||
mentions?: APIMentions; | ||
/** The date the doc was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the doc. */ | ||
createdBy: string; | ||
/** The date the doc was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user who edited the doc. */ | ||
updatedBy?: string; | ||
/** The ID of the doc. */ | ||
id: number; | ||
/** The ID of the server the doc belongs to. */ | ||
serverId: string; | ||
/** The ID of the channel the doc belongs to. */ | ||
channelId: string; | ||
/** The title of the doc. */ | ||
title: string; | ||
/** The content of the doc. */ | ||
content: string; | ||
/** The mentions of the doc. */ | ||
mentions?: APIMentions; | ||
/** The date the doc was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the doc. */ | ||
createdBy: string; | ||
/** The date the doc was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user that edited the doc. */ | ||
updatedBy?: string; | ||
} | ||
@@ -31,8 +31,9 @@ /** | ||
* @see https://www.guilded.gg/docs/api/docs/DocCreate | ||
* @see https://www.guilded.gg/docs/api/docs/DocUpdate | ||
*/ | ||
export interface APIDocPayload { | ||
/** The title of the doc. */ | ||
title: string; | ||
/** The content of the doc. */ | ||
content: string; | ||
/** The title of the doc. */ | ||
title: string; | ||
/** The content of the doc. */ | ||
content: string; | ||
} | ||
@@ -44,7 +45,7 @@ /** | ||
export interface APIFetchDocsQuery { | ||
/** The date to fetch docs before. */ | ||
before?: string; | ||
/** The maximum number of docs to fetch. */ | ||
limit?: number; | ||
/** The date to fetch docs before. */ | ||
before?: string; | ||
/** The maximum number of docs to fetch. */ | ||
limit?: number; | ||
} | ||
//# sourceMappingURL=Doc.d.ts.map | ||
//# sourceMappingURL=Doc.d.ts.map |
/** | ||
* The API embed model. | ||
* Represents a embed on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatEmbed | ||
*/ | ||
export interface APIEmbed { | ||
/** The title of the embed. */ | ||
title?: string; | ||
/** The description of the embed. */ | ||
description?: string; | ||
/** The URL of the embed. */ | ||
url?: string; | ||
/** The color of the embed. */ | ||
color?: number; | ||
/** The footer of the embed. */ | ||
footer?: APIEmbedFooter; | ||
/** The timestamp of the embed. */ | ||
timestamp?: string; | ||
/** The thumbnail of the embed. */ | ||
thumbnail?: APIEmbedThumbnail; | ||
/** The image of the embed. */ | ||
image?: APIEmbedImage; | ||
/** The author of the embed. */ | ||
author?: APIEmbedAuthor; | ||
/** The fields of the embed. */ | ||
fields?: APIEmbedField[]; | ||
/** The title of the embed. */ | ||
title?: string; | ||
/** The description of the embed. */ | ||
description?: string; | ||
/** The URL of the embed. */ | ||
url?: string; | ||
/** The color of the embed. */ | ||
color?: number; | ||
/** The footer of the embed. */ | ||
footer?: APIEmbedFooter; | ||
/** The timestamp of the embed. */ | ||
timestamp?: string; | ||
/** The thumbnail of the embed. */ | ||
thumbnail?: APIEmbedMedia; | ||
/** The image of the embed. */ | ||
image?: APIEmbedMedia; | ||
/** The author of the embed. */ | ||
author?: APIEmbedAuthor; | ||
/** The fields of the embed. */ | ||
fields?: APIEmbedField[]; | ||
} | ||
/** | ||
* The API embed footer object. | ||
* Represents a embed footer on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatEmbed | ||
*/ | ||
export interface APIEmbedFooter { | ||
/** The icon URL of the footer. */ | ||
icon_url?: string; | ||
/** The text of the footer. */ | ||
text: string; | ||
/** The icon URL of the footer. */ | ||
icon_url?: string; | ||
/** The text of the footer. */ | ||
text: string; | ||
} | ||
/** | ||
* The API embed thumbnail object. | ||
* Represents embed media on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatEmbed | ||
*/ | ||
export interface APIEmbedThumbnail { | ||
/** The URL of the thumbnail. */ | ||
url?: string; | ||
export interface APIEmbedMedia { | ||
/** The URL of the media. */ | ||
url?: string; | ||
} | ||
/** | ||
* The API embed image object. | ||
* Represents a embed author on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatEmbed | ||
*/ | ||
export interface APIEmbedImage { | ||
/** The URL of the image. */ | ||
url?: string; | ||
} | ||
/** | ||
* The API embed author object. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatEmbed | ||
*/ | ||
export interface APIEmbedAuthor { | ||
/** The name of the author. */ | ||
name?: string; | ||
/** The URL of the author. */ | ||
url?: string; | ||
/** The icon URL of the author. */ | ||
icon_url?: string; | ||
/** The name of the author. */ | ||
name?: string; | ||
/** The URL of the author. */ | ||
url?: string; | ||
/** The icon URL of the author. */ | ||
icon_url?: string; | ||
} | ||
/** | ||
* The API embed field object. | ||
* Represents a embed field on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatEmbed | ||
*/ | ||
export interface APIEmbedField { | ||
/** The name of the field. */ | ||
name: string; | ||
/** The value of the field. */ | ||
value: string; | ||
/** Whether the field is inline. */ | ||
inline?: boolean; | ||
/** The name of the field. */ | ||
name: string; | ||
/** The value of the field. */ | ||
value: string; | ||
/** Whether the field is inline. */ | ||
inline?: boolean; | ||
} | ||
//# sourceMappingURL=Embed.d.ts.map | ||
//# sourceMappingURL=Embed.d.ts.map |
@@ -1,65 +0,67 @@ | ||
import { APIMentions } from "./Channel"; | ||
import { APIMentions } from './Channel'; | ||
/** | ||
* The API list item medel. | ||
* Represents a list item on Guilded. | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItem | ||
*/ | ||
export interface APIListItem extends APIListItemSummary { | ||
/** The note of the list item. */ | ||
note?: APIListItemNote; | ||
/** The note of the list item. */ | ||
note?: APINote; | ||
} | ||
/** | ||
* The API list item summary model. | ||
* Represents a summary of a list item on Guilded. | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemSummary | ||
*/ | ||
export interface APIListItemSummary { | ||
/** The ID of the list item. */ | ||
id: string; | ||
/** The ID of the server the list item belongs to. */ | ||
serverId: string; | ||
/** The ID of the channel the list item belongs to. */ | ||
channelId: string; | ||
/** The message of the list item. */ | ||
message: string; | ||
/** The mentions of the list item. */ | ||
mentions?: APIMentions; | ||
/** The date the list item was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the list item. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the list item. */ | ||
createdByWebhookId?: string; | ||
/** The date the list item was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user who edited the list item. */ | ||
updatedBy?: string; | ||
/** The ID of the parent list item. */ | ||
parentListItemId?: string; | ||
/** The date the list item was created. */ | ||
completedAt?: string; | ||
/** The ID of the user who completed the list item. */ | ||
completedBy?: string; | ||
/** The note of the list item. */ | ||
note?: APIListItemNoteSummary; | ||
/** The ID of the list item. */ | ||
id: string; | ||
/** The ID of the server the list item belongs to. */ | ||
serverId: string; | ||
/** The ID of the channel the list item belongs to. */ | ||
channelId: string; | ||
/** The message of the list item. */ | ||
message: string; | ||
/** The mentions of the list item. */ | ||
mentions?: APIMentions; | ||
/** The date the list item was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the list item. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the list item. */ | ||
createdByWebhookId?: string; | ||
/** The date the list item was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user that edited the list item. */ | ||
updatedBy?: string; | ||
/** The ID of the parent list item that the list item belongs to. */ | ||
parentListItemId?: string; | ||
/** The date the list item was created. */ | ||
completedAt?: string; | ||
/** The ID of the user that completed the list item. */ | ||
completedBy?: string; | ||
/** The note of the list item. */ | ||
note?: APINoteSummary; | ||
} | ||
/** | ||
* The API list item note medel. | ||
* Represents a list item note on Guilded. | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItem | ||
*/ | ||
export interface APIListItemNote extends APIListItemSummary { | ||
/** The contern of the note. */ | ||
content: string; | ||
export interface APINote extends APINoteSummary { | ||
/** The content of the note. */ | ||
content: string; | ||
} | ||
/** | ||
* The API list item note summary model. | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItem | ||
* Represents a summary of a note on a list item on Guilded. | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemSummary | ||
*/ | ||
export interface APIListItemNoteSummary { | ||
/** The date the note was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the note. */ | ||
createdBy: string; | ||
/** The date the note was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user who edited the note. */ | ||
updatedBy?: string; | ||
export interface APINoteSummary { | ||
/** The mentions of the note. */ | ||
mentions?: APIMentions; | ||
/** The date the note was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the note. */ | ||
createdBy: string; | ||
/** The date the note was edited. */ | ||
updatedAt?: string; | ||
/** The ID of the user that edited the note. */ | ||
updatedBy?: string; | ||
} | ||
@@ -71,15 +73,15 @@ /** | ||
export interface APIListItemPayload { | ||
/** The message of the list item. */ | ||
message: string; | ||
/** The note of the list item. */ | ||
note?: APIListItemNotePayload; | ||
/** The message of the list item. */ | ||
message: string; | ||
/** The note of the list item. */ | ||
note?: APINotePayload; | ||
} | ||
/** | ||
* The API list item note payload object. | ||
* The payload for creating a note. | ||
* @see https://www.guilded.gg/docs/api/listItems/ListItemCreate | ||
*/ | ||
export interface APIListItemNotePayload { | ||
/** The content of the note. */ | ||
content: string; | ||
export interface APINotePayload { | ||
/** The content of the note. */ | ||
content: string; | ||
} | ||
//# sourceMappingURL=ListItem.d.ts.map | ||
//# sourceMappingURL=ListItem.d.ts.map |
import { APIMentions } from './Channel'; | ||
import { APIEmbed } from './Embed'; | ||
/** | ||
* The API message model. | ||
* Represents a message on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatMessage | ||
*/ | ||
export interface APIMessage { | ||
/** The ID of the message. */ | ||
id: string; | ||
/** The type of message. */ | ||
type: APIMessageType; | ||
/** The ID of the server the message belongs to. */ | ||
serverId?: string; | ||
/** The ID of the channel the message belongs to. */ | ||
channelId: string; | ||
/** The content of the message. */ | ||
content?: string; | ||
/** The embeds of the message. */ | ||
embeds?: APIEmbed[]; | ||
/** The IDs of messages that were replied to. */ | ||
replyMessageIds?: string[]; | ||
/** Whether the message is private. */ | ||
isPrivate?: boolean; | ||
/** Whether the message is silent. */ | ||
isSilent?: boolean; | ||
/** The mentions of the message. */ | ||
mentions?: APIMentions; | ||
/** The date the message was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the message. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the message. */ | ||
createdByWebhookId?: string; | ||
/** The date the message was edited. */ | ||
updatedAt?: string; | ||
export interface APIMessage extends Omit<APIMessageSummary, 'deletedAt'> { | ||
/** The type of the message. */ | ||
type: APIMessageTypeString; | ||
/** The content of the message. */ | ||
content?: string; | ||
/** The embeds of the message. */ | ||
embeds?: APIEmbed[]; | ||
/** The IDs of messages that were replied to. */ | ||
replyMessageIds?: string[]; | ||
/** Whether the message is silent. */ | ||
isSilent?: boolean; | ||
/** The mentions of the message. */ | ||
mentions?: APIMentions; | ||
/** The date the message was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the message. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the message. */ | ||
createdByWebhookId?: string; | ||
/** The date the message was edited. */ | ||
updatedAt?: string; | ||
} | ||
/** | ||
* The API message summary model. | ||
* Represents a summary of a message on Guilded. | ||
* @see https://www.guilded.gg/docs/api/websockets/ChatMessageDeleted | ||
*/ | ||
export interface APIMessageSummary { | ||
/** The ID of the message. */ | ||
id: string; | ||
/** The ID of the server the message belongs to. */ | ||
serverId?: string; | ||
/** The ID of the channel the message belongs to. */ | ||
channelId: string; | ||
/** The date the message was deleted. */ | ||
deletedAt: string; | ||
/** Whether the message is private. */ | ||
isPrivate?: boolean; | ||
/** The ID of the message. */ | ||
id: string; | ||
/** The ID of the server the message belongs to. */ | ||
serverId?: string; | ||
/** The ID of the channel the message belongs to. */ | ||
channelId: string; | ||
/** The date the message was deleted. */ | ||
deletedAt: string; | ||
/** Whether the message is private. */ | ||
isPrivate?: boolean; | ||
} | ||
/** | ||
* The API message types. | ||
* The type of a message on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatMessage | ||
*/ | ||
export declare type APIMessageType = 'default' | 'system'; | ||
export declare enum APIMessageType { | ||
Default = 'default', | ||
System = 'system', | ||
} | ||
/** | ||
* The type string of a message on Guilded. | ||
* @see https://www.guilded.gg/docs/api/chat/ChatMessage | ||
*/ | ||
export declare type APIMessageTypeString = `${APIMessageType}`; | ||
/** | ||
* The payload for creating a message. | ||
@@ -63,8 +63,8 @@ * @see https://www.guilded.gg/docs/api/chat/ChannelMessageCreate | ||
export interface APIMessagePayload extends APIMessageEditPayload { | ||
/** Whether the message is private. */ | ||
isPrivate?: boolean; | ||
/** Whether the message is silent. */ | ||
isSilent?: boolean; | ||
/** The IDs of messages to reply to. */ | ||
replyMessageIds?: string[]; | ||
/** Whether the message is private. */ | ||
isPrivate?: boolean; | ||
/** Whether the message is silent. */ | ||
isSilent?: boolean; | ||
/** The IDs of messages to reply to. */ | ||
replyMessageIds?: string[]; | ||
} | ||
@@ -76,7 +76,11 @@ /** | ||
export interface APIMessageEditPayload { | ||
/** The content of the message. */ | ||
content?: string; | ||
/** The embeds of the message. */ | ||
embeds?: APIEmbed[]; | ||
/** The content of the message. */ | ||
content?: string; | ||
/** The embeds of the message. */ | ||
embeds?: APIEmbed[]; | ||
} | ||
/** The resolvable payload for creating a message. */ | ||
export declare type APIMessagePayloadResolvable = string | APIEmbed[] | APIMessagePayload; | ||
/** The resolvable payload for editing a message. */ | ||
export declare type APIMessageEditPayloadResolvable = string | APIEmbed[] | APIMessageEditPayload; | ||
/** | ||
@@ -87,27 +91,11 @@ * The query parameters for fetching messages. | ||
export interface APIFetchMessagesQuery { | ||
/** A date to fetch messages before. */ | ||
before?: string; | ||
/** A date to fetch messages after. */ | ||
after?: string; | ||
/** The limit of messages to fetch. */ | ||
limit?: number; | ||
/** Whether to include private messages. */ | ||
includePrivate?: boolean; | ||
/** The date to fetch messages before. */ | ||
before?: string; | ||
/** The date to fetch messages after. */ | ||
after?: string; | ||
/** The limit of messages to fetch. */ | ||
limit?: number; | ||
/** Whether to include private messages. */ | ||
includePrivate?: boolean; | ||
} | ||
/** | ||
* The API content reaction model. | ||
* @see https://www.guilded.gg/docs/api/reactions/ContentReaction | ||
*/ | ||
export interface APIContentReaction { | ||
/** The ID of the reaction. */ | ||
id: number; | ||
/** The ID of the server the reaction belongs to. */ | ||
serverId?: string; | ||
/** The date the reaction was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the reaction. */ | ||
createdBy: string; | ||
/** The ID of the webhook that created the reaction. */ | ||
createdByWebhookId?: string; | ||
} | ||
//# sourceMappingURL=Message.d.ts.map | ||
//# sourceMappingURL=Message.d.ts.map |
import { APIUser, APIUserSummary } from './User'; | ||
/** | ||
* The API server member model. | ||
* Represents a server on Guilded. | ||
* @see https://www.guilded.gg/docs/api/servers/Server | ||
*/ | ||
export interface APIServer { | ||
/** The ID of the server. */ | ||
id: string; | ||
/** The ID of the user the server belongs to. */ | ||
ownerId: string; | ||
/** The type of the server. */ | ||
type?: APIServerTypeString; | ||
/** The name of the server. */ | ||
name: string; | ||
/** The vanity URL of the server. */ | ||
url?: string; | ||
/** The description of the server. */ | ||
about?: string; | ||
/** The URL of the server's avatar. */ | ||
avatar?: string; | ||
/** The URL of the server's banner. */ | ||
banner?: string; | ||
/** The timezone of the server. */ | ||
timezone?: string; | ||
/** Whether the server is verified. */ | ||
isVerified?: boolean; | ||
/** The ID of the server's default channel. */ | ||
defaultChannelId?: string; | ||
/** The date the server was created. */ | ||
createdAt: string; | ||
} | ||
/** | ||
* The type of a server on Guilded. | ||
* @see https://www.guilded.gg/docs/api/servers/Server | ||
*/ | ||
export declare enum APIServerType { | ||
Team = 'team', | ||
Organization = 'organization', | ||
Community = 'community', | ||
Clan = 'clan', | ||
Guild = 'guild', | ||
Friends = 'friends', | ||
Streaming = 'streaming', | ||
Other = 'other', | ||
} | ||
/** | ||
* The type string of a server on Guilded. | ||
* @see https://www.guilded.gg/docs/api/servers/Server | ||
*/ | ||
export declare type APIServerTypeString = `${APIServerType}`; | ||
/** | ||
* Represents a server member on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/ServerMember | ||
*/ | ||
export interface APIServerMember extends APIServerMemberSummary { | ||
/** The user of the server member. */ | ||
user: APIUser; | ||
/** The nickname of the server member. */ | ||
nickname?: string; | ||
/** The date the server member joined the server. */ | ||
joinedAt: string; | ||
/** Whether the server member is the owner of the server. */ | ||
isOwner?: boolean; | ||
user: APIUser; | ||
/** The nickname of the server member. */ | ||
nickname?: string; | ||
/** The date the member joined the server. */ | ||
joinedAt: string; | ||
/** Whether the server member is the owner of the server. */ | ||
isOwner?: boolean; | ||
} | ||
/** | ||
* The API server member summary model. | ||
* Represents a summary of a server member on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/ServerMemberSummary | ||
*/ | ||
export interface APIServerMemberSummary { | ||
/** The user of the server member. */ | ||
user: APIUserSummary; | ||
/** The IDs of roles the server member has. */ | ||
roleIds: number[]; | ||
/** The user the server member belongs to. */ | ||
user: APIUserSummary; | ||
/** The IDs of roles that belong to the server member. */ | ||
roleIds: number[]; | ||
} | ||
/** | ||
* The API server ban model. | ||
* Represents a server ban on Guilded. | ||
* @see https://www.guilded.gg/docs/api/member-bans/ServerMemberBan | ||
*/ | ||
export interface APIServerBan { | ||
/** The user that was banned. */ | ||
user: APIUserSummary; | ||
/** The reason for the ban. */ | ||
reason?: string; | ||
/** The ID of the user who created the ban. */ | ||
createdBy: string; | ||
/** The date the ban was created. */ | ||
createdAt: string; | ||
/** The user the server ban belongs to. */ | ||
user: APIUserSummary; | ||
/** The reason of the server ban. */ | ||
reason?: string; | ||
/** The ID of the user that created the server ban. */ | ||
createdBy: string; | ||
/** The date the server ban was created. */ | ||
createdAt: string; | ||
} | ||
/** The payload for editing a server member nickname. */ | ||
export interface APIServerMemberNicknamePayload { | ||
/** The nickname of the server member. */ | ||
nickname: string; | ||
/** | ||
* The payload for editing the nickname of a server member. | ||
* @see https://www.guilded.gg/docs/api/members/MemberNicknameUpdate | ||
*/ | ||
export interface APIServerNicknamePayload { | ||
/** The nickname of the server member. */ | ||
nickname: string; | ||
} | ||
@@ -50,25 +101,26 @@ /** | ||
export interface APIServerBanPayload { | ||
/** The reason for the ban. */ | ||
reason?: string; | ||
/** The reason of the server ban. */ | ||
reason?: string; | ||
} | ||
/** | ||
* The payload for awarding xp. | ||
* The payload for awarding XP. | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForUserCreate | ||
* @see https://www.guilded.gg/docs/api/server-xp/ServerXpForRoleCreate | ||
*/ | ||
export interface APIServerXPPayload { | ||
/** The amount of XP to award. */ | ||
amount: number; | ||
export interface APIServerXpPayload { | ||
/** The amount of XP to award. */ | ||
amount: number; | ||
} | ||
/** | ||
* The API social link model. | ||
* Represents a social link on Guilded. | ||
* @see https://www.guilded.gg/docs/api/socialLinks/MemberSocialLinkRead | ||
*/ | ||
export interface APISocialLink { | ||
/** The name of the external social link. */ | ||
handle?: string; | ||
/** The ID of the external social link. */ | ||
serviceId?: string; | ||
/** The type of social link. */ | ||
type: string; | ||
/** The handle of the social link. */ | ||
handle?: string; | ||
/** The ID of the service the social link belongs to. */ | ||
serviceId?: string; | ||
/** The type of the social link. */ | ||
type: string; | ||
} | ||
//# sourceMappingURL=Server.d.ts.map | ||
//# sourceMappingURL=Server.d.ts.map |
/** | ||
* The API user model. | ||
* Represents a user on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/User | ||
*/ | ||
export interface APIUser extends APIUserSummary { | ||
/** The URL of the user's banner. */ | ||
banner?: string; | ||
/** The date the user was created. */ | ||
createdAt: string; | ||
/** The URL of the user's banner. */ | ||
banner?: string; | ||
/** The date the user was created. */ | ||
createdAt: string; | ||
} | ||
/** | ||
* The API user summary model. | ||
* Represents a summary of a user on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/UserSummary | ||
*/ | ||
export interface APIUserSummary { | ||
/** The ID of the user. */ | ||
id: string; | ||
/** The type of user. */ | ||
type?: APIUserType; | ||
/** The name of the user. */ | ||
name: string; | ||
/** The URL of the user's avatar. */ | ||
avatar?: string; | ||
/** The ID of the user. */ | ||
id: string; | ||
/** The type of the user. */ | ||
type?: APIUserTypeString; | ||
/** The name of the user. */ | ||
name: string; | ||
/** The URL of the user's avatar. */ | ||
avatar?: string; | ||
} | ||
/** | ||
* The API user types. | ||
* The type of a user on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/User | ||
* @see https://www.guilded.gg/docs/api/members/UserSummary | ||
*/ | ||
export declare type APIUserType = 'bot' | 'user'; | ||
//# sourceMappingURL=User.d.ts.map | ||
export declare enum APIUserType { | ||
Bot = 'bot', | ||
User = 'user', | ||
} | ||
/** | ||
* The type string of a user on Guilded. | ||
* @see https://www.guilded.gg/docs/api/members/User | ||
* @see https://www.guilded.gg/docs/api/members/UserSummary | ||
*/ | ||
export declare type APIUserTypeString = `${APIUserType}`; | ||
//# sourceMappingURL=User.d.ts.map |
/** | ||
* The API webhook model. | ||
* Represents a webhook on Guilded. | ||
* @see https://www.guilded.gg/docs/api/webhook/Webhook | ||
*/ | ||
export interface APIWebhook { | ||
/** The ID of the webhook. */ | ||
id: string; | ||
/** The name of the webhook. */ | ||
name: string; | ||
/** The ID of the server the webhook belongs to. */ | ||
serverId: string; | ||
/** The ID of the channel the webhook belongs to. */ | ||
channelId: string; | ||
/** The date the webhook was created. */ | ||
createdAt: string; | ||
/** The ID of the user who created the webhook. */ | ||
createdBy: string; | ||
/** The date the webhook was deleted. */ | ||
deletedAt?: string; | ||
/** The token of the webhook. */ | ||
token?: string; | ||
/** The ID of the webhook. */ | ||
id: string; | ||
/** The name of the webhook. */ | ||
name: string; | ||
/** The ID of the server the webhook belongs to. */ | ||
serverId: string; | ||
/** The ID of the channel the webhook belongs to. */ | ||
channelId: string; | ||
/** The date the webhook was created. */ | ||
createdAt: string; | ||
/** The ID of the user that created the webhook. */ | ||
createdBy: string; | ||
/** The date the webhook was deleted. */ | ||
deletedAt?: string; | ||
/** The token of the webhook. */ | ||
token?: string; | ||
} | ||
@@ -28,4 +28,4 @@ /** | ||
export interface APIWebhookPayload extends APIWebhookEditPayload { | ||
/** The ID of the channel the webhook belongs to. */ | ||
channelId: string; | ||
/** The ID of the channel the webhook belongs to. */ | ||
channelId: string; | ||
} | ||
@@ -37,6 +37,6 @@ /** | ||
export interface APIWebhookEditPayload { | ||
/** The name of the webhook. */ | ||
name: string; | ||
/** The ID of the channel the webhook belongs to. */ | ||
channelId?: string; | ||
/** The name of the webhook. */ | ||
name: string; | ||
/** The ID of the channel the webhook belongs to. */ | ||
channelId?: string; | ||
} | ||
@@ -48,5 +48,5 @@ /** | ||
export interface APIFetchWebhooksQuery { | ||
/** The ID of the channel to webhooks belong to. */ | ||
channelId: string; | ||
/** The ID of the channel the webhooks belong to. */ | ||
channelId: string; | ||
} | ||
//# sourceMappingURL=Webhook.d.ts.map | ||
//# sourceMappingURL=Webhook.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79176
1542
40