mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-23 03:40:17 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
653b9ff17f | ||
|
|
bc9ab4556c | ||
|
|
abe05136fd | ||
|
|
d6fb271df8 | ||
|
|
3294fb15ae | ||
|
|
9817623291 | ||
|
|
617f507427 |
35
CHANGELOG.md
35
CHANGELOG.md
@@ -1,3 +1,38 @@
|
||||
# [0.18.0](https://github.com/discordjs/discord-api-types/compare/0.16.0...0.18.0) (2021-04-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **APIInvite:** `channel` is not optional ([#123](https://github.com/discordjs/discord-api-types/issues/123)) ([abe0513](https://github.com/discordjs/discord-api-types/commit/abe05136fd169f483fe09a213259b4cbd526497b))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **Invite:** rename `InviteTargetUserType` to `InviteTargetType` ([#124](https://github.com/discordjs/discord-api-types/issues/124)) ([bc9ab45](https://github.com/discordjs/discord-api-types/commit/bc9ab4556ca8a7c8e4c7942c87fa322c91b733dc))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **Invite:** `InviteTargetUserType` is renamed to `InviteTargetType`, to match the documentation.
|
||||
- Reference: https://github.com/discord/discord-api-docs/pull/2690
|
||||
|
||||
# [0.17.0](https://github.com/discordjs/discord-api-types/compare/0.16.0...0.17.0) (2021-04-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **APIChannel:** `rtc_region` is optional ([#118](https://github.com/discordjs/discord-api-types/issues/118)) ([617f507](https://github.com/discordjs/discord-api-types/commit/617f507427fae6456de228a23809ab04c1df13f6))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **APISticker:** remove `preview_asset` ([#119](https://github.com/discordjs/discord-api-types/issues/119)) ([9817623](https://github.com/discordjs/discord-api-types/commit/9817623291ec852a831c3de225e90a65d83dac7f))
|
||||
|
||||
### Features
|
||||
|
||||
- **WebhookMessage:** add `GET` route types ([#120](https://github.com/discordjs/discord-api-types/issues/120)) ([3294fb1](https://github.com/discordjs/discord-api-types/commit/3294fb15ae6c259c1b53b7f2eca4ea8dca2f2372))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **APISticker:** This removes the `preview_asset` property from sticket objects
|
||||
- Reference: https://github.com/discord/discord-api-docs/commit/b9b8db2
|
||||
- **APIChannel:** This corrects the fact that `rtc_region` isn't present on non-voice-like channels
|
||||
|
||||
# [0.16.0](https://github.com/discordjs/discord-api-types/compare/0.15.1...0.16.0) (2021-04-14)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -1,3 +1,38 @@
|
||||
# [0.18.0](https://github.com/discordjs/discord-api-types/compare/0.16.0...0.18.0) (2021-04-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **APIInvite:** `channel` is not optional ([#123](https://github.com/discordjs/discord-api-types/issues/123)) ([abe0513](https://github.com/discordjs/discord-api-types/commit/abe05136fd169f483fe09a213259b4cbd526497b))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **Invite:** rename `InviteTargetUserType` to `InviteTargetType` ([#124](https://github.com/discordjs/discord-api-types/issues/124)) ([bc9ab45](https://github.com/discordjs/discord-api-types/commit/bc9ab4556ca8a7c8e4c7942c87fa322c91b733dc))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **Invite:** `InviteTargetUserType` is renamed to `InviteTargetType`, to match the documentation.
|
||||
- Reference: https://github.com/discord/discord-api-docs/pull/2690
|
||||
|
||||
# [0.17.0](https://github.com/discordjs/discord-api-types/compare/0.16.0...0.17.0) (2021-04-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **APIChannel:** `rtc_region` is optional ([#118](https://github.com/discordjs/discord-api-types/issues/118)) ([617f507](https://github.com/discordjs/discord-api-types/commit/617f507427fae6456de228a23809ab04c1df13f6))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
- **APISticker:** remove `preview_asset` ([#119](https://github.com/discordjs/discord-api-types/issues/119)) ([9817623](https://github.com/discordjs/discord-api-types/commit/9817623291ec852a831c3de225e90a65d83dac7f))
|
||||
|
||||
### Features
|
||||
|
||||
- **WebhookMessage:** add `GET` route types ([#120](https://github.com/discordjs/discord-api-types/issues/120)) ([3294fb1](https://github.com/discordjs/discord-api-types/commit/3294fb15ae6c259c1b53b7f2eca4ea8dca2f2372))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **APISticker:** This removes the `preview_asset` property from sticket objects
|
||||
- Reference: https://github.com/discord/discord-api-docs/commit/b9b8db2
|
||||
- **APIChannel:** This corrects the fact that `rtc_region` isn't present on non-voice-like channels
|
||||
|
||||
# [0.16.0](https://github.com/discordjs/discord-api-types/compare/0.15.1...0.16.0) (2021-04-14)
|
||||
|
||||
### Features
|
||||
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
GatewayActivity,
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayVoiceState,
|
||||
InviteTargetUserType,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
} from '../payloads/v8/mod.ts';
|
||||
|
||||
@@ -936,11 +936,11 @@ export interface GatewayInviteCreateDispatchData {
|
||||
*/
|
||||
max_uses: number;
|
||||
/**
|
||||
* The type of user target for this voice channel invite
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetUserType;
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The user whose stream to display for this voice channel stream invite
|
||||
*
|
||||
|
||||
@@ -105,7 +105,7 @@ export interface APIChannel extends APIPartialChannel {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
rtc_region: string | null;
|
||||
rtc_region?: string | null;
|
||||
/**
|
||||
* The camera video quality mode of the voice channel, `1` when not present
|
||||
*
|
||||
@@ -478,10 +478,6 @@ export interface APISticker {
|
||||
* Sticker asset hash
|
||||
*/
|
||||
asset: string;
|
||||
/**
|
||||
* Sticker preview asset hash
|
||||
*/
|
||||
preview_asset: string | null;
|
||||
/**
|
||||
* Type of sticker format
|
||||
*
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channel?: Required<APIPartialChannel>;
|
||||
channel: Required<APIPartialChannel>;
|
||||
/**
|
||||
* The user who created the invite
|
||||
*
|
||||
@@ -34,11 +34,11 @@ export interface APIInvite {
|
||||
*/
|
||||
inviter?: APIUser;
|
||||
/**
|
||||
* The type of user target for this voice channel invite
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
*/
|
||||
target_type?: InviteTargetUserType;
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The user whose stream to display for this voice channel stream invite
|
||||
*
|
||||
@@ -47,6 +47,8 @@ export interface APIInvite {
|
||||
target_user?: APIUser;
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -60,9 +62,9 @@ export interface APIInvite {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
export enum InviteTargetUserType {
|
||||
export enum InviteTargetType {
|
||||
STREAM = 1,
|
||||
EMBEDDED_APPLICATION,
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
APIOverwrite,
|
||||
APIUser,
|
||||
ChannelType,
|
||||
InviteTargetUserType,
|
||||
InviteTargetType,
|
||||
MessageFlags,
|
||||
OverwriteType,
|
||||
VideoQualityMode,
|
||||
@@ -385,9 +385,11 @@ export interface RESTPostAPIChannelInviteJSONBody {
|
||||
*/
|
||||
unique?: boolean;
|
||||
/**
|
||||
* The type of target user for this voice channel invite
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetUserType;
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The id of the user whose stream to display for this invite
|
||||
* - Required if `target_type` is 1
|
||||
|
||||
@@ -228,6 +228,11 @@ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody =
|
||||
file: unknown;
|
||||
});
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#get-webhook-message
|
||||
*/
|
||||
export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
GatewayActivity,
|
||||
GatewayPresenceUpdate as RawGatewayPresenceUpdate,
|
||||
GatewayVoiceState,
|
||||
InviteTargetUserType,
|
||||
InviteTargetType,
|
||||
PresenceUpdateStatus,
|
||||
} from '../payloads/v8/index';
|
||||
|
||||
@@ -936,11 +936,11 @@ export interface GatewayInviteCreateDispatchData {
|
||||
*/
|
||||
max_uses: number;
|
||||
/**
|
||||
* The type of user target for this voice channel invite
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetUserType;
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The user whose stream to display for this voice channel stream invite
|
||||
*
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.16.0",
|
||||
"version": "0.18.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.16.0",
|
||||
"version": "0.18.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.15",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.16.0",
|
||||
"version": "0.18.0",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"main": "./v8.js",
|
||||
"module": "./v8.mjs",
|
||||
|
||||
@@ -105,7 +105,7 @@ export interface APIChannel extends APIPartialChannel {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/voice#voice-region-object
|
||||
*/
|
||||
rtc_region: string | null;
|
||||
rtc_region?: string | null;
|
||||
/**
|
||||
* The camera video quality mode of the voice channel, `1` when not present
|
||||
*
|
||||
@@ -478,10 +478,6 @@ export interface APISticker {
|
||||
* Sticker asset hash
|
||||
*/
|
||||
asset: string;
|
||||
/**
|
||||
* Sticker preview asset hash
|
||||
*/
|
||||
preview_asset: string | null;
|
||||
/**
|
||||
* Type of sticker format
|
||||
*
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface APIInvite {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#channel-object
|
||||
*/
|
||||
channel?: Required<APIPartialChannel>;
|
||||
channel: Required<APIPartialChannel>;
|
||||
/**
|
||||
* The user who created the invite
|
||||
*
|
||||
@@ -34,11 +34,11 @@ export interface APIInvite {
|
||||
*/
|
||||
inviter?: APIUser;
|
||||
/**
|
||||
* The type of user target for this voice channel invite
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
*/
|
||||
target_type?: InviteTargetUserType;
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The user whose stream to display for this voice channel stream invite
|
||||
*
|
||||
@@ -47,6 +47,8 @@ export interface APIInvite {
|
||||
target_user?: APIUser;
|
||||
/**
|
||||
* The embedded application to open for this voice channel embedded application invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/topics/oauth2#application
|
||||
*/
|
||||
target_application?: Partial<APIApplication>;
|
||||
/**
|
||||
@@ -60,9 +62,9 @@ export interface APIInvite {
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-target-user-types
|
||||
* https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
export const enum InviteTargetUserType {
|
||||
export const enum InviteTargetType {
|
||||
STREAM = 1,
|
||||
EMBEDDED_APPLICATION,
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import type {
|
||||
APIOverwrite,
|
||||
APIUser,
|
||||
ChannelType,
|
||||
InviteTargetUserType,
|
||||
InviteTargetType,
|
||||
MessageFlags,
|
||||
OverwriteType,
|
||||
VideoQualityMode,
|
||||
@@ -385,9 +385,11 @@ export interface RESTPostAPIChannelInviteJSONBody {
|
||||
*/
|
||||
unique?: boolean;
|
||||
/**
|
||||
* The type of target user for this voice channel invite
|
||||
* The type of target for this voice channel invite
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types
|
||||
*/
|
||||
target_type?: InviteTargetUserType;
|
||||
target_type?: InviteTargetType;
|
||||
/**
|
||||
* The id of the user whose stream to display for this invite
|
||||
* - Required if `target_type` is 1
|
||||
|
||||
@@ -228,6 +228,11 @@ export type RESTPatchAPIWebhookWithTokenMessageFormDataBody =
|
||||
file: unknown;
|
||||
});
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#get-webhook-message
|
||||
*/
|
||||
export type RESTGetAPIWebhookWithTokenMessageResult = APIMessage;
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/resources/webhook#edit-webhook-message
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user