Compare commits

...

7 Commits

Author SHA1 Message Date
Vlad Frangu
653b9ff17f chore(release): 0.18.0 🎉 (#125) 2021-04-18 11:03:16 +03:00
Advaith
bc9ab4556c refactor(Invite): rename InviteTargetUserType to InviteTargetType (#124)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

BREAKING CHANGE: `InviteTargetUserType` is renamed to `InviteTargetType`, to match the documentation.
  - Reference: https://github.com/discord/discord-api-docs/pull/2690
2021-04-18 10:34:51 +03:00
Advaith
abe05136fd fix(APIInvite): channel is not optional (#123)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-18 10:33:32 +03:00
Vlad Frangu
d6fb271df8 chore(release): 0.17.0 🎉 (#121) 2021-04-17 18:48:20 +03:00
Jan
3294fb15ae feat(WebhookMessage): add GET route types (#120)
- Reference: https://github.com/discord/discord-api-docs/pull/2812
2021-04-16 00:48:22 +03:00
Jan
9817623291 refactor(APISticker): remove preview_asset (#119)
BREAKING CHANGE: This removes the `preview_asset` property from sticket objects
  - Reference: https://github.com/discord/discord-api-docs/commit/b9b8db2
2021-04-15 17:59:30 +03:00
Jan
617f507427 fix(APIChannel): rtc_region is optional (#118)
BREAKING CHANGE: This corrects the fact that `rtc_region` isn't present on non-voice-like channels
2021-04-15 17:47:07 +03:00
14 changed files with 117 additions and 37 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
*

View File

@@ -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
*

View File

@@ -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,
}

View File

@@ -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

View File

@@ -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
*/

View File

@@ -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
View File

@@ -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",

View File

@@ -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",

View File

@@ -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
*

View File

@@ -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,
}

View File

@@ -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

View File

@@ -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
*/