guilded-api-typings
Advanced tools
Comparing version 0.4.0 to 0.5.0
# guilded-api-typings | ||
## 0.5.0 | ||
### Minor Changes | ||
- # Features | ||
- Add `APIMessageReaction` | ||
- Add `APIEmote` | ||
- Add `APIClientUser` | ||
- Add `WSReadyPayload` | ||
- Add `ChannelMessageReactionCreated` to `WSEvents` | ||
- Add `ChannelMessageReactionDeleted` to `WSEvents` | ||
# Fixes | ||
- Fix incorrect typings in `WSOpCodes` | ||
## 0.4.0 | ||
@@ -4,0 +21,0 @@ |
@@ -7,7 +7,7 @@ "use strict"; | ||
(function (WSOpCodes) { | ||
/** The event operation code. */ | ||
WSOpCodes[WSOpCodes["Event"] = 0] = "Event"; | ||
/** The ready operation code. */ | ||
WSOpCodes[WSOpCodes["Ready"] = 0] = "Ready"; | ||
/** The event operation code. */ | ||
WSOpCodes[WSOpCodes["Event"] = 1] = "Event"; | ||
WSOpCodes[WSOpCodes["Ready"] = 1] = "Ready"; | ||
})(WSOpCodes = exports.WSOpCodes || (exports.WSOpCodes = {})); | ||
//# sourceMappingURL=WS.js.map |
{ | ||
"name": "guilded-api-typings", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Type definitions for the Guilded API.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
import { APIMentions } from './Channel'; | ||
import { APIEmbed } from './Embed'; | ||
import { APIEmote } from './Server'; | ||
/** | ||
@@ -98,2 +99,17 @@ * Represents a message on Guilded. | ||
} | ||
/** | ||
* Represents a message reaction on Guilded. | ||
* @see https://www.guilded.gg/docs/api/websockets/ChannelMessageReactionCreated | ||
* @see https://www.guilded.gg/docs/api/websockets/ChannelMessageReactionDeleted | ||
*/ | ||
export interface APIMessageReaction { | ||
/** The ID of the channel the message belongs to. */ | ||
channelId: string; | ||
/** The ID of the message. */ | ||
messageId: string; | ||
/** The ID of the user that created the reaction. */ | ||
createdBy: string; | ||
/** The emote of the reaction. */ | ||
emote: APIEmote; | ||
} | ||
//# sourceMappingURL=Message.d.ts.map |
@@ -125,2 +125,14 @@ import { APIUser, APIUserSummary } from './User'; | ||
} | ||
/** | ||
* Represents a emote on Guilded. | ||
* @see https://www.guilded.gg/docs/api/emote/Emote | ||
*/ | ||
export interface APIEmote { | ||
/** The ID of the emote. */ | ||
id: number; | ||
/** The name of the emote. */ | ||
name: string; | ||
/** The URL of the emote. */ | ||
url: string; | ||
} | ||
//# sourceMappingURL=Server.d.ts.map |
@@ -40,2 +40,9 @@ /** | ||
export declare type APIUserTypeString = `${APIUserType}`; | ||
/** Represents a client user. */ | ||
export interface APIClientUser extends APIUser { | ||
/** The bot ID of the client user. */ | ||
botId: string; | ||
/** The ID of the user that created the client user. */ | ||
createdBy: string; | ||
} | ||
//# sourceMappingURL=User.d.ts.map |
import { APIChannel } from './structures/Channel'; | ||
import { APIMessage, APIMessageSummary } from './structures/Message'; | ||
import { APIMessage, APIMessageReaction, APIMessageSummary } from './structures/Message'; | ||
import { APIDoc } from './structures/Doc'; | ||
@@ -8,2 +8,12 @@ import { APIListItem } from './structures/ListItem'; | ||
import { APICalendarEvent } from './structures/CalendarEvent'; | ||
import { APIClientUser } from './structures/User'; | ||
/** The ready payload of the websocket. */ | ||
export interface WSReadyPayload { | ||
/** The last message ID. */ | ||
lastMessageId: string; | ||
/** The client user. */ | ||
user: APIClientUser; | ||
/** The ping interval. */ | ||
heartbeatIntervalMs: number; | ||
} | ||
/** | ||
@@ -278,10 +288,30 @@ * The Guilded WebSocket API events. | ||
}; | ||
/** | ||
* Emitted when a message reaction is created. | ||
* @see https://www.guilded.gg/docs/api/websockets/ChannelMessageReactionCreated | ||
*/ | ||
ChannelMessageReactionCreated: { | ||
/** The ID of the server the message belongs to. */ | ||
serverId?: string; | ||
/** The created reaction. */ | ||
reaction: APIMessageReaction; | ||
}; | ||
/** | ||
* Emitted when a message reaction is deleted. | ||
* @see https://www.guilded.gg/docs/api/websockets/ChannelMessageReactionDeleted | ||
*/ | ||
ChannelMessageReactionDeleted: { | ||
/** The ID of the server the message belongs to. */ | ||
serverId?: string; | ||
/** The deleted reaction. */ | ||
reaction: APIMessageReaction; | ||
}; | ||
} | ||
/** The Guilded WebSocket API operation codes. */ | ||
export declare enum WSOpCodes { | ||
/** The event operation code. */ | ||
Event = 0, | ||
/** The ready operation code. */ | ||
Ready = 0, | ||
/** The event operation code. */ | ||
Event = 1 | ||
Ready = 1 | ||
} | ||
//# sourceMappingURL=WS.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
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
97836
1715