Skip to content

Releases: discordjs/discord-api-types

0.14.0: feat(*): Polish Week - Discord API Types Edition (#110)

11 Apr 18:49
24d8037
Compare
Choose a tag to compare

0.14.0 (2021-04-11)

Bug Fixes

  • APIMessage: correct type for application (ed2cbe8)
  • GatewayGuildMemberUpdateDispatchData: correct types (14f14e2)
  • GatewayPresenceUpdateData: activities may not be null (bb3cb04)
  • GatewayVoiceServerUpdateDispatchData: endpoint is nullable (e8203a1)
  • GuildWelcomeScreenChannel: document missing description property (238695b)
  • OAuth2: scope can be optional / not required (bbe56a9)
  • OAuth2: remove invalid parameters from refresh token request (1c02450)
  • RPC: version RPC same as rest, export again in shortcuts (67e0ba1)
  • Utils: correct import for deno users (42dd75f)

chore

  • Gateway: remove guild_subscriptions (ab8b289)
  • GatewayReady: un-document private_channels (457edf4)
  • Integrations: remove routes that bots can no longer interact with (577c5bd)
  • MessageGetReactions: remove before pagination (0ec26b7)
  • Oauth2Scopes: remove rpc.api (7ee8511)
  • Permissions: rename USE_APPLICATION_COMMANDS to USE_SLASH_COMMANDS (2aa7f7a)
  • UserFlags: un-document SYSTEM flag (1774d4c)

Code Refactoring

Features

  • APIApplication: document terms_of_service and privacy_policy (598cbfb)
  • APIAttachment: add content_type (2d432d1)
  • APIChannel: add rtc_region (#108) (07ba907)
  • APIChannel: add video_quality_mode (#106) (d8d7bcc)
  • APIInteraction: add type-check utilities (3307201)
  • Exports: add globals to the exported sub-modules (5d35f61)
  • Gateway: add INTEGRATION_* events (9c3fab0)
  • GuildWelcomeScreen: document welcome-screen endpoint (169ecde)
  • Interactions: add batch command create / update (edfe70a)
  • Interactions: add Slash Command Permissions (f517f35)
  • Invites: document target_application & correct property names (97c8ab3)
  • MessageFlags: EPHEMERAL desc and added LOADING (#109) (4462255)
  • PatchAPIWebhookMessage: add file property (fc2f3c5)
  • Webhook: add & document url property (77e5bb6)
  • invite reminder system message type and flag (#105) (b90714f)
  • stage channels! (#107) (6cd7542)

BREAKING CHANGES

  • APIInteraction: This commit removes the guild_id property from APIDMInteraction
    which allows type-checks to work with the in operator.
    Because of that, we also provide utility functions that help with those type checks.
    Use them in your code by importing the Utils object, or by directly importing them.
    Check the README for examples

  • OAuth2: This commit removes parameters that are not expected
    in the refresh token request body

  • GatewayReady: This property has been deprecated for a while, and was
    returning an empty array for bot users. This commit removes it entirely

  • Permissions: This commit brings consistency with the documentation,
    where the permission is documented as USE_SLASH_COMMANDS, whereas the
    client has it as USE_APPLICATION_COMMANDS internally

  • MessageGetReactions: This query parameter is not usable and was not respected
    by the API.

  • OAuth2: This removes the scope property from the authorization
    code flow, as it is not expected there.

  • Gateway: This removes guild_subscriptions, as it has been
    deprecated in favor of intents.

  • Oauth2Scopes: This removes the rpc.api scope, as it has been removed
    from the documentation.

  • APIMessage: This removes the APIMessageApplication interface, as it has
    been removed from the documentation, being replaced with the OAuth2 application.

  • APIApplication: This renames the GatewayPresenceLimit flag to
    GatewayPresenceLimited, for consistency with GatewayGuildMembersLimited
    and the documented name.

  • GatewayVoiceServerUpdateDispatchData: Any code that expects endpoint to never be null needs
    to be updated, and the conditions specified in the documentation need
    to be respected regarding that.

  • Invites: This renames target_user_type to target_type,
    the actual value the API expects.

  • GatewayPresenceUpdateData: Clearing activities is done by setting them to an empty
    array, not by setting them to null.

  • UserFlags: This removes a flag that bots should not use, as Discord
    said this is an internal flag.

  • Integrations: This removes the 3 routes that bots can no longer access.

  • Exports: Certain objects from this file have been moved to their
    appropriate spot (such as JSON Error Codes)

    • Files have been moved around in order to keep them
      organized. Exports might also be missing, so please report if that is the
      case.

0.13.3

28 Mar 12:21
679a5cf
Compare
Choose a tag to compare

Miscellaneous

  • npm: fix globs to properly include just needed files (679a5cf)

0.13.2

28 Mar 09:58
fc4b7e2
Compare
Choose a tag to compare

Changes

  • ApplicationCommandInteractionDataOptionSubCommandGroup: correct the type value (15c171c)

0.13.1

27 Mar 22:43
ebd5754
Compare
Choose a tag to compare

Changes

  • APIInteractionResponse: correct type for data property (ffcd95d)

0.13.0

27 Mar 16:17
2636bd0
Compare
Choose a tag to compare

Changes

  • OAuth2: add /oauth2/@me route (84759d1)
  • Webhook: add Webhook message edit result, and invalid webhook token error (4c77a5d)
  • ApplicationCommand:
    • add application command events (da2c2e9)
    • add fetch single application command routes (5826da2)
  • JSONErrorCodes: add unknown guild template error code (5826da2)
  • FormattingPatterns: add regular expressions for common formatting patterns in messages (4e4a084, 3bf9738)
  • APIMessageReferenceSend: add fail_if_not_exists property (855f36d)
  • AuditLog: add missing change keys (63096d8)
  • RESTRoutes: add API bases (466fa95)
  • RESTPostAPIGuildsJSONBody: correctly mark some fields as nullable (ae1900d)
  • APIInteraction: ad DM slash commands (d0b3106)
  • APIMessage: add interaction property (0f29b32)
  • APIApplication: document known ApplicationFlags (92f76f1)
  • APIInteractionResponse, APIInteractionResponseType:
    • document the new response types (eafe7ba)
    • remove old response types (76651ac)
  • APIApplicationCommandInteractionData: add resolved property (24155ae)
  • RESTPostAPIChannelMessageJSONBody: correctly type tts as a boolean (9d8d090)
  • APIBaseInteraction: add application_id property (0582f88)
  • APIApplicationCommandInteractionDataOption: add types to all options (ca61396)
  • PermissionFlagsBits: add USE_APPLICATION_COMMANDS (ceb787b)

Miscellaneous

  • GatewayHeartbeat: clarify that the HEARTBEAT op code is bidirectional (70bfe9f)
  • CI/CD and deno: update CI/CD workflow, and bring deno types up to date (ff76175)
  • deno: replace all const enum with enum (7343fab)
  • GitHub: add missing markdowns with instructions (eb3f8e1)
  • deno: make git commit hooks also auto-build deno files (eb3f8e1)

chore: release 0.12.1 (#70)

05 Jan 08:42
999b359
Compare
Choose a tag to compare

Changes

  • Snowflake/Permissions: make types stricter thanks to newer TypeScript features (549a6f0)

Miscellaneous

  • readme: add deno and GitHub sponsors labels (35bd1f7)

chore(chores): All the chores! And release 0.12.0 (#62)

01 Jan 21:34
6464fe9
Compare
Choose a tag to compare

also known as the catching up with discord.js version

Changes

  • APIInteraction: add permissions property to the returned member (70b427b)
  • APIActivity: add missing properties (dccdfe0)
  • RESTPatchAPIChannelJSONBody: add missing bitrate property (15892ec)
  • APIApplication: flags should be omitted in REST, not optional everywhere (664ad80)
  • APIAuditLogChangeKeyID: correct the fact that new_value is optional, not required (e947218)
  • APIAuditLogOptions: correctly mark the fact type is not always present (1191464)
  • 🎇 deno support: added official deno support. \o/ (6464fe9)
  • 🎇 comments: added comments for every property there is (copy-paste from the docs site) (6464fe9)

0.11.2: chore: RESTPatchAPIGuildJSONBody `system_channel_flags` is optional; …

20 Dec 16:50
c28ef6c
Compare
Choose a tag to compare

Changes

  • RESTPatchAPIGuildJSONBody: correctly mark system_channel_flags as optional (c28ef6c)

0.11.1

19 Dec 15:51
8c43eae
Compare
Choose a tag to compare

Changes

  • RESTPostAPIGuild: correct the fact that system_channel_flags are optional (ba4c0d7)
  • AuditLogEntry: correct the fact that user_id is not nullable (2b89beb)

0.11.0

19 Dec 13:26
ec9002f
Compare
Choose a tag to compare

Changes