Compare commits

...

57 Commits

Author SHA1 Message Date
github-actions[bot]
803dcd7bdd chore(release): 0.37.71 🎉 (#880)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-26 14:19:12 +02:00
dependabot[bot]
62de95fd6f chore(deps): bump follow-redirects from 1.15.1 to 1.15.4 in /website (#865)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 02:17:45 +02:00
dependabot[bot]
4f46175c3c chore(deps-dev): bump ip from 1.1.5 to 1.1.9 (#876)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-23 02:17:36 +02:00
MateoDeveloper
150dc46b87 feat: add initial support for super reactions (#744)
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
2024-02-23 02:16:59 +02:00
github-actions[bot]
c008413a8a chore(release): 0.37.70 🎉 (#875)
Build ran for 9564941b3a

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-15 14:18:10 +02:00
n1ck_pro
9564941b3a feat(RESTPostAPIChannelMessageJSONBody): add enforce_nonce (#874) 2024-02-12 23:13:34 +02:00
github-actions[bot]
f329a80a6b chore(release): 0.37.69 🎉 (#873)
Build ran for 0cfe05dad8

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-08 14:19:06 +02:00
MateoDeveloper
0cfe05dad8 feat(Locale): add SpanishLATAM (#859) 2024-02-07 21:38:22 +02:00
github-actions[bot]
4473293b0e chore(release): 0.37.68 🎉 (#872)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-05 14:22:11 +02:00
TÆMBØ
a28b2d749e types(CDNRoutes): use generics for format options (#868) 2024-02-05 14:19:50 +02:00
Danial Raza
55efcca4f8 fix(CDNRoutes): make format optional and default to png (#869) 2024-02-01 02:59:16 +02:00
Danial Raza
6f541d58d2 fix(CDNRoutes): fix store page wrong extension (#867) 2024-02-01 00:19:20 +02:00
github-actions[bot]
71caf7cfc6 chore(release): 0.37.67 🎉 (#863)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-28 14:19:11 +02:00
Walter Min
819d85207a fix(GatewayThreadDispatch): properly type thread create/update/delete dispatches (#861)
* fix: properly type thread create/update/delete dispatches

* fix(GatewayThreadDispatch): deno types

* fix(GatewayThreadDispatch): deprecate GatewayThreadModifyDispatch
2023-12-27 14:22:42 +02:00
github-actions[bot]
7f797b2b4b chore(release): 0.37.66 🎉 (#857)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-07 14:24:45 +02:00
Danial Raza
470fe189ae chore: use string values in vs code settings (#856) 2023-12-05 19:29:13 +02:00
Danial Raza
b4226bb708 feat(RESTPostAPIWebhookWithTokenJSONBody): add applied_tags (#855) 2023-12-05 19:28:52 +02:00
github-actions[bot]
72a78a4f6f chore(release): 0.37.65 🎉 (#852)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-23 14:21:14 +02:00
Jiralite
957488134e fix(TextChannelType): Remove forum and media channels (#849)
* fix: remove forum and media channels from text channel types

* refactor: extend `APIGuildChannel` instead
2023-11-21 17:42:53 +00:00
github-actions[bot]
5327f3f38c chore(release): 0.37.64 🎉 (#850)
Build ran for ca05ee5eb2

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-20 14:20:47 +02:00
Almeida
ca05ee5eb2 feat(PermissionFlagsBits): split up expressions and events perms (#790) 2023-11-16 23:16:57 +00:00
github-actions[bot]
1d8399d925 chore(release): 0.37.63 🎉 (#846)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-11-09 14:29:41 +02:00
Almeida
a8efb1949a fix(RESTPutAPIGuildOnboardingJSONBody): optional keys and flattened emoji (#839)
* fix(RESTPutAPIGuildOnboardingJSONBody): optional keys and flattened emoji

* fix: requested changes
2023-11-07 21:37:36 +02:00
github-actions[bot]
c0f68e9509 chore(release): 0.37.62 🎉 (#845)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-30 14:20:23 +02:00
Almeida
28ed3701e6 feat(RESTJSONErrorCodes): add 40074 and 50057 (#844) 2023-10-28 12:24:36 +03:00
github-actions[bot]
4640f80274 chore(release): 0.37.61 🎉 (#842)
Build ran for ba08061917

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-23 15:20:36 +03:00
Jaw0r3k
ba08061917 feat: premium app subscriptions (#833)
Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
Co-authored-by: Almeida <almeidx@pm.me>
2023-10-22 22:02:01 +03:00
dependabot[bot]
f51c2d95ae chore(deps-dev): bump postcss from 8.4.23 to 8.4.31 (#837)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:45:31 +03:00
dependabot[bot]
984eacdef6 chore(deps): bump postcss from 8.4.14 to 8.4.31 in /website (#838)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:45:15 +03:00
dependabot[bot]
0a914acd11 chore(deps): bump @babel/traverse from 7.18.2 to 7.23.2 in /website (#840)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:22:02 +03:00
dependabot[bot]
3f1d9b47aa chore(deps-dev): bump @babel/traverse from 7.21.5 to 7.23.2 (#841)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-21 20:21:17 +03:00
github-actions[bot]
8541201a96 chore(release): 0.37.60 🎉 (#836)
Build ran for 17f42e0b38

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-05 15:21:55 +03:00
Jiralite
17f42e0b38 feat: Application patch and new properties (#810)
* feat: application patch and properties

* docs(APIApplication): update tag documentation

* fix(RESTPatchCurrentApplicationJSONBody): add `flags`

* docs(APIApplication): update `approximate_guild_count`
2023-10-03 20:34:06 +02:00
github-actions[bot]
5515e2914a chore(release): 0.37.59 🎉 (#835)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-02 15:20:05 +03:00
Suneet Tipirneni
ecef5b492b feat(RESTPostAPIStageInstanceJSONBody): add guild_scheduled_event_id (#656) 2023-09-28 22:01:27 +03:00
github-actions[bot]
c71258ceb4 chore(release): 0.37.58 🎉 (#832)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-25 16:04:11 +03:00
Suneet Tipirneni
a4cdbbfdf8 fix(RESTPatchAPIChannelJSONBody): add missing applied_tags field (#828) 2023-09-25 13:23:01 +02:00
Almeida
06fb47c51d chore: change docusaurus branch name (#830) 2023-09-24 01:23:22 +03:00
Jiralite
cc47220e87 docs(RESTPostAPIGuildForumThreadsJSONBody): Fix reference link (#827) 2023-09-24 00:36:57 +03:00
Renegade334
4defa9ea12 refactor(APIInteractionDataResolvedChannel): thread channels (#825)
- bring APIInteractionDataResolvedChannel into line with API specification
  (thread_metadata, parent_id only exist on thread channel partials)
- also adds a ThreadChannelType utility export
2023-09-23 22:23:15 +01:00
Jaw0r3k
1290c942ab feat: default select menu values (#824)
Co-authored-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
2023-09-23 20:14:35 +02:00
github-actions[bot]
4309463634 chore(release): 0.37.57 🎉 (#823)
Build ran for 1b8f62fc98

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-09-21 15:20:17 +03:00
Danial Raza
1b8f62fc98 docs: fix TypeDoc typos (#821) 2023-09-19 21:32:06 +01:00
Danial Raza
32ba5ce36c feat(ConnectionService): support twitter rebrand update (#819) 2023-09-19 20:25:11 +02:00
github-actions[bot]
1598baf0c3 chore(release): 0.37.56 🎉 (#817)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-31 15:19:18 +03:00
Danial Raza
ceb2f033f7 docs(APITeamMember): update deprecation message (#816) 2023-08-29 01:52:48 +03:00
Danial Raza
36e3d156c6 refactor(TeamMemberRole): remove owner role (#814) 2023-08-26 00:26:26 +03:00
Danial Raza
a26629c0e8 feat: add support for teams update (#813) 2023-08-25 14:59:12 +03:00
Almeida
018d889d9a fix: standard stickers are now free (#789) 2023-08-25 02:54:47 +03:00
Jiralite
1eb01618a3 fix(RESTPostAPIChannelMessageJSONBody): number for attachment ids (#811) 2023-08-25 02:52:43 +03:00
Almeida
31c8549fe3 feat(APIAuditLogOptions): add integration_type (#809) 2023-08-25 02:50:54 +03:00
github-actions[bot]
729d4bf719 chore(release): 0.37.55 🎉 (#812)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-24 15:38:36 +03:00
Jiralite
19beae59e0 chore: use code owners (#808) 2023-08-22 16:58:45 +03:00
github-actions[bot]
d24e928051 chore(release): 0.37.54 🎉 (#807)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-08-17 15:55:29 +03:00
dependabot[bot]
27bebd978b chore(deps): bump vm2 from 3.9.16 to 3.9.19 (#769)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-14 15:26:27 +03:00
MARCROCK22
b919e721bc fix(Guild): union with never type (#797)
Co-authored-by: Marcos Susaña <marcosjgs03@gmail.com>
2023-08-14 15:25:23 +03:00
Jiralite
138b9f2bf2 feat: Add Media channels (#777) 2023-08-14 15:24:40 +03:00
113 changed files with 3896 additions and 771 deletions

10
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,10 @@
* @vladfrangu
/*.ts @discordjs/discord-api-types @discordjs/core
gateway/ @discordjs/discord-api-types @discordjs/core
payloads/ @discordjs/discord-api-types @discordjs/core
rest/ @discordjs/discord-api-types @discordjs/core
rpc/ @discordjs/discord-api-types @discordjs/core
tests/ @discordjs/discord-api-types @discordjs/core
utils/ @discordjs/discord-api-types @discordjs/core
voice/ @discordjs/discord-api-types @discordjs/core

View File

@@ -1,8 +0,0 @@
addReviewers: true
reviewers:
- iCrawl
- SpaceEEC
- kyranet
- vladfrangu
numberOfReviewers: 0
runOnDraft: true

View File

@@ -12,7 +12,3 @@ jobs:
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true
- name: Automatically assign reviewers
if: github.event.action == 'opened'
uses: kentaro-m/auto-assign-action@v1.2.4

View File

@@ -15,3 +15,6 @@ website/build
*.js
*.d.ts
*.mjs
# Miscellaneous
CODEOWNERS

View File

@@ -2,9 +2,9 @@
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.codeActionsOnSave": {
"source.organizeImports": false,
"source.fixAll": true,
"source.fixAll.eslint": true
"source.organizeImports": "never",
"source.fixAll": "explicit",
"source.fixAll.eslint": "explicit"
},
"cSpell.enableFiletypes": ["mdx"]
}

View File

@@ -1,3 +1,122 @@
## [0.37.71](https://github.com/discordjs/discord-api-types/compare/0.37.70...0.37.71) (2024-02-26)
### Features
- add initial support for super reactions ([#744](https://github.com/discordjs/discord-api-types/issues/744)) ([150dc46](https://github.com/discordjs/discord-api-types/commit/150dc46b8739ca9cf10a46bb48d390f70c679b6e))
## [0.37.70](https://github.com/discordjs/discord-api-types/compare/0.37.69...0.37.70) (2024-02-15)
### Features
- **RESTPostAPIChannelMessageJSONBody:** add enforce_nonce ([#874](https://github.com/discordjs/discord-api-types/issues/874)) ([9564941](https://github.com/discordjs/discord-api-types/commit/9564941b3ae51c8bc9b1f915d66b43775089db18))
## [0.37.69](https://github.com/discordjs/discord-api-types/compare/0.37.68...0.37.69) (2024-02-08)
### Features
- **Locale:** add `SpanishLATAM` ([#859](https://github.com/discordjs/discord-api-types/issues/859)) ([0cfe05d](https://github.com/discordjs/discord-api-types/commit/0cfe05dad8271513a2ef58e4f183c530555c7c2d))
## [0.37.68](https://github.com/discordjs/discord-api-types/compare/0.37.67...0.37.68) (2024-02-05)
### Bug Fixes
- **CDNRoutes:** fix store page wrong extension ([#867](https://github.com/discordjs/discord-api-types/issues/867)) ([6f541d5](https://github.com/discordjs/discord-api-types/commit/6f541d58d278f1e610916250c003c1344831e3ad))
- **CDNRoutes:** make format optional and default to png ([#869](https://github.com/discordjs/discord-api-types/issues/869)) ([55efcca](https://github.com/discordjs/discord-api-types/commit/55efcca4f8480f96243d9d802ce632833ac8e3ff))
## [0.37.67](https://github.com/discordjs/discord-api-types/compare/0.37.66...0.37.67) (2023-12-28)
### Bug Fixes
- **GatewayThreadDispatch:** properly type thread create/update/delete dispatches ([#861](https://github.com/discordjs/discord-api-types/issues/861)) ([819d852](https://github.com/discordjs/discord-api-types/commit/819d85207ae7e07322e404a5ef9e3eb283b4aa03))
## [0.37.66](https://github.com/discordjs/discord-api-types/compare/0.37.65...0.37.66) (2023-12-07)
### Features
- **RESTPostAPIWebhookWithTokenJSONBody:** add `applied_tags` ([#855](https://github.com/discordjs/discord-api-types/issues/855)) ([b4226bb](https://github.com/discordjs/discord-api-types/commit/b4226bb708763ebe04d9f7abcafa148bb5588ba4))
## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23)
### Bug Fixes
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
### Features
- **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1))
## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09)
### Bug Fixes
- **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d))
## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30)
### Features
- **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369))
## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23)
### Features
- premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9))
## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05)
### Features
- Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6))
## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02)
### Features
- **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780))
## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25)
### Bug Fixes
- **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788))
### Features
- default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823))
## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21)
### Features
- **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119))
## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31)
### Bug Fixes
- **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc))
- standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac))
### Features
- add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8))
- **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c))
## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24)
## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17)
### Bug Fixes
- **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05))
### Features
- Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f))
## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14)
### Features

View File

@@ -1,3 +1,122 @@
## [0.37.71](https://github.com/discordjs/discord-api-types/compare/0.37.70...0.37.71) (2024-02-26)
### Features
- add initial support for super reactions ([#744](https://github.com/discordjs/discord-api-types/issues/744)) ([150dc46](https://github.com/discordjs/discord-api-types/commit/150dc46b8739ca9cf10a46bb48d390f70c679b6e))
## [0.37.70](https://github.com/discordjs/discord-api-types/compare/0.37.69...0.37.70) (2024-02-15)
### Features
- **RESTPostAPIChannelMessageJSONBody:** add enforce_nonce ([#874](https://github.com/discordjs/discord-api-types/issues/874)) ([9564941](https://github.com/discordjs/discord-api-types/commit/9564941b3ae51c8bc9b1f915d66b43775089db18))
## [0.37.69](https://github.com/discordjs/discord-api-types/compare/0.37.68...0.37.69) (2024-02-08)
### Features
- **Locale:** add `SpanishLATAM` ([#859](https://github.com/discordjs/discord-api-types/issues/859)) ([0cfe05d](https://github.com/discordjs/discord-api-types/commit/0cfe05dad8271513a2ef58e4f183c530555c7c2d))
## [0.37.68](https://github.com/discordjs/discord-api-types/compare/0.37.67...0.37.68) (2024-02-05)
### Bug Fixes
- **CDNRoutes:** fix store page wrong extension ([#867](https://github.com/discordjs/discord-api-types/issues/867)) ([6f541d5](https://github.com/discordjs/discord-api-types/commit/6f541d58d278f1e610916250c003c1344831e3ad))
- **CDNRoutes:** make format optional and default to png ([#869](https://github.com/discordjs/discord-api-types/issues/869)) ([55efcca](https://github.com/discordjs/discord-api-types/commit/55efcca4f8480f96243d9d802ce632833ac8e3ff))
## [0.37.67](https://github.com/discordjs/discord-api-types/compare/0.37.66...0.37.67) (2023-12-28)
### Bug Fixes
- **GatewayThreadDispatch:** properly type thread create/update/delete dispatches ([#861](https://github.com/discordjs/discord-api-types/issues/861)) ([819d852](https://github.com/discordjs/discord-api-types/commit/819d85207ae7e07322e404a5ef9e3eb283b4aa03))
## [0.37.66](https://github.com/discordjs/discord-api-types/compare/0.37.65...0.37.66) (2023-12-07)
### Features
- **RESTPostAPIWebhookWithTokenJSONBody:** add `applied_tags` ([#855](https://github.com/discordjs/discord-api-types/issues/855)) ([b4226bb](https://github.com/discordjs/discord-api-types/commit/b4226bb708763ebe04d9f7abcafa148bb5588ba4))
## [0.37.65](https://github.com/discordjs/discord-api-types/compare/0.37.64...0.37.65) (2023-11-23)
### Bug Fixes
- **TextChannelType:** Remove forum and media channels ([#849](https://github.com/discordjs/discord-api-types/issues/849)) ([9574881](https://github.com/discordjs/discord-api-types/commit/957488134e48c482324e9678dd53c11bf946b6cd))
## [0.37.64](https://github.com/discordjs/discord-api-types/compare/0.37.63...0.37.64) (2023-11-20)
### Features
- **PermissionFlagsBits:** split up expressions and events perms ([#790](https://github.com/discordjs/discord-api-types/issues/790)) ([ca05ee5](https://github.com/discordjs/discord-api-types/commit/ca05ee5eb21acdba866de7997cbf980d598e3ee1))
## [0.37.63](https://github.com/discordjs/discord-api-types/compare/0.37.62...0.37.63) (2023-11-09)
### Bug Fixes
- **RESTPutAPIGuildOnboardingJSONBody:** optional keys and flattened emoji ([#839](https://github.com/discordjs/discord-api-types/issues/839)) ([a8efb19](https://github.com/discordjs/discord-api-types/commit/a8efb1949ad4b554d5c59f7b55a251ee12abc93d))
## [0.37.62](https://github.com/discordjs/discord-api-types/compare/0.37.61...0.37.62) (2023-10-30)
### Features
- **RESTJSONErrorCodes:** add `40074` and `50057` ([#844](https://github.com/discordjs/discord-api-types/issues/844)) ([28ed370](https://github.com/discordjs/discord-api-types/commit/28ed3701e6105d0d15fb988194c13079a27e4369))
## [0.37.61](https://github.com/discordjs/discord-api-types/compare/0.37.60...0.37.61) (2023-10-23)
### Features
- premium app subscriptions ([#833](https://github.com/discordjs/discord-api-types/issues/833)) ([ba08061](https://github.com/discordjs/discord-api-types/commit/ba080619170b484f671011abe3b0a61c0e69cca9))
## [0.37.60](https://github.com/discordjs/discord-api-types/compare/0.37.59...0.37.60) (2023-10-05)
### Features
- Application patch and new properties ([#810](https://github.com/discordjs/discord-api-types/issues/810)) ([17f42e0](https://github.com/discordjs/discord-api-types/commit/17f42e0b38d431505ee56cdeb0bb85bff94e97c6))
## [0.37.59](https://github.com/discordjs/discord-api-types/compare/0.37.58...0.37.59) (2023-10-02)
### Features
- **RESTPostAPIStageInstanceJSONBody:** add `guild_scheduled_event_id` ([#656](https://github.com/discordjs/discord-api-types/issues/656)) ([ecef5b4](https://github.com/discordjs/discord-api-types/commit/ecef5b492bd54b3c61c04a6784fd39c29e282780))
## [0.37.58](https://github.com/discordjs/discord-api-types/compare/0.37.57...0.37.58) (2023-09-25)
### Bug Fixes
- **RESTPatchAPIChannelJSONBody:** add missing `applied_tags` field ([#828](https://github.com/discordjs/discord-api-types/issues/828)) ([a4cdbbf](https://github.com/discordjs/discord-api-types/commit/a4cdbbfdf87f32e6108140260f163afeca3e0788))
### Features
- default select menu values ([#824](https://github.com/discordjs/discord-api-types/issues/824)) ([1290c94](https://github.com/discordjs/discord-api-types/commit/1290c942abdd8c2d9bf97aa2807f45073970f823))
## [0.37.57](https://github.com/discordjs/discord-api-types/compare/0.37.56...0.37.57) (2023-09-21)
### Features
- **ConnectionService:** support twitter rebrand update ([#819](https://github.com/discordjs/discord-api-types/issues/819)) ([32ba5ce](https://github.com/discordjs/discord-api-types/commit/32ba5ce36ce3b89293d540b06b74c2643ced7119))
## [0.37.56](https://github.com/discordjs/discord-api-types/compare/0.37.55...0.37.56) (2023-08-31)
### Bug Fixes
- **RESTPostAPIChannelMessageJSONBody:** `number` for attachment ids ([#811](https://github.com/discordjs/discord-api-types/issues/811)) ([1eb0161](https://github.com/discordjs/discord-api-types/commit/1eb01618a3d7421012b0423aea7a8bde032c08fc))
- standard stickers are now free ([#789](https://github.com/discordjs/discord-api-types/issues/789)) ([018d889](https://github.com/discordjs/discord-api-types/commit/018d889d9aeb35b64dd914ade9ac93e8b98390ac))
### Features
- add support for teams update ([#813](https://github.com/discordjs/discord-api-types/issues/813)) ([a26629c](https://github.com/discordjs/discord-api-types/commit/a26629c0e83504299af4bc5eb85e101c63b9ced8))
- **APIAuditLogOptions:** add `integration_type` ([#809](https://github.com/discordjs/discord-api-types/issues/809)) ([31c8549](https://github.com/discordjs/discord-api-types/commit/31c8549fe3e461ad120a3af434e27c61091bbb9c))
## [0.37.55](https://github.com/discordjs/discord-api-types/compare/0.37.54...0.37.55) (2023-08-24)
## [0.37.54](https://github.com/discordjs/discord-api-types/compare/0.37.53...0.37.54) (2023-08-17)
### Bug Fixes
- **Guild:** union with never type ([#797](https://github.com/discordjs/discord-api-types/issues/797)) ([b919e72](https://github.com/discordjs/discord-api-types/commit/b919e721bca4ff19340a40b58f6a20d34641bb05))
### Features
- Add Media channels ([#777](https://github.com/discordjs/discord-api-types/issues/777)) ([138b9f2](https://github.com/discordjs/discord-api-types/commit/138b9f2bf2fa7dcaada81de222543fa8a03bd52f))
## [0.37.53](https://github.com/discordjs/discord-api-types/compare/0.37.52...0.37.53) (2023-08-14)
### Features

View File

@@ -33,6 +33,8 @@ import type {
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
APIEntitlement,
ChannelType,
} from '../payloads/v10/mod.ts';
import type { Nullable } from '../utils/internals.ts';
@@ -268,6 +270,9 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
}
export type GatewaySendPayload =
@@ -335,13 +340,16 @@ export type GatewayDispatchPayload =
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadCreateDispatch
| GatewayThreadUpdateDispatch
| GatewayThreadDeleteDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch;
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayEntitlementModifyDispatch;
// #region Dispatch Payloads
@@ -672,6 +680,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementUpdate
| GatewayDispatchEvents.EntitlementDelete,
GatewayEntitlementModifyDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-create
*/
@@ -1554,6 +1611,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
/**
* @deprecated This type doesn't accurately reflect the Discord API.
* Use {@apilink GatewayThreadCreateDispatch},
* {@apilink GatewayThreadUpdateDispatch}, or
* {@apilink GatewayThreadDeleteDispatch} instead.
* https://discord.com/developers/docs/topics/gateway-events#thread-create
* https://discord.com/developers/docs/topics/gateway-events#thread-update
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
@@ -1566,7 +1627,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
*/
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadCreateDispatch = DataPayload<
GatewayDispatchEvents.ThreadCreate,
GatewayThreadCreateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
@@ -1581,22 +1645,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadUpdateDispatch = DataPayload<
GatewayDispatchEvents.ThreadUpdate,
GatewayThreadUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadDeleteDispatch = DataPayload<
GatewayDispatchEvents.ThreadDelete,
GatewayThreadDeleteDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
export interface GatewayThreadDeleteDispatchData {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The id of the parent channel of the thread
*/
parent_id: Snowflake;
/**
* The type of the channel
*
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
*/
type: ChannelType;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#typing-start

View File

@@ -33,8 +33,10 @@ import type {
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
ChannelType,
} from '../payloads/v9/mod.ts';
import type { Nullable } from '../utils/internals.ts';
import type { APIEntitlement } from '../v10.ts';
export * from './common.ts';
@@ -267,6 +269,9 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
}
export type GatewaySendPayload =
@@ -334,13 +339,16 @@ export type GatewayDispatchPayload =
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadCreateDispatch
| GatewayThreadUpdateDispatch
| GatewayThreadDeleteDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch;
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayEntitlementModifyDispatch;
// #region Dispatch Payloads
@@ -671,6 +679,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementUpdate
| GatewayDispatchEvents.EntitlementDelete,
GatewayEntitlementModifyDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-update
*/
@@ -1553,6 +1610,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
/**
* @deprecated This type doesn't accurately reflect the Discord API.
* Use {@apilink GatewayThreadCreateDispatch},
* {@apilink GatewayThreadUpdateDispatch}, or
* {@apilink GatewayThreadDeleteDispatch} instead.
* https://discord.com/developers/docs/topics/gateway-events#thread-create
* https://discord.com/developers/docs/topics/gateway-events#thread-update
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
@@ -1565,7 +1626,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
*/
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadCreateDispatch = DataPayload<
GatewayDispatchEvents.ThreadCreate,
GatewayThreadCreateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
@@ -1580,22 +1644,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadUpdateDispatch = DataPayload<
GatewayDispatchEvents.ThreadUpdate,
GatewayThreadUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadDeleteDispatch = DataPayload<
GatewayDispatchEvents.ThreadDelete,
GatewayThreadDeleteDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
export interface GatewayThreadDeleteDispatchData {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The id of the parent channel of the thread
*/
parent_id: Snowflake;
/**
* The type of the channel
*
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
*/
type: ChannelType;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#typing-start

View File

@@ -182,7 +182,7 @@ export const PermissionFlagsBits = {
*/
ManageEmojisAndStickers: 1n << 30n,
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
*/
ManageGuildExpressions: 1n << 30n,
/**
@@ -198,7 +198,7 @@ export const PermissionFlagsBits = {
*/
RequestToSpeak: 1n << 32n,
/**
* Allows for creating, editing, and deleting scheduled events
* Allows for editing and deleting scheduled events created by all users
*
* Applies to channel types: Voice, Stage
*/
@@ -254,6 +254,16 @@ export const PermissionFlagsBits = {
* Applies to channel types: Voice
*/
UseSoundboard: 1n << 42n,
/**
* Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user
*/
CreateGuildExpressions: 1n << 43n,
/**
* Allows for creating scheduled events, and editing and deleting those created by the current user
*
* Applies to channel types: Voice, Stage
*/
CreateEvents: 1n << 44n,
/**
* Allows the usage of custom soundboard sounds from other servers
*

View File

@@ -1,7 +1,16 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v10.ts';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel.ts';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
}
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
type: T;
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
thread_metadata?: APIThreadMetadata | null;
permissions: Permissions;
parent_id?: string | null;
}
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object

View File

@@ -24,7 +24,8 @@ export type APIInteractionResponse =
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
| APIModalInteractionResponse
| APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
data: APIModalInteractionResponseCallbackData;
}
export interface APIPremiumRequiredInteractionResponse {
type: InteractionResponseType.PremiumRequired;
}
export interface APIInteractionResponseChannelMessageWithSource {
type: InteractionResponseType.ChannelMessageWithSource;
data: APIInteractionResponseCallbackData;
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
* Respond to an interaction with an modal for a user to fill-out
*/
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*/
PremiumRequired,
}
/**

View File

@@ -41,6 +41,10 @@ export interface APIApplication {
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
*/
bot_require_code_grant: boolean;
/**
* Partial user object for the bot user associated with the application
*/
bot?: APIUser;
/**
* The url of the application's terms of service
*/
@@ -60,7 +64,7 @@ export interface APIApplication {
*
* @deprecated This field will be removed in v11
*/
summary: string;
summary: '';
/**
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
*
@@ -77,6 +81,10 @@ export interface APIApplication {
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
*/
guild_id?: Snowflake;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
/**
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
*/
@@ -96,7 +104,24 @@ export interface APIApplication {
*/
flags: ApplicationFlags;
/**
* Up to 5 tags describing the content and functionality of the application
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Array of redirect URIs for the application
*/
redirect_uris?: string[];
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
tags?: [string, string?, string?, string?, string?];
/**
@@ -107,19 +132,6 @@ export interface APIApplication {
* The application's default custom authorization link, if enabled
*/
custom_install_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* An approximate count of the app's guild membership
*/
approximate_guild_count?: number;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
}
export interface APIApplicationInstallParams {

View File

@@ -13,6 +13,7 @@ import type {
import type { APIChannel, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
@@ -312,6 +313,15 @@ export interface APIAuditLogOptions {
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
*/
role_name?: string;
/**
* Type of integration which performed the action
*
* Present from:
* - MEMBER_KICK
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
}
export enum AuditLogOptionsType {
@@ -725,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/*
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
/*
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
/*
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
/*
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<

View File

@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIApplication } from './application.ts';
import type { APIPartialEmoji } from './emoji.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIMessageInteraction } from './interactions.ts';
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker, APIStickerItem } from './sticker.ts';
import type { APIUser } from './user.ts';
@@ -48,7 +48,6 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice;
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -124,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -205,12 +204,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
export interface APIThreadChannel
extends Omit<
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
'name'
>,
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
APIGuildChannel<ThreadChannelType> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -240,7 +238,7 @@ export interface APIThreadChannel
*/
total_message_sent?: number;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
*/
applied_tags: Snowflake[];
}
@@ -317,25 +315,60 @@ export enum ForumLayoutType {
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T> {
/**
* The set of tags that can be used in a forum channel
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The emoji to show in the add reaction button on a thread in a forum channel
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*/
default_sort_order: SortOrderType | null;
}
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*/
@@ -348,7 +381,8 @@ export type APIChannel =
| APIGuildStageVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -410,6 +444,12 @@ export enum ChannelType {
* A channel that can only contain threads
*/
GuildForum,
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
*/
GuildMedia,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
@@ -665,11 +705,16 @@ export interface APIMessage {
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
/**
* Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message
*/
role_subscription_data?: APIMessageRoleSubscriptionData;
/**
* Data for users, members, channels, and roles in the message's auto-populated select menus
*
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
}
/**
@@ -855,19 +900,45 @@ export interface APIFollowedChannel {
*/
export interface APIReaction {
/**
* Times this emoji has been used to react
* Total number of times this emoji has been used to react (including super reacts)
*/
count: number;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
count_details: APIReactionCountDetails;
/**
* Whether the current user reacted using this emoji
*/
me: boolean;
/**
* Whether the current user super-reacted using this emoji
*/
me_burst: boolean;
/**
* Emoji information
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}
/**
@@ -1598,6 +1669,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
* List of default values for auto-populated select menu components
*/
default_values?: APISelectMenuDefaultValue<D>[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1611,28 +1696,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.UserSelect,
SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.RoleSelect,
SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
/**
* List of channel types to include in the ChannelSelect component
*/
channel_types?: ChannelType[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export enum SelectMenuDefaultValueType {
Channel = 'channel',
Role = 'role',
User = 'user',
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
type: T;
id: Snowflake;
}
export type APIAutoPopulatedSelectMenuComponent =
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIRoleSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1744,6 +1862,10 @@ export enum ChannelFlags {
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
/**
* Whether media download options are hidden.
*/
HideMediaDownloadOptions = 1 << 15,
}
/**

View File

@@ -427,7 +427,7 @@ export enum GuildFeature {
* Guild has enabled the role subscription promo page
*/
CreatorStorePage = 'CREATOR_STORE_PAGE',
/*
/**
* Guild has been set as a support server on the App Directory
*/
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',

View File

@@ -18,3 +18,4 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';

View File

@@ -0,0 +1,115 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
*/
export interface APIEntitlement {
/**
* ID of the entitlement
*/
id: Snowflake;
/**
* ID of the SKU
*/
sku_id: Snowflake;
/**
* ID of the user that is granted access to the entitlement's sku
*/
user_id?: Snowflake;
/**
* ID of the guild that is granted access to the entitlement's sku
*/
guild_id?: Snowflake;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Type of entitlement
*/
type: EntitlementType;
/**
* Whether the entitlement was deleted
*/
deleted: boolean;
/**
* Start date at which the entitlement is valid. Not present when using test entitlements.
*/
starts_at?: string;
/**
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
*/
export enum EntitlementType {
/**
* Entitlement was purchased as an app subscription
*/
ApplicationSubscription = 8,
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
*/
export interface APISKU {
/**
* ID of SKU
*/
id: Snowflake;
/**
* Type of SKU
*/
type: SKUType;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Customer-facing name of your premium offering
*/
name: string;
/**
* System-generated URL slug based on the SKU's name
*/
slug: string;
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
*/
export enum SKUFlags {
/**
* SKU is available for purchase
*/
Available = 1 << 2,
/**
* Recurring SKU that can be purchased by a user and applied to a single server.
* Grants access to every user in that server.
*/
GuildSubscription = 1 << 7,
/**
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
*/
UserSubscription = 1 << 8,
}
export enum SKUType {
/**
* Represents a recurring subscription
*/
Subscription = 5,
/**
* System-generated group for each Subscription SKU created
*/
SubscriptionGroup = 6,
}

View File

@@ -70,7 +70,7 @@ export interface APISticker {
*/
export enum StickerType {
/**
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
* An official sticker in a pack
*/
Standard = 1,
/**

View File

@@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
*/
permissions: ['*'];
/**
@@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}
/**
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

View File

@@ -281,7 +281,11 @@ export enum ConnectionService {
Steam = 'steam',
TikTok = 'tiktok',
Twitch = 'twitch',
Twitter = 'twitter',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
*/
Twitter = X,
Xbox = 'xbox',
YouTube = 'youtube',
}

View File

@@ -1,7 +1,16 @@
import type { Permissions, Snowflake } from '../../../globals.ts';
import type { APIRole, LocaleString } from '../../../v9.ts';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel.ts';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel.ts';
import type { APIGuildMember } from '../guild.ts';
import type { APIEntitlement } from '../monetization.ts';
import type { APIUser } from '../user.ts';
import type { InteractionType } from './responses.ts';
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
}
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
type: T;
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
thread_metadata?: APIThreadMetadata | null;
permissions: Permissions;
parent_id?: string | null;
}
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object

View File

@@ -24,7 +24,8 @@ export type APIInteractionResponse =
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
| APIModalInteractionResponse
| APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
data: APIModalInteractionResponseCallbackData;
}
export interface APIPremiumRequiredInteractionResponse {
type: InteractionResponseType.PremiumRequired;
}
export interface APIInteractionResponseChannelMessageWithSource {
type: InteractionResponseType.ChannelMessageWithSource;
data: APIInteractionResponseCallbackData;
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
* Respond to an interaction with an modal for a user to fill-out
*/
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*/
PremiumRequired,
}
/**

View File

@@ -41,6 +41,10 @@ export interface APIApplication {
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
*/
bot_require_code_grant: boolean;
/**
* Partial user object for the bot user associated with the application
*/
bot?: APIUser;
/**
* The url of the application's terms of service
*/
@@ -60,7 +64,7 @@ export interface APIApplication {
*
* @deprecated This field will be removed in v11
*/
summary: string;
summary: '';
/**
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
*
@@ -77,6 +81,10 @@ export interface APIApplication {
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
*/
guild_id?: Snowflake;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
/**
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
*/
@@ -96,7 +104,24 @@ export interface APIApplication {
*/
flags: ApplicationFlags;
/**
* Up to 5 tags describing the content and functionality of the application
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Array of redirect URIs for the application
*/
redirect_uris?: string[];
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
tags?: [string, string?, string?, string?, string?];
/**
@@ -107,20 +132,6 @@ export interface APIApplication {
* The application's default custom authorization link, if enabled
*/
custom_install_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* An approximate count of the app's guild membership
* s
*/
approximate_guild_count?: number;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
}
export interface APIApplicationInstallParams {

View File

@@ -13,6 +13,7 @@ import type {
import type { APIChannel, APIOverwrite } from './channel.ts';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
@@ -312,6 +313,15 @@ export interface APIAuditLogOptions {
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
*/
role_name?: string;
/**
* Type of integration which performed the action
*
* Present from:
* - MEMBER_KICK
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
}
export enum AuditLogOptionsType {
@@ -725,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/*
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
/*
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
/*
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
/*
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<

View File

@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type { APIApplication } from './application.ts';
import type { APIPartialEmoji } from './emoji.ts';
import type { APIGuildMember } from './guild.ts';
import type { APIMessageInteraction } from './interactions.ts';
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions.ts';
import type { APIRole } from './permissions.ts';
import type { APISticker, APIStickerItem } from './sticker.ts';
import type { APIUser } from './user.ts';
@@ -48,7 +48,6 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice;
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -201,12 +200,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
export interface APIThreadChannel
extends Omit<
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
'name'
>,
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
APIGuildChannel<ThreadChannelType> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -236,7 +234,7 @@ export interface APIThreadChannel
*/
total_message_sent?: number;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
*/
applied_tags: Snowflake[];
}
@@ -313,25 +311,60 @@ export enum ForumLayoutType {
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T> {
/**
* The set of tags that can be used in a forum channel
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The emoji to show in the add reaction button on a thread in a forum channel
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*/
default_sort_order: SortOrderType | null;
}
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*/
@@ -344,7 +377,8 @@ export type APIChannel =
| APIGuildStageVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -406,6 +440,12 @@ export enum ChannelType {
* A channel that can only contain threads
*/
GuildForum,
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
*/
GuildMedia,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS
/**
@@ -656,6 +696,12 @@ export interface APIMessage {
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
/**
* Data for users, members, channels, and roles in the message's auto-populated select menus
*
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
}
/**
@@ -819,19 +865,45 @@ export interface APIFollowedChannel {
*/
export interface APIReaction {
/**
* Times this emoji has been used to react
* Total number of times this emoji has been used to react (including super reacts)
*/
count: number;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
count_details: APIReactionCountDetails;
/**
* Whether the current user reacted using this emoji
*/
me: boolean;
/**
* Whether the current user super-reacted using this emoji
*/
me_burst: boolean;
/**
* Emoji information
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}
/**
@@ -1566,6 +1638,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
* List of default values for auto-populated select menu components
*/
default_values?: APISelectMenuDefaultValue<D>[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1579,28 +1665,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.UserSelect,
SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.RoleSelect,
SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
/**
* List of channel types to include in the ChannelSelect component
*/
channel_types?: ChannelType[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export enum SelectMenuDefaultValueType {
Channel = 'channel',
Role = 'role',
User = 'user',
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
type: T;
id: Snowflake;
}
export type APIAutoPopulatedSelectMenuComponent =
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIRoleSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1712,6 +1831,10 @@ export enum ChannelFlags {
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
/**
* Whether media download options are hidden.
*/
HideMediaDownloadOptions = 1 << 15,
}
/**

View File

@@ -419,7 +419,7 @@ export enum GuildFeature {
* Guild has enabled the role subscription promo page
*/
CreatorStorePage = 'CREATOR_STORE_PAGE',
/*
/**
* Guild has been set as a support server on the App Directory
*/
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',

View File

@@ -18,3 +18,4 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';

View File

@@ -0,0 +1,115 @@
import type { Snowflake } from '../../globals.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
*/
export interface APIEntitlement {
/**
* ID of the entitlement
*/
id: Snowflake;
/**
* ID of the SKU
*/
sku_id: Snowflake;
/**
* ID of the user that is granted access to the entitlement's sku
*/
user_id?: Snowflake;
/**
* ID of the guild that is granted access to the entitlement's sku
*/
guild_id?: Snowflake;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Type of entitlement
*/
type: EntitlementType;
/**
* Whether the entitlement was deleted
*/
deleted: boolean;
/**
* Start date at which the entitlement is valid. Not present when using test entitlements.
*/
starts_at?: string;
/**
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
*/
export enum EntitlementType {
/**
* Entitlement was purchased as an app subscription
*/
ApplicationSubscription = 8,
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
*/
export interface APISKU {
/**
* ID of SKU
*/
id: Snowflake;
/**
* Type of SKU
*/
type: SKUType;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Customer-facing name of your premium offering
*/
name: string;
/**
* System-generated URL slug based on the SKU's name
*/
slug: string;
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
*/
export enum SKUFlags {
/**
* SKU is available for purchase
*/
Available = 1 << 2,
/**
* Recurring SKU that can be purchased by a user and applied to a single server.
* Grants access to every user in that server.
*/
GuildSubscription = 1 << 7,
/**
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
*/
UserSubscription = 1 << 8,
}
export enum SKUType {
/**
* Represents a recurring subscription
*/
Subscription = 5,
/**
* System-generated group for each Subscription SKU created
*/
SubscriptionGroup = 6,
}

View File

@@ -70,7 +70,7 @@ export interface APISticker {
*/
export enum StickerType {
/**
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
* An official sticker in a pack
*/
Standard = 1,
/**

View File

@@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
*/
permissions: ['*'];
/**
@@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}
/**
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

View File

@@ -281,7 +281,11 @@ export enum ConnectionService {
Steam = 'steam',
TikTok = 'tiktok',
Twitch = 'twitch',
Twitter = 'twitter',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
*/
Twitter = X,
Xbox = 'xbox',
YouTube = 'youtube',
}

View File

@@ -154,6 +154,8 @@ export enum RESTJSONErrorCodes {
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40_066,
TagRequiredToCreateAForumPostInThisChannel,
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40_074,
MissingAccess = 50_001,
InvalidAccountType,
CannotExecuteActionOnDMChannel,
@@ -198,6 +200,8 @@ export enum RESTJSONErrorCodes {
CannotSelfRedeemThisGift = 50_054,
InvalidGuild,
InvalidSKU = 50_057,
InvalidRequestOrigin = 50_067,
InvalidMessageType,
@@ -250,6 +254,7 @@ export enum RESTJSONErrorCodes {
NoUsersWithDiscordTagExist = 80_004,
ReactionWasBlocked = 90_001,
UserCannotUseBurstReactions,
ApplicationNotYetAvailable = 110_001,
@@ -320,6 +325,7 @@ export enum Locale {
Romanian = 'ro',
Russian = 'ru',
SpanishES = 'es-ES',
SpanishLATAM = 'es-419',
Swedish = 'sv-SE',
Thai = 'th',
Turkish = 'tr',

View File

@@ -1,4 +1,5 @@
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application.ts';
import type { Nullable, StrictPartial } from '../../utils/internals.ts';
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
@@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo
* https://discord.com/developers/docs/resources/application#get-current-application
*/
export type RESTGetCurrentApplicationResult = APIApplication;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'flags'
| 'role_connections_verification_url'
| 'install_params'
| 'interactions_endpoint_url'
| 'tags'
> &
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
>;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationResult = APIApplication;

View File

@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type {
APIActionRowComponent,
APIAllowedMentions,
APIAttachment,
APIChannel,
APIEmbed,
APIExtendedInvite,
@@ -18,11 +17,13 @@ import type {
MessageFlags,
OverwriteType,
ThreadAutoArchiveDuration,
ThreadChannelType,
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
ChannelFlags,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
*/
position?: number | null | undefined;
/**
* 0-1024 character channel topic (0-4096 characters for forum channels)
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
*
* Channel types: text, news, forum
* Channel types: text, news, forum, media
*/
topic?: string | null | undefined;
/**
* Whether the channel is nsfw
*
* Channel types: text, voice, news, forum
* Channel types: text, voice, news, forum, media
*/
nsfw?: boolean | null | undefined;
/**
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
* are unaffected
*
* Channel types: text, newsThread, publicThread, privateThread, forum
* Channel types: text, newsThread, publicThread, privateThread, forum, media
*/
rate_limit_per_user?: number | null | undefined;
/**
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* ID of the new parent category for a channel
*
* Channel types: text, voice, news
* Channel types: text, voice, news, stage, forum, media
*/
parent_id?: Snowflake | null | undefined;
/**
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*
* Channel types: text, news
* Channel types: text, news, forum, media
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
/**
* Channel flags combined as a bit field.
*/
flags?: ChannelFlags | undefined;
/**
* The set of tags that can be used in a thread-only channel; limited to 20
*
* Channel types: forum, media
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread
*
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
*/
invitable?: boolean | undefined;
/**
* The set of tags that can be used in a forum channel; limited to 20
* The emoji to show in the add reaction button on a thread in a thread-only channel
*
* Channel types: forum
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* The emoji to show in the add reaction button on a thread in a forum channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
/**
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
* This field is copied to the thread at creation time and does not live update
*
* Channel types: forum
* Channel types: text, forum, media
*/
default_thread_rate_limit_per_user?: number | null | undefined;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_sort_order?: SortOrderType | null | undefined;
/**
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType | undefined;
/**
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
*
* Channel types: forum, media
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
fail_if_not_exists?: boolean | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
*/
export interface RESTAPIAttachment {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
/**
* https://discord.com/developers/docs/resources/channel#create-message
*/
@@ -284,11 +313,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
flags?: MessageFlags | undefined;
/**
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
*/
enforce_nonce?: boolean | undefined;
}
/**
@@ -328,7 +362,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
*/
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
/*
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
*/
export interface RESTGetAPIChannelMessageReactionUsersQuery {
@@ -395,7 +429,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* The components to include with the message
*
@@ -614,25 +648,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: string;
};
@@ -656,7 +690,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
*
* @default ChannelType.PrivateThread
*/
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
type?: ThreadChannelType | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
*/
@@ -716,7 +750,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
/*
/**
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
*/
export interface RESTGetAPIChannelThreadsArchivedQuery {

View File

@@ -24,8 +24,11 @@ import type {
GuildSystemChannelFlags,
GuildVerificationLevel,
GuildWidgetStyle,
APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption,
} from '../../payloads/v10/mod.ts';
import type {
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
DistributiveOmit,
DistributivePick,
Nullable,
@@ -449,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
deaf?: boolean | undefined;
}
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member
@@ -930,10 +933,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
*/
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
APIGuildOnboarding,
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
>;
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
> & {
/**
* Prompts shown during onboarding and in customize community
*/
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
};
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
> & {
/**
* Options available within the prompt
*/
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
};
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
> & {
/**
* Emoji id
*/
emoji_id?: Snowflake | null | undefined;
/**
* Emoji name
*/
emoji_name?: string | null | undefined;
/**
* Whether this emoji is animated
*/
emoji_animated?: boolean | null | undefined;
};
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding

View File

@@ -18,6 +18,7 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';
export const APIVersion = '10';
@@ -830,6 +831,16 @@ export const Routes = {
* Route for:
* - GET `/sticker-packs`
*/
stickerPacks() {
return '/sticker-packs' as const;
},
/**
* Route for:
* - GET `/sticker-packs`
*
* @deprecated Use {@link Routes.stickerPacks} instead.
*/
nitroStickerPacks() {
return '/sticker-packs' as const;
},
@@ -892,14 +903,45 @@ export const Routes = {
/**
* Route for:
* - GET `/applications/@me`
* - PATCH `/applications/@me`
*/
currentApplication() {
return '/applications/@me' as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/entitlements`
* - POST `/applications/{application.id}/entitlements`
*/
entitlements(applicationId: Snowflake) {
return `/applications/${applicationId}/entitlements` as const;
},
/**
* Route for:
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/skus`
*/
skus(applicationId: Snowflake) {
return `/applications/${applicationId}/skus` as const;
},
};
export const StickerPackApplicationId = '710982414301790216';
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export const CDNRoutes = {
/**
* Route for:
@@ -909,7 +951,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
emoji(emojiId: Snowflake, format: EmojiFormat) {
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
return `/emojis/${emojiId}.${format}` as const;
},
@@ -921,7 +963,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
},
@@ -931,7 +973,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
},
@@ -941,7 +983,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
guildId: Snowflake,
guildDiscoverySplash: string,
format: Format,
) {
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
},
@@ -953,7 +999,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
return `/banners/${guildId}/${guildBanner}.${format}` as const;
},
@@ -965,7 +1011,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
return `/banners/${userId}/${userBanner}.${format}` as const;
},
@@ -979,7 +1025,7 @@ export const CDNRoutes = {
*
* This route supports the extension: PNG
*/
defaultUserAvatar(index: DefaultUserAvatarAssets) {
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
return `/embed/avatars/${index}.png` as const;
},
@@ -991,7 +1037,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
return `/avatars/${userId}/${userAvatar}.${format}` as const;
},
@@ -1003,7 +1049,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
guildId: Snowflake,
userId: Snowflake,
memberAvatar: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
},
@@ -1023,7 +1074,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
applicationIcon<Format extends ApplicationIconFormat>(
applicationId: Snowflake,
applicationIcon: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
},
@@ -1033,7 +1088,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
applicationCover<Format extends ApplicationCoverFormat>(
applicationId: Snowflake,
applicationCoverImage: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
},
@@ -1043,7 +1102,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
applicationAsset<Format extends ApplicationAssetFormat>(
applicationId: Snowflake,
applicationAssetId: string,
format: Format,
) {
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},
@@ -1053,11 +1116,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
achievementIcon(
achievementIcon<Format extends AchievementIconFormat>(
applicationId: Snowflake,
achievementId: Snowflake,
achievementIconHash: string,
format: AchievementIconFormat,
format: Format,
) {
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
},
@@ -1068,7 +1131,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},
@@ -1078,8 +1141,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
applicationId: Snowflake,
assetId: string,
format: Format = ImageFormat.PNG as Format,
) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},
/**
@@ -1088,7 +1155,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
},
@@ -1098,7 +1165,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
return `/stickers/${stickerId}.${format}` as const;
},
@@ -1108,7 +1175,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
},
@@ -1118,10 +1185,10 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildScheduledEventCover(
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
guildScheduledEventId: Snowflake,
guildScheduledEventCoverImage: string,
format: GuildScheduledEventCoverFormat,
format: Format,
) {
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
},
@@ -1132,7 +1199,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
guildMemberBanner<Format extends GuildMemberBannerFormat>(
guildId: Snowflake,
userId: Snowflake,
guildMemberBanner: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
},
};
@@ -1154,19 +1226,12 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export interface CDNQuery {
/**
* The returned image can have the size changed by using this query parameter

View File

@@ -0,0 +1,85 @@
import type { Snowflake } from '../../globals.ts';
import type { APIEntitlement, APISKU } from '../../v10.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export interface RESTGetAPIEntitlementsQuery {
/**
* User ID to look up entitlements for
*/
user_id?: Snowflake | undefined;
/**
* Optional list of SKU IDs to check entitlements for
* Comma-delimited set of snowflakes
*/
sku_ids?: string | undefined;
/**
* Retrieve entitlements before this entitlement ID
*/
before?: Snowflake | undefined;
/**
* Retrieve entitlements after this entitlement ID
*/
after?: Snowflake | undefined;
/**
* Number of entitlements to return (1-100)
*
* @default 100
*/
limit?: number | undefined;
/**
* Guild ID to look up entitlements for
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
*/
exclude_ended?: boolean | undefined;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export interface RESTPostAPIEntitlementBody {
/**
* ID of the SKU to grant the entitlement to
*/
sku_id: Snowflake;
/**
* ID of the guild or user to grant the entitlement to
*/
owner_id: Snowflake;
/**
* The type of entitlement owner
*/
owner_type: EntitlementOwnerType;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export enum EntitlementOwnerType {
Guild = 1,
User,
}
/**
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
*/
export type RESTDeleteAPIEntitlementResult = never;
/**
* https://discord.com/developers/docs/monetization/skus#list-skus
*/
export type RESTGetAPISKUsResult = APISKU[];

View File

@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
* Notify @everyone that a stage instance has started
*/
send_start_notification?: boolean | undefined;
/**
* The guild scheduled event associated with this stage instance
*/
guild_scheduled_event_id?: Snowflake | undefined;
}
/**

View File

@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v10/mod.ts';
export type RESTGetAPIStickerResult = APISticker;
/**
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*/
export interface RESTGetNitroStickerPacksResult {
export interface RESTGetStickerPacksResult {
sticker_packs: APIStickerPack[];
}
/**
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*
* @deprecated Use `RESTGetStickerPacksResult` instead
*/
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
/**
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
*/

View File

@@ -5,11 +5,11 @@ import type {
APIEmbed,
APIMessage,
APIWebhook,
APIAttachment,
MessageFlags,
APIMessageActionRowComponent,
} from '../../payloads/v10/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts';
import type { RESTAPIAttachment } from './channel.ts';
/**
* https://discord.com/developers/docs/resources/webhook#create-webhook
*/
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
*/
thread_name?: string | undefined;
/**
* Array of tag ids to apply to the thread
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
};
/**

View File

@@ -454,7 +454,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member

View File

@@ -1,4 +1,5 @@
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application.ts';
import type { StrictPartial, Nullable } from '../../utils/internals.ts';
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
@@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo
* https://discord.com/developers/docs/resources/application#get-current-application
*/
export type RESTGetCurrentApplicationResult = APIApplication;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'flags'
| 'role_connections_verification_url'
| 'install_params'
| 'interactions_endpoint_url'
| 'tags'
> &
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
>;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationResult = APIApplication;

View File

@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals.ts';
import type {
APIActionRowComponent,
APIAllowedMentions,
APIAttachment,
APIChannel,
APIEmbed,
APIExtendedInvite,
@@ -18,11 +17,13 @@ import type {
MessageFlags,
OverwriteType,
ThreadAutoArchiveDuration,
ThreadChannelType,
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
ChannelFlags,
} from '../../payloads/v9/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals.ts';
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
*/
position?: number | null | undefined;
/**
* 0-1024 character channel topic (0-4096 characters for forum channels)
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
*
* Channel types: text, news, forum
* Channel types: text, news, forum, media
*/
topic?: string | null | undefined;
/**
* Whether the channel is nsfw
*
* Channel types: text, voice, news, forum
* Channel types: text, voice, news, forum, media
*/
nsfw?: boolean | null | undefined;
/**
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
* are unaffected
*
* Channel types: text, newsThread, publicThread, privateThread, forum
* Channel types: text, newsThread, publicThread, privateThread, forum, media
*/
rate_limit_per_user?: number | null | undefined;
/**
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* ID of the new parent category for a channel
*
* Channel types: text, voice, news
* Channel types: text, voice, news, stage, forum, media
*/
parent_id?: Snowflake | null | undefined;
/**
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*
* Channel types: text, news
* Channel types: text, news, forum, media
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
/**
* Channel flags combined as a bit field.
*/
flags?: ChannelFlags | undefined;
/**
* The set of tags that can be used in a thread-only channel; limited to 20
*
* Channel types: forum, media
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread
*
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
*/
invitable?: boolean | undefined;
/**
* The set of tags that can be used in a forum channel; limited to 20
* The emoji to show in the add reaction button on a thread in a thread-only channel
*
* Channel types: forum
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* The emoji to show in the add reaction button on a thread in a forum channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
/**
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
* This field is copied to the thread at creation time and does not live update
*
* Channel types: forum
* Channel types: text, forum, media
*/
default_thread_rate_limit_per_user?: number | null | undefined;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_sort_order?: SortOrderType | null | undefined;
/**
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType | undefined;
/**
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
*
* Channel types: forum, media
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
fail_if_not_exists?: boolean | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
*/
export interface RESTAPIAttachment {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
/**
* https://discord.com/developers/docs/resources/channel#create-message
*/
@@ -292,11 +321,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
flags?: MessageFlags | undefined;
/**
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
*/
enforce_nonce?: boolean | undefined;
}
/**
@@ -336,7 +370,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
*/
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
/*
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
*/
export interface RESTGetAPIChannelMessageReactionUsersQuery {
@@ -411,7 +445,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* The components to include with the message
*
@@ -630,25 +664,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: string;
};
@@ -672,7 +706,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
*
* @default ChannelType.PrivateThread
*/
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
type?: ThreadChannelType | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
*/
@@ -732,7 +766,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
/*
/**
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
*/
export interface RESTGetAPIChannelThreadsArchivedQuery {

View File

@@ -24,8 +24,11 @@ import type {
GuildWidgetStyle,
APIDMChannel,
APIGroupDMChannel,
APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption,
} from '../../payloads/v9/mod.ts';
import type {
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
DistributiveOmit,
DistributivePick,
Nullable,
@@ -449,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
deaf?: boolean | undefined;
}
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member
@@ -936,10 +939,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
*/
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
APIGuildOnboarding,
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
>;
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
> & {
/**
* Prompts shown during onboarding and in customize community
*/
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
};
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
> & {
/**
* Options available within the prompt
*/
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
};
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
> & {
/**
* Emoji id
*/
emoji_id?: Snowflake | null | undefined;
/**
* Emoji name
*/
emoji_name?: string | null | undefined;
/**
* Whether this emoji is animated
*/
emoji_animated?: boolean | null | undefined;
};
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding

View File

@@ -18,6 +18,7 @@ export * from './template.ts';
export * from './user.ts';
export * from './voice.ts';
export * from './webhook.ts';
export * from './monetization.ts';
export const APIVersion = '9';
@@ -839,6 +840,16 @@ export const Routes = {
* Route for:
* - GET `/sticker-packs`
*/
stickerPacks() {
return '/sticker-packs' as const;
},
/**
* Route for:
* - GET `/sticker-packs`
*
* @deprecated Use {@link Routes.stickerPacks} instead.
*/
nitroStickerPacks() {
return '/sticker-packs' as const;
},
@@ -901,14 +912,45 @@ export const Routes = {
/**
* Route for:
* - GET `/applications/@me`
* - PATCH `/applications/@me`
*/
currentApplication() {
return '/applications/@me' as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/entitlements`
* - POST `/applications/{application.id}/entitlements`
*/
entitlements(applicationId: Snowflake) {
return `/applications/${applicationId}/entitlements` as const;
},
/**
* Route for:
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/skus`
*/
skus(applicationId: Snowflake) {
return `/applications/${applicationId}/skus` as const;
},
};
export const StickerPackApplicationId = '710982414301790216';
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export const CDNRoutes = {
/**
* Route for:
@@ -918,7 +960,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
emoji(emojiId: Snowflake, format: EmojiFormat) {
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
return `/emojis/${emojiId}.${format}` as const;
},
@@ -930,7 +972,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
},
@@ -940,7 +982,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
},
@@ -950,7 +992,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
guildId: Snowflake,
guildDiscoverySplash: string,
format: Format,
) {
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
},
@@ -962,7 +1008,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
return `/banners/${guildId}/${guildBanner}.${format}` as const;
},
@@ -974,7 +1020,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
return `/banners/${userId}/${userBanner}.${format}` as const;
},
@@ -988,7 +1034,7 @@ export const CDNRoutes = {
*
* This route supports the extension: PNG
*/
defaultUserAvatar(index: DefaultUserAvatarAssets) {
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
return `/embed/avatars/${index}.png` as const;
},
@@ -1000,7 +1046,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
return `/avatars/${userId}/${userAvatar}.${format}` as const;
},
@@ -1012,7 +1058,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
guildId: Snowflake,
userId: Snowflake,
memberAvatar: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
},
@@ -1032,7 +1083,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
applicationIcon<Format extends ApplicationIconFormat>(
applicationId: Snowflake,
applicationIcon: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
},
@@ -1042,7 +1097,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
applicationCover<Format extends ApplicationCoverFormat>(
applicationId: Snowflake,
applicationCoverImage: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
},
@@ -1052,7 +1111,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
applicationAsset<Format extends ApplicationAssetFormat>(
applicationId: Snowflake,
applicationAssetId: string,
format: Format,
) {
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},
@@ -1062,11 +1125,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
achievementIcon(
achievementIcon<Format extends AchievementIconFormat>(
applicationId: Snowflake,
achievementId: Snowflake,
achievementIconHash: string,
format: AchievementIconFormat,
format: Format,
) {
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
},
@@ -1077,7 +1140,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},
@@ -1087,8 +1150,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
applicationId: Snowflake,
assetId: string,
format: Format = ImageFormat.PNG as Format,
) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},
/**
@@ -1097,7 +1164,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
},
@@ -1107,7 +1174,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
return `/stickers/${stickerId}.${format}` as const;
},
@@ -1117,7 +1184,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
},
@@ -1127,10 +1194,10 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildScheduledEventCover(
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
guildScheduledEventId: Snowflake,
guildScheduledEventCoverImage: string,
format: GuildScheduledEventCoverFormat,
format: Format,
) {
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
},
@@ -1141,7 +1208,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
guildMemberBanner<Format extends GuildMemberBannerFormat>(
guildId: Snowflake,
userId: Snowflake,
guildMemberBanner: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
},
};
@@ -1162,20 +1234,13 @@ export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export interface CDNQuery {
/**
* The returned image can have the size changed by using this query parameter

View File

@@ -0,0 +1,85 @@
import type { Snowflake } from '../../globals.ts';
import type { APIEntitlement, APISKU } from '../../v10.ts';
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export interface RESTGetAPIEntitlementsQuery {
/**
* User ID to look up entitlements for
*/
user_id?: Snowflake | undefined;
/**
* Optional list of SKU IDs to check entitlements for
* Comma-delimited set of snowflakes
*/
sku_ids?: string | undefined;
/**
* Retrieve entitlements before this entitlement ID
*/
before?: Snowflake | undefined;
/**
* Retrieve entitlements after this entitlement ID
*/
after?: Snowflake | undefined;
/**
* Number of entitlements to return (1-100)
*
* @default 100
*/
limit?: number | undefined;
/**
* Guild ID to look up entitlements for
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
*/
exclude_ended?: boolean | undefined;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export interface RESTPostAPIEntitlementBody {
/**
* ID of the SKU to grant the entitlement to
*/
sku_id: Snowflake;
/**
* ID of the guild or user to grant the entitlement to
*/
owner_id: Snowflake;
/**
* The type of entitlement owner
*/
owner_type: EntitlementOwnerType;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export enum EntitlementOwnerType {
Guild = 1,
User,
}
/**
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
*/
export type RESTDeleteAPIEntitlementResult = never;
/**
* https://discord.com/developers/docs/monetization/skus#list-skus
*/
export type RESTGetAPISKUsResult = APISKU[];

View File

@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
* Notify @everyone that a stage instance has started
*/
send_start_notification?: boolean | undefined;
/**
* The guild scheduled event associated with this stage instance
*/
guild_scheduled_event_id?: Snowflake | undefined;
}
/**

View File

@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v9/mod.ts';
export type RESTGetAPIStickerResult = APISticker;
/**
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*/
export interface RESTGetNitroStickerPacksResult {
export interface RESTGetStickerPacksResult {
sticker_packs: APIStickerPack[];
}
/**
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*
* @deprecated Use `RESTGetStickerPacksResult` instead
*/
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
/**
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
*/

View File

@@ -5,11 +5,11 @@ import type {
APIEmbed,
APIMessage,
APIWebhook,
APIAttachment,
MessageFlags,
APIMessageActionRowComponent,
} from '../../payloads/v9/mod.ts';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals.ts';
import type { RESTAPIAttachment } from './channel.ts';
/**
* https://discord.com/developers/docs/resources/webhook#create-webhook
*/
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
*/
thread_name?: string | undefined;
/**
* Array of tag ids to apply to the thread
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
};
/**

View File

@@ -33,6 +33,8 @@ import type {
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
APIEntitlement,
ChannelType,
} from '../payloads/v10/index';
import type { Nullable } from '../utils/internals';
@@ -268,6 +270,9 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
}
export type GatewaySendPayload =
@@ -335,13 +340,16 @@ export type GatewayDispatchPayload =
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadCreateDispatch
| GatewayThreadUpdateDispatch
| GatewayThreadDeleteDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch;
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayEntitlementModifyDispatch;
// #region Dispatch Payloads
@@ -672,6 +680,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementUpdate
| GatewayDispatchEvents.EntitlementDelete,
GatewayEntitlementModifyDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-create
*/
@@ -1554,6 +1611,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
/**
* @deprecated This type doesn't accurately reflect the Discord API.
* Use {@apilink GatewayThreadCreateDispatch},
* {@apilink GatewayThreadUpdateDispatch}, or
* {@apilink GatewayThreadDeleteDispatch} instead.
* https://discord.com/developers/docs/topics/gateway-events#thread-create
* https://discord.com/developers/docs/topics/gateway-events#thread-update
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
@@ -1566,7 +1627,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
*/
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadCreateDispatch = DataPayload<
GatewayDispatchEvents.ThreadCreate,
GatewayThreadCreateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
@@ -1581,22 +1645,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadUpdateDispatch = DataPayload<
GatewayDispatchEvents.ThreadUpdate,
GatewayThreadUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadDeleteDispatch = DataPayload<
GatewayDispatchEvents.ThreadDelete,
GatewayThreadDeleteDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
export interface GatewayThreadDeleteDispatchData {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The id of the parent channel of the thread
*/
parent_id: Snowflake;
/**
* The type of the channel
*
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
*/
type: ChannelType;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#typing-start

View File

@@ -33,8 +33,10 @@ import type {
PresenceUpdateStatus,
AutoModerationRuleTriggerType,
APIAuditLogEntry,
ChannelType,
} from '../payloads/v9/index';
import type { Nullable } from '../utils/internals';
import type { APIEntitlement } from '../v10';
export * from './common';
@@ -267,6 +269,9 @@ export enum GatewayDispatchEvents {
AutoModerationRuleDelete = 'AUTO_MODERATION_RULE_DELETE',
AutoModerationActionExecution = 'AUTO_MODERATION_ACTION_EXECUTION',
GuildAuditLogEntryCreate = 'GUILD_AUDIT_LOG_ENTRY_CREATE',
EntitlementCreate = 'ENTITLEMENT_CREATE',
EntitlementUpdate = 'ENTITLEMENT_UPDATE',
EntitlementDelete = 'ENTITLEMENT_DELETE',
}
export type GatewaySendPayload =
@@ -334,13 +339,16 @@ export type GatewayDispatchPayload =
| GatewayThreadListSyncDispatch
| GatewayThreadMembersUpdateDispatch
| GatewayThreadMemberUpdateDispatch
| GatewayThreadModifyDispatch
| GatewayThreadCreateDispatch
| GatewayThreadUpdateDispatch
| GatewayThreadDeleteDispatch
| GatewayTypingStartDispatch
| GatewayUserUpdateDispatch
| GatewayVoiceServerUpdateDispatch
| GatewayVoiceStateUpdateDispatch
| GatewayWebhooksUpdateDispatch
| GatewayGuildAuditLogEntryCreateDispatch;
| GatewayGuildAuditLogEntryCreateDispatch
| GatewayEntitlementModifyDispatch;
// #region Dispatch Payloads
@@ -671,6 +679,55 @@ export interface GatewayChannelPinsUpdateDispatchData {
last_pin_timestamp?: string | null;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatchData = APIEntitlement;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementModifyDispatch = DataPayload<
| GatewayDispatchEvents.EntitlementCreate
| GatewayDispatchEvents.EntitlementUpdate
| GatewayDispatchEvents.EntitlementDelete,
GatewayEntitlementModifyDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-create
*/
export type GatewayEntitlementCreateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-update
*/
export type GatewayEntitlementUpdateDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatchData = GatewayEntitlementModifyDispatchData;
/**
* https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
*/
export type GatewayEntitlementDeleteDispatch = GatewayEntitlementModifyDispatch;
/**
* https://discord.com/developers/docs/topics/gateway-events#guild-update
*/
@@ -1553,6 +1610,10 @@ export type GatewayThreadMemberUpdateDispatch = DataPayload<
export type GatewayThreadMemberUpdateDispatchData = APIThreadMember & { guild_id: Snowflake };
/**
* @deprecated This type doesn't accurately reflect the Discord API.
* Use {@apilink GatewayThreadCreateDispatch},
* {@apilink GatewayThreadUpdateDispatch}, or
* {@apilink GatewayThreadDeleteDispatch} instead.
* https://discord.com/developers/docs/topics/gateway-events#thread-create
* https://discord.com/developers/docs/topics/gateway-events#thread-update
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
@@ -1565,7 +1626,10 @@ export type GatewayThreadModifyDispatch = DataPayload<
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
*/
export type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadCreateDispatch = DataPayload<
GatewayDispatchEvents.ThreadCreate,
GatewayThreadCreateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-create
@@ -1580,22 +1644,47 @@ export interface GatewayThreadCreateDispatchData extends APIThreadChannel {
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadUpdateDispatch = DataPayload<
GatewayDispatchEvents.ThreadUpdate,
GatewayThreadUpdateDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-update
*/
export type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData;
export type GatewayThreadUpdateDispatchData = APIThreadChannel;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch;
export type GatewayThreadDeleteDispatch = DataPayload<
GatewayDispatchEvents.ThreadDelete,
GatewayThreadDeleteDispatchData
>;
/**
* https://discord.com/developers/docs/topics/gateway-events#thread-delete
*/
export type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData;
export interface GatewayThreadDeleteDispatchData {
/**
* The id of the channel
*/
id: Snowflake;
/**
* The id of the guild
*/
guild_id: Snowflake;
/**
* The id of the parent channel of the thread
*/
parent_id: Snowflake;
/**
* The type of the channel
*
* See https://discord.com/developers/docs/resources/channel#channel-object-channel-types
*/
type: ChannelType;
}
/**
* https://discord.com/developers/docs/topics/gateway-events#typing-start

231
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "discord-api-types",
"version": "0.37.53",
"version": "0.37.71",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "discord-api-types",
"version": "0.37.53",
"version": "0.37.71",
"license": "MIT",
"devDependencies": {
"@babel/runtime-corejs3": "^7.18.0",
@@ -436,24 +436,96 @@
"dev": true
},
"node_modules/@babel/code-frame": {
"version": "7.21.4",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz",
"integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
"dev": true,
"dependencies": {
"@babel/highlight": "^7.18.6"
"@babel/highlight": "^7.22.13",
"chalk": "^2.4.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/generator": {
"version": "7.21.5",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.5.tgz",
"integrity": "sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==",
"node_modules/@babel/code-frame/node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": {
"@babel/types": "^7.21.5",
"color-convert": "^1.9.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/@babel/code-frame/node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true
},
"node_modules/@babel/code-frame/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@babel/code-frame/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/generator": {
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
"integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
"dev": true,
"dependencies": {
"@babel/types": "^7.23.0",
"@jridgewell/gen-mapping": "^0.3.2",
"@jridgewell/trace-mapping": "^0.3.17",
"jsesc": "^2.5.1"
@@ -462,20 +534,14 @@
"node": ">=6.9.0"
}
},
"node_modules/@babel/generator/node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.14",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
"integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
"dev": true
},
"node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": {
"version": "0.3.18",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
"integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
"dev": true,
"dependencies": {
"@jridgewell/resolve-uri": "3.1.0",
"@jridgewell/sourcemap-codec": "1.4.14"
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@babel/generator/node_modules/jsesc": {
@@ -491,77 +557,77 @@
}
},
"node_modules/@babel/helper-environment-visitor": {
"version": "7.21.5",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.21.5.tgz",
"integrity": "sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-function-name": {
"version": "7.21.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz",
"integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
"dev": true,
"dependencies": {
"@babel/template": "^7.20.7",
"@babel/types": "^7.21.0"
"@babel/template": "^7.22.15",
"@babel/types": "^7.23.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-hoist-variables": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz",
"integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==",
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
"dev": true,
"dependencies": {
"@babel/types": "^7.18.6"
"@babel/types": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-split-export-declaration": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
"integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
"version": "7.22.6",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
"dev": true,
"dependencies": {
"@babel/types": "^7.18.6"
"@babel/types": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.21.5",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz",
"integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==",
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.19.1",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"dev": true,
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/highlight": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz",
"integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"dev": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.18.6",
"chalk": "^2.0.0",
"@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
"engines": {
@@ -640,9 +706,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.21.5",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.5.tgz",
"integrity": "sha512-J+IxH2IsxV4HbnTrSWgMAQj0UEo61hDA4Ny8h8PCX0MLXiibqHbqIOVneqdocemSBc22VpBKxt4J6FQzy9HarQ==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
"dev": true,
"bin": {
"parser": "bin/babel-parser.js"
@@ -676,33 +742,33 @@
}
},
"node_modules/@babel/template": {
"version": "7.20.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz",
"integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==",
"version": "7.22.15",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.18.6",
"@babel/parser": "^7.20.7",
"@babel/types": "^7.20.7"
"@babel/code-frame": "^7.22.13",
"@babel/parser": "^7.22.15",
"@babel/types": "^7.22.15"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
"version": "7.21.5",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.5.tgz",
"integrity": "sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==",
"version": "7.23.2",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
"integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
"dev": true,
"dependencies": {
"@babel/code-frame": "^7.21.4",
"@babel/generator": "^7.21.5",
"@babel/helper-environment-visitor": "^7.21.5",
"@babel/helper-function-name": "^7.21.0",
"@babel/helper-hoist-variables": "^7.18.6",
"@babel/helper-split-export-declaration": "^7.18.6",
"@babel/parser": "^7.21.5",
"@babel/types": "^7.21.5",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.0",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
"@babel/helper-hoist-variables": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
"@babel/parser": "^7.23.0",
"@babel/types": "^7.23.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -720,13 +786,13 @@
}
},
"node_modules/@babel/types": {
"version": "7.21.5",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.5.tgz",
"integrity": "sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
"dev": true,
"dependencies": {
"@babel/helper-string-parser": "^7.21.5",
"@babel/helper-validator-identifier": "^7.19.1",
"@babel/helper-string-parser": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -5461,8 +5527,9 @@
}
},
"node_modules/ip": {
"version": "1.1.5",
"integrity": "sha512-rBtCAQAJm8A110nbwn6YdveUnuZH3WrC36IwkRXxDnq53JvXA2NVQvB7IHyKomxK1MJ4VDNw3UtFDdXQ+AvLYA==",
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz",
"integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==",
"dev": true
},
"node_modules/irregular-plurals": {
@@ -7638,9 +7705,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.23",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.23.tgz",
"integrity": "sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA==",
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"dev": true,
"funding": [
{
@@ -9448,9 +9515,9 @@
}
},
"node_modules/vm2": {
"version": "3.9.16",
"resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.16.tgz",
"integrity": "sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==",
"version": "3.9.19",
"resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.19.tgz",
"integrity": "sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==",
"dev": true,
"dependencies": {
"acorn": "^8.7.0",

View File

@@ -1,6 +1,6 @@
{
"name": "discord-api-types",
"version": "0.37.53",
"version": "0.37.71",
"description": "Discord API typings that are kept up to date for use in bot library creation.",
"homepage": "https://discord-api-types.dev",
"exports": {

View File

@@ -182,7 +182,7 @@ export const PermissionFlagsBits = {
*/
ManageEmojisAndStickers: 1n << 30n,
/**
* Allows management and editing of emojis, stickers, and soundboard sounds
* Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users
*/
ManageGuildExpressions: 1n << 30n,
/**
@@ -198,7 +198,7 @@ export const PermissionFlagsBits = {
*/
RequestToSpeak: 1n << 32n,
/**
* Allows for creating, editing, and deleting scheduled events
* Allows for editing and deleting scheduled events created by all users
*
* Applies to channel types: Voice, Stage
*/
@@ -254,6 +254,16 @@ export const PermissionFlagsBits = {
* Applies to channel types: Voice
*/
UseSoundboard: 1n << 42n,
/**
* Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user
*/
CreateGuildExpressions: 1n << 43n,
/**
* Allows for creating scheduled events, and editing and deleting those created by the current user
*
* Applies to channel types: Voice, Stage
*/
CreateEvents: 1n << 44n,
/**
* Allows the usage of custom soundboard sounds from other servers
*

View File

@@ -1,7 +1,16 @@
import type { Permissions, Snowflake } from '../../../globals';
import type { APIRole, LocaleString } from '../../../v10';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel';
import type { APIGuildMember } from '../guild';
import type { APIEntitlement } from '../monetization';
import type { APIUser } from '../user';
import type { InteractionType } from './responses';
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
}
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
type: T;
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
thread_metadata?: APIThreadMetadata | null;
permissions: Permissions;
parent_id?: string | null;
}
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object

View File

@@ -24,7 +24,8 @@ export type APIInteractionResponse =
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
| APIModalInteractionResponse
| APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
data: APIModalInteractionResponseCallbackData;
}
export interface APIPremiumRequiredInteractionResponse {
type: InteractionResponseType.PremiumRequired;
}
export interface APIInteractionResponseChannelMessageWithSource {
type: InteractionResponseType.ChannelMessageWithSource;
data: APIInteractionResponseCallbackData;
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
* Respond to an interaction with an modal for a user to fill-out
*/
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*/
PremiumRequired,
}
/**

View File

@@ -41,6 +41,10 @@ export interface APIApplication {
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
*/
bot_require_code_grant: boolean;
/**
* Partial user object for the bot user associated with the application
*/
bot?: APIUser;
/**
* The url of the application's terms of service
*/
@@ -60,7 +64,7 @@ export interface APIApplication {
*
* @deprecated This field will be removed in v11
*/
summary: string;
summary: '';
/**
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
*
@@ -77,6 +81,10 @@ export interface APIApplication {
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
*/
guild_id?: Snowflake;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
/**
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
*/
@@ -96,7 +104,24 @@ export interface APIApplication {
*/
flags: ApplicationFlags;
/**
* Up to 5 tags describing the content and functionality of the application
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Array of redirect URIs for the application
*/
redirect_uris?: string[];
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
tags?: [string, string?, string?, string?, string?];
/**
@@ -107,19 +132,6 @@ export interface APIApplication {
* The application's default custom authorization link, if enabled
*/
custom_install_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* An approximate count of the app's guild membership
*/
approximate_guild_count?: number;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
}
export interface APIApplicationInstallParams {

View File

@@ -13,6 +13,7 @@ import type {
import type { APIChannel, APIOverwrite } from './channel';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
@@ -312,6 +313,15 @@ export interface APIAuditLogOptions {
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
*/
role_name?: string;
/**
* Type of integration which performed the action
*
* Present from:
* - MEMBER_KICK
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
}
export enum AuditLogOptionsType {
@@ -725,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/*
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
/*
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
/*
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
/*
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<

View File

@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals';
import type { APIApplication } from './application';
import type { APIPartialEmoji } from './emoji';
import type { APIGuildMember } from './guild';
import type { APIMessageInteraction } from './interactions';
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions';
import type { APIRole } from './permissions';
import type { APISticker, APIStickerItem } from './sticker';
import type { APIUser } from './user';
@@ -48,7 +48,6 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice;
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -124,7 +123,7 @@ export interface APIGuildTextChannel<T extends GuildTextChannelType>
*/
default_thread_rate_limit_per_user?: number;
/**
* The channel topic (0-4096 characters for forum channels, 0-1024 characters for all others)
* The channel topic (0-1024 characters)
*/
topic?: string | null;
}
@@ -205,12 +204,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
export interface APIThreadChannel
extends Omit<
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
'name'
>,
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
APIGuildChannel<ThreadChannelType> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -240,7 +238,7 @@ export interface APIThreadChannel
*/
total_message_sent?: number;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
*/
applied_tags: Snowflake[];
}
@@ -317,25 +315,60 @@ export enum ForumLayoutType {
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T> {
/**
* The set of tags that can be used in a forum channel
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The emoji to show in the add reaction button on a thread in a forum channel
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*/
default_sort_order: SortOrderType | null;
}
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*/
@@ -348,7 +381,8 @@ export type APIChannel =
| APIGuildStageVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -410,6 +444,12 @@ export enum ChannelType {
* A channel that can only contain threads
*/
GuildForum,
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
*/
GuildMedia,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS //
@@ -665,11 +705,16 @@ export interface APIMessage {
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
/**
* Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message
*/
role_subscription_data?: APIMessageRoleSubscriptionData;
/**
* Data for users, members, channels, and roles in the message's auto-populated select menus
*
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
}
/**
@@ -855,19 +900,45 @@ export interface APIFollowedChannel {
*/
export interface APIReaction {
/**
* Times this emoji has been used to react
* Total number of times this emoji has been used to react (including super reacts)
*/
count: number;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
count_details: APIReactionCountDetails;
/**
* Whether the current user reacted using this emoji
*/
me: boolean;
/**
* Whether the current user super-reacted using this emoji
*/
me_burst: boolean;
/**
* Emoji information
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}
/**
@@ -1598,6 +1669,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
* List of default values for auto-populated select menu components
*/
default_values?: APISelectMenuDefaultValue<D>[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1611,28 +1696,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.UserSelect,
SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.RoleSelect,
SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
/**
* List of channel types to include in the ChannelSelect component
*/
channel_types?: ChannelType[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export enum SelectMenuDefaultValueType {
Channel = 'channel',
Role = 'role',
User = 'user',
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
type: T;
id: Snowflake;
}
export type APIAutoPopulatedSelectMenuComponent =
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIRoleSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1744,6 +1862,10 @@ export enum ChannelFlags {
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
/**
* Whether media download options are hidden.
*/
HideMediaDownloadOptions = 1 << 15,
}
/**

View File

@@ -427,7 +427,7 @@ export enum GuildFeature {
* Guild has enabled the role subscription promo page
*/
CreatorStorePage = 'CREATOR_STORE_PAGE',
/*
/**
* Guild has been set as a support server on the App Directory
*/
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',

View File

@@ -18,3 +18,4 @@ export * from './template';
export * from './user';
export * from './voice';
export * from './webhook';
export * from './monetization';

View File

@@ -0,0 +1,115 @@
import type { Snowflake } from '../../globals';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
*/
export interface APIEntitlement {
/**
* ID of the entitlement
*/
id: Snowflake;
/**
* ID of the SKU
*/
sku_id: Snowflake;
/**
* ID of the user that is granted access to the entitlement's sku
*/
user_id?: Snowflake;
/**
* ID of the guild that is granted access to the entitlement's sku
*/
guild_id?: Snowflake;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Type of entitlement
*/
type: EntitlementType;
/**
* Whether the entitlement was deleted
*/
deleted: boolean;
/**
* Start date at which the entitlement is valid. Not present when using test entitlements.
*/
starts_at?: string;
/**
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
*/
export enum EntitlementType {
/**
* Entitlement was purchased as an app subscription
*/
ApplicationSubscription = 8,
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
*/
export interface APISKU {
/**
* ID of SKU
*/
id: Snowflake;
/**
* Type of SKU
*/
type: SKUType;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Customer-facing name of your premium offering
*/
name: string;
/**
* System-generated URL slug based on the SKU's name
*/
slug: string;
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
*/
export enum SKUFlags {
/**
* SKU is available for purchase
*/
Available = 1 << 2,
/**
* Recurring SKU that can be purchased by a user and applied to a single server.
* Grants access to every user in that server.
*/
GuildSubscription = 1 << 7,
/**
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
*/
UserSubscription = 1 << 8,
}
export enum SKUType {
/**
* Represents a recurring subscription
*/
Subscription = 5,
/**
* System-generated group for each Subscription SKU created
*/
SubscriptionGroup = 6,
}

View File

@@ -70,7 +70,7 @@ export interface APISticker {
*/
export enum StickerType {
/**
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
* An official sticker in a pack
*/
Standard = 1,
/**

View File

@@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
*/
permissions: ['*'];
/**
@@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}
/**
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

View File

@@ -281,7 +281,11 @@ export enum ConnectionService {
Steam = 'steam',
TikTok = 'tiktok',
Twitch = 'twitch',
Twitter = 'twitter',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
*/
Twitter = X,
Xbox = 'xbox',
YouTube = 'youtube',
}

View File

@@ -1,7 +1,16 @@
import type { Permissions, Snowflake } from '../../../globals';
import type { APIRole, LocaleString } from '../../../v9';
import type { APIAttachment, APIChannel, APIMessage, APIPartialChannel, APIThreadMetadata } from '../channel';
import type {
APIAttachment,
APIChannel,
APIMessage,
APIPartialChannel,
APIThreadChannel,
ChannelType,
ThreadChannelType,
} from '../channel';
import type { APIGuildMember } from '../guild';
import type { APIEntitlement } from '../monetization';
import type { APIUser } from '../user';
import type { InteractionType } from './responses';
@@ -122,6 +131,10 @@ export interface APIBaseInteraction<Type extends InteractionType, Data> {
* The guild's preferred locale, if invoked in a guild
*/
guild_locale?: LocaleString;
/**
* For monetized apps, any entitlements for the invoking user, representing access to premium SKUs
*/
entitlements: APIEntitlement[];
}
export type APIDMInteractionWrapper<Original extends APIBaseInteraction<InteractionType, unknown>> = Omit<
@@ -136,14 +149,18 @@ export type APIGuildInteractionWrapper<Original extends APIBaseInteraction<Inter
> &
Required<Pick<Original, 'member' | 'guild_id'>>;
export interface APIInteractionDataResolvedChannelBase<T extends ChannelType> extends Required<APIPartialChannel> {
type: T;
permissions: Permissions;
}
/**
* https://discord.com/developers/docs/resources/channel#channel-object
*/
export interface APIInteractionDataResolvedChannel extends Required<APIPartialChannel> {
thread_metadata?: APIThreadMetadata | null;
permissions: Permissions;
parent_id?: string | null;
}
export type APIInteractionDataResolvedChannel =
| APIInteractionDataResolvedChannelBase<Exclude<ChannelType, ThreadChannelType>>
| (APIInteractionDataResolvedChannelBase<ThreadChannelType> &
Pick<APIThreadChannel, 'thread_metadata' | 'parent_id'>);
/**
* https://discord.com/developers/docs/resources/guild#guild-member-object

View File

@@ -24,7 +24,8 @@ export type APIInteractionResponse =
| APIInteractionResponseDeferredMessageUpdate
| APIInteractionResponseUpdateMessage
| APIApplicationCommandAutocompleteResponse
| APIModalInteractionResponse;
| APIModalInteractionResponse
| APIPremiumRequiredInteractionResponse;
export interface APIInteractionResponsePong {
type: InteractionResponseType.Pong;
@@ -40,6 +41,10 @@ export interface APIModalInteractionResponse {
data: APIModalInteractionResponseCallbackData;
}
export interface APIPremiumRequiredInteractionResponse {
type: InteractionResponseType.PremiumRequired;
}
export interface APIInteractionResponseChannelMessageWithSource {
type: InteractionResponseType.ChannelMessageWithSource;
data: APIInteractionResponseCallbackData;
@@ -91,6 +96,10 @@ export enum InteractionResponseType {
* Respond to an interaction with an modal for a user to fill-out
*/
Modal,
/**
* Respond to an interaction with an upgrade button, only available for apps with monetization enabled
*/
PremiumRequired,
}
/**

View File

@@ -41,6 +41,10 @@ export interface APIApplication {
* When `true` the app's bot will only join upon completion of the full oauth2 code grant flow
*/
bot_require_code_grant: boolean;
/**
* Partial user object for the bot user associated with the application
*/
bot?: APIUser;
/**
* The url of the application's terms of service
*/
@@ -60,7 +64,7 @@ export interface APIApplication {
*
* @deprecated This field will be removed in v11
*/
summary: string;
summary: '';
/**
* The hexadecimal encoded key for verification in interactions and the GameSDK's GetTicket function
*
@@ -77,6 +81,10 @@ export interface APIApplication {
* If this application is a game sold on Discord, this field will be the guild to which it has been linked
*/
guild_id?: Snowflake;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
/**
* If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists
*/
@@ -96,7 +104,24 @@ export interface APIApplication {
*/
flags: ApplicationFlags;
/**
* Up to 5 tags describing the content and functionality of the application
* Approximate count of guilds the application has been added to
*/
approximate_guild_count?: number;
/**
* Array of redirect URIs for the application
*/
redirect_uris?: string[];
/**
* The interactions endpoint URL for the application
*/
interactions_endpoint_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* Up to 5 tags of max 20 characters each describing the content and functionality of the application
*/
tags?: [string, string?, string?, string?, string?];
/**
@@ -107,20 +132,6 @@ export interface APIApplication {
* The application's default custom authorization link, if enabled
*/
custom_install_url?: string;
/**
* The application's role connection verification entry point,
* which when configured will render the app as a verification method in the guild role verification configuration
*/
role_connections_verification_url?: string;
/**
* An approximate count of the app's guild membership
* s
*/
approximate_guild_count?: number;
/**
* A partial object of the associated guild
*/
guild?: APIPartialGuild;
}
export interface APIApplicationInstallParams {

View File

@@ -13,6 +13,7 @@ import type {
import type { APIChannel, APIOverwrite } from './channel';
import type {
APIGuildIntegration,
APIGuildIntegrationType,
GuildDefaultMessageNotifications,
GuildExplicitContentFilter,
GuildMFALevel,
@@ -312,6 +313,15 @@ export interface APIAuditLogOptions {
* **Present only if the {@link APIAuditLogOptions#type entry type} is "0"**
*/
role_name?: string;
/**
* Type of integration which performed the action
*
* Present from:
* - MEMBER_KICK
* - MEMBER_ROLE_UPDATE
*/
integration_type?: APIGuildIntegrationType;
}
export enum AuditLogOptionsType {
@@ -725,22 +735,22 @@ export type APIAuditLogChangeKeyAvailable = AuditLogChangeData<'available', bool
*/
export type APIAuditLogChangeKeyGuildId = AuditLogChangeData<'guild_id', Snowflake>;
/*
/**
* Returned when a thread's archive status is changed
*/
export type APIAuditLogChangeKeyArchived = AuditLogChangeData<'archived', boolean>;
/*
/**
* Returned when a thread's lock status is changed
*/
export type APIAuditLogChangeKeyLocked = AuditLogChangeData<'locked', boolean>;
/*
/**
* Returned when a thread's auto archive duration is changed
*/
export type APIAuditLogChangeKeyAutoArchiveDuration = AuditLogChangeData<'auto_archive_duration', number>;
/*
/**
* Returned when a channel's default auto archive duration for newly created threads is changed
*/
export type APIAuditLogChangeKeyDefaultAutoArchiveDuration = AuditLogChangeData<

View File

@@ -6,7 +6,7 @@ import type { Permissions, Snowflake } from '../../globals';
import type { APIApplication } from './application';
import type { APIPartialEmoji } from './emoji';
import type { APIGuildMember } from './guild';
import type { APIMessageInteraction } from './interactions';
import type { APIInteractionDataResolved, APIMessageInteraction } from './interactions';
import type { APIRole } from './permissions';
import type { APISticker, APIStickerItem } from './sticker';
import type { APIUser } from './user';
@@ -48,7 +48,6 @@ export type TextChannelType =
| ChannelType.PrivateThread
| ChannelType.AnnouncementThread
| ChannelType.GuildText
| ChannelType.GuildForum
| ChannelType.GuildVoice
| ChannelType.GuildStageVoice;
@@ -111,7 +110,7 @@ export interface APIGuildChannel<T extends ChannelType> extends Omit<APIChannelB
export type GuildTextChannelType = Exclude<TextChannelType, ChannelType.DM | ChannelType.GroupDM>;
export interface APIGuildTextChannel<T extends GuildTextChannelType>
export interface APIGuildTextChannel<T extends GuildTextChannelType | ChannelType.GuildForum | ChannelType.GuildMedia>
extends Omit<APITextBasedChannel<T>, 'name'>,
APIGuildChannel<T> {
/**
@@ -201,12 +200,11 @@ export interface APIGroupDMChannel extends Omit<APIDMChannelBase<ChannelType.Gro
managed?: boolean;
}
export type ThreadChannelType = ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread;
export interface APIThreadChannel
extends Omit<
APITextBasedChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread>,
'name'
>,
APIGuildChannel<ChannelType.PublicThread | ChannelType.PrivateThread | ChannelType.AnnouncementThread> {
extends Omit<APITextBasedChannel<ThreadChannelType>, 'name'>,
APIGuildChannel<ThreadChannelType> {
/**
* The client users member for the thread, only included in select endpoints
*/
@@ -236,7 +234,7 @@ export interface APIThreadChannel
*/
total_message_sent?: number;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel
* The IDs of the set of tags that have been applied to a thread in a thread-only channel
*/
applied_tags: Snowflake[];
}
@@ -313,25 +311,60 @@ export enum ForumLayoutType {
GalleryView,
}
export interface APIGuildForumChannel extends APIGuildTextChannel<ChannelType.GuildForum> {
export interface APIThreadOnlyChannel<T extends ChannelType.GuildForum | ChannelType.GuildMedia>
extends APIGuildChannel<T> {
/**
* The set of tags that can be used in a forum channel
* The channel topic (0-4096 characters)
*/
topic?: string | null;
/**
* The id of the last thread created in this channel (may not point to an existing or valid thread)
*/
last_message_id?: Snowflake | null;
/**
* Amount of seconds a user has to wait before creating another thread (0-21600);
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`, are unaffected
*
* The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value.
*/
rate_limit_per_user?: number;
/**
* When the last pinned message was pinned.
* This may be `null` in events such as `GUILD_CREATE` when a message is not pinned
*/
last_pin_timestamp?: string | null;
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration;
/**
* The set of tags that can be used in a thread-only channel
*/
available_tags: APIGuildForumTag[];
/**
* The emoji to show in the add reaction button on a thread in a forum channel
* The initial `rate_limit_per_user` to set on newly created threads.
* This field is copied to the thread at creation time and does not live update
*/
default_thread_rate_limit_per_user?: number;
/**
* The emoji to show in the add reaction button on a thread in a thread-only channel
*/
default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*/
default_sort_order: SortOrderType | null;
}
export interface APIGuildForumChannel extends APIThreadOnlyChannel<ChannelType.GuildForum> {
/**
* The default layout type used to display posts in a forum channel. Defaults to `0`, which indicates a layout view has not been set by a channel admin
*/
default_forum_layout: ForumLayoutType;
}
export type APIGuildMediaChannel = APIThreadOnlyChannel<ChannelType.GuildMedia>;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-structure
*/
@@ -344,7 +377,8 @@ export type APIChannel =
| APIGuildStageVoiceChannel
| APIGuildCategoryChannel
| APIThreadChannel
| APIGuildForumChannel;
| APIGuildForumChannel
| APIGuildMediaChannel;
/**
* https://discord.com/developers/docs/resources/channel#channel-object-channel-types
@@ -406,6 +440,12 @@ export enum ChannelType {
* A channel that can only contain threads
*/
GuildForum,
/**
* A channel like forum channels but contains media for server subscriptions
*
* See https://creator-support.discord.com/hc/articles/14346342766743
*/
GuildMedia,
// EVERYTHING BELOW THIS LINE SHOULD BE OLD NAMES FOR RENAMED ENUM MEMBERS
/**
@@ -656,6 +696,12 @@ export interface APIMessage {
* It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread
*/
position?: number;
/**
* Data for users, members, channels, and roles in the message's auto-populated select menus
*
* See https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure
*/
resolved?: APIInteractionDataResolved;
}
/**
@@ -819,19 +865,45 @@ export interface APIFollowedChannel {
*/
export interface APIReaction {
/**
* Times this emoji has been used to react
* Total number of times this emoji has been used to react (including super reacts)
*/
count: number;
/**
* An object detailing the individual reaction counts for different types of reactions
*/
count_details: APIReactionCountDetails;
/**
* Whether the current user reacted using this emoji
*/
me: boolean;
/**
* Whether the current user super-reacted using this emoji
*/
me_burst: boolean;
/**
* Emoji information
*
* See https://discord.com/developers/docs/resources/emoji#emoji-object
*/
emoji: APIPartialEmoji;
/**
* Hexadecimal colors used for this super reaction
*/
burst_colors: string[];
}
/**
* https://discord.com/developers/docs/resources/channel#reaction-count-details-object-reaction-count-details-structure
*/
export interface APIReactionCountDetails {
/**
* Count of super reactions
*/
burst: number;
/**
* Count of normal reactions
*/
normal: number;
}
/**
@@ -1566,6 +1638,20 @@ export interface APIBaseSelectMenuComponent<
disabled?: boolean;
}
export interface APIBaseAutoPopulatedSelectMenuComponent<
T extends
| ComponentType.UserSelect
| ComponentType.RoleSelect
| ComponentType.MentionableSelect
| ComponentType.ChannelSelect,
D extends SelectMenuDefaultValueType,
> extends APIBaseSelectMenuComponent<T> {
/**
* List of default values for auto-populated select menu components
*/
default_values?: APISelectMenuDefaultValue<D>[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1579,28 +1665,61 @@ export interface APIStringSelectComponent extends APIBaseSelectMenuComponent<Com
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIUserSelectComponent = APIBaseSelectMenuComponent<ComponentType.UserSelect>;
export type APIUserSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.UserSelect,
SelectMenuDefaultValueType.User
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIRoleSelectComponent = APIBaseSelectMenuComponent<ComponentType.RoleSelect>;
export type APIRoleSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.RoleSelect,
SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export type APIMentionableSelectComponent = APIBaseSelectMenuComponent<ComponentType.MentionableSelect>;
export type APIMentionableSelectComponent = APIBaseAutoPopulatedSelectMenuComponent<
ComponentType.MentionableSelect,
SelectMenuDefaultValueType.User | SelectMenuDefaultValueType.Role
>;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
export interface APIChannelSelectComponent extends APIBaseSelectMenuComponent<ComponentType.ChannelSelect> {
export interface APIChannelSelectComponent
extends APIBaseAutoPopulatedSelectMenuComponent<ComponentType.ChannelSelect, SelectMenuDefaultValueType.Channel> {
/**
* List of channel types to include in the ChannelSelect component
*/
channel_types?: ChannelType[];
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export enum SelectMenuDefaultValueType {
Channel = 'channel',
Role = 'role',
User = 'user',
}
/**
* https://discord.com/developers/docs/interactions/message-components#select-menu-object-select-default-value-structure
*/
export interface APISelectMenuDefaultValue<T extends SelectMenuDefaultValueType> {
type: T;
id: Snowflake;
}
export type APIAutoPopulatedSelectMenuComponent =
| APIChannelSelectComponent
| APIMentionableSelectComponent
| APIRoleSelectComponent
| APIUserSelectComponent;
/**
* https://discord.com/developers/docs/interactions/message-components#select-menus
*/
@@ -1712,6 +1831,10 @@ export enum ChannelFlags {
* @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date.
*/
IsScheduledForDeletion = 1 << 9,
/**
* Whether media download options are hidden.
*/
HideMediaDownloadOptions = 1 << 15,
}
/**

View File

@@ -419,7 +419,7 @@ export enum GuildFeature {
* Guild has enabled the role subscription promo page
*/
CreatorStorePage = 'CREATOR_STORE_PAGE',
/*
/**
* Guild has been set as a support server on the App Directory
*/
DeveloperSupportServer = 'DEVELOPER_SUPPORT_SERVER',

View File

@@ -18,3 +18,4 @@ export * from './template';
export * from './user';
export * from './voice';
export * from './webhook';
export * from './monetization';

115
payloads/v9/monetization.ts Normal file
View File

@@ -0,0 +1,115 @@
import type { Snowflake } from '../../globals';
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure
*/
export interface APIEntitlement {
/**
* ID of the entitlement
*/
id: Snowflake;
/**
* ID of the SKU
*/
sku_id: Snowflake;
/**
* ID of the user that is granted access to the entitlement's sku
*/
user_id?: Snowflake;
/**
* ID of the guild that is granted access to the entitlement's sku
*/
guild_id?: Snowflake;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Type of entitlement
*/
type: EntitlementType;
/**
* Whether the entitlement was deleted
*/
deleted: boolean;
/**
* Start date at which the entitlement is valid. Not present when using test entitlements.
*/
starts_at?: string;
/**
* Date at which the entitlement is no longer valid. Not present when using test entitlements.
*/
ends_at?: string;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types
*/
export enum EntitlementType {
/**
* Entitlement was purchased as an app subscription
*/
ApplicationSubscription = 8,
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure
*/
export interface APISKU {
/**
* ID of SKU
*/
id: Snowflake;
/**
* Type of SKU
*/
type: SKUType;
/**
* ID of the parent application
*/
application_id: Snowflake;
/**
* Customer-facing name of your premium offering
*/
name: string;
/**
* System-generated URL slug based on the SKU's name
*/
slug: string;
/**
* SKU flags combined as a bitfield
*
* See https://en.wikipedia.org/wiki/Bit_field
*/
flags: SKUFlags;
}
/**
* https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags
*/
export enum SKUFlags {
/**
* SKU is available for purchase
*/
Available = 1 << 2,
/**
* Recurring SKU that can be purchased by a user and applied to a single server.
* Grants access to every user in that server.
*/
GuildSubscription = 1 << 7,
/**
* Recurring SKU purchased by a user for themselves. Grants access to the purchasing user in every server.
*/
UserSubscription = 1 << 8,
}
export enum SKUType {
/**
* Represents a recurring subscription
*/
Subscription = 5,
/**
* System-generated group for each Subscription SKU created
*/
SubscriptionGroup = 6,
}

View File

@@ -70,7 +70,7 @@ export interface APISticker {
*/
export enum StickerType {
/**
* An official sticker in a pack, part of Nitro or in a removed purchasable pack
* An official sticker in a pack
*/
Standard = 1,
/**

View File

@@ -43,6 +43,8 @@ export interface APITeamMember {
membership_state: TeamMemberMembershipState;
/**
* Will always be `["*"]`
*
* @deprecated Use `role` instead
*/
permissions: ['*'];
/**
@@ -55,6 +57,12 @@ export interface APITeamMember {
* See https://discord.com/developers/docs/resources/user#user-object
*/
user: APIUser;
/**
* The user's role in the team.
*
* See https://discord.com/developers/docs/topics/teams#team-member-roles
*/
role: TeamMemberRole;
}
/**
@@ -64,3 +72,12 @@ export enum TeamMemberMembershipState {
Invited = 1,
Accepted,
}
/**
* https://discord.com/developers/docs/topics/teams#team-member-roles-team-member-role-types
*/
export enum TeamMemberRole {
Admin = 'admin',
Developer = 'developer',
ReadOnly = 'read_only',
}

View File

@@ -281,7 +281,11 @@ export enum ConnectionService {
Steam = 'steam',
TikTok = 'tiktok',
Twitch = 'twitch',
Twitter = 'twitter',
X = 'twitter',
/**
* @deprecated This is the old name for {@apilink ConnectionService#X}
*/
Twitter = X,
Xbox = 'xbox',
YouTube = 'youtube',
}

View File

@@ -154,6 +154,8 @@ export enum RESTJSONErrorCodes {
ThereAreNoTagsAvailableThatCanBeSetByNonModerators = 40_066,
TagRequiredToCreateAForumPostInThisChannel,
AnEntitlementHasAlreadyBeenGrantedForThisResource = 40_074,
MissingAccess = 50_001,
InvalidAccountType,
CannotExecuteActionOnDMChannel,
@@ -198,6 +200,8 @@ export enum RESTJSONErrorCodes {
CannotSelfRedeemThisGift = 50_054,
InvalidGuild,
InvalidSKU = 50_057,
InvalidRequestOrigin = 50_067,
InvalidMessageType,
@@ -250,6 +254,7 @@ export enum RESTJSONErrorCodes {
NoUsersWithDiscordTagExist = 80_004,
ReactionWasBlocked = 90_001,
UserCannotUseBurstReactions,
ApplicationNotYetAvailable = 110_001,
@@ -320,6 +325,7 @@ export enum Locale {
Romanian = 'ro',
Russian = 'ru',
SpanishES = 'es-ES',
SpanishLATAM = 'es-419',
Swedish = 'sv-SE',
Thai = 'th',
Turkish = 'tr',

View File

@@ -1,4 +1,5 @@
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v10/application';
import type { Nullable, StrictPartial } from '../../utils/internals';
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
@@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo
* https://discord.com/developers/docs/resources/application#get-current-application
*/
export type RESTGetCurrentApplicationResult = APIApplication;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'flags'
| 'role_connections_verification_url'
| 'install_params'
| 'interactions_endpoint_url'
| 'tags'
> &
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
>;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationResult = APIApplication;

View File

@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals';
import type {
APIActionRowComponent,
APIAllowedMentions,
APIAttachment,
APIChannel,
APIEmbed,
APIExtendedInvite,
@@ -18,11 +17,13 @@ import type {
MessageFlags,
OverwriteType,
ThreadAutoArchiveDuration,
ThreadChannelType,
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
ChannelFlags,
} from '../../payloads/v10/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
*/
position?: number | null | undefined;
/**
* 0-1024 character channel topic (0-4096 characters for forum channels)
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
*
* Channel types: text, news, forum
* Channel types: text, news, forum, media
*/
topic?: string | null | undefined;
/**
* Whether the channel is nsfw
*
* Channel types: text, voice, news, forum
* Channel types: text, voice, news, forum, media
*/
nsfw?: boolean | null | undefined;
/**
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
* are unaffected
*
* Channel types: text, newsThread, publicThread, privateThread, forum
* Channel types: text, newsThread, publicThread, privateThread, forum, media
*/
rate_limit_per_user?: number | null | undefined;
/**
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* ID of the new parent category for a channel
*
* Channel types: text, voice, news
* Channel types: text, voice, news, stage, forum, media
*/
parent_id?: Snowflake | null | undefined;
/**
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*
* Channel types: text, news
* Channel types: text, news, forum, media
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
/**
* Channel flags combined as a bit field.
*/
flags?: ChannelFlags | undefined;
/**
* The set of tags that can be used in a thread-only channel; limited to 20
*
* Channel types: forum, media
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread
*
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
*/
invitable?: boolean | undefined;
/**
* The set of tags that can be used in a forum channel; limited to 20
* The emoji to show in the add reaction button on a thread in a thread-only channel
*
* Channel types: forum
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* The emoji to show in the add reaction button on a thread in a forum channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
/**
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
* This field is copied to the thread at creation time and does not live update
*
* Channel types: forum
* Channel types: text, forum, media
*/
default_thread_rate_limit_per_user?: number | null | undefined;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_sort_order?: SortOrderType | null | undefined;
/**
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType | undefined;
/**
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
*
* Channel types: forum, media
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
fail_if_not_exists?: boolean | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
*/
export interface RESTAPIAttachment {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
/**
* https://discord.com/developers/docs/resources/channel#create-message
*/
@@ -284,11 +313,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
flags?: MessageFlags | undefined;
/**
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
*/
enforce_nonce?: boolean | undefined;
}
/**
@@ -328,7 +362,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
*/
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
/*
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
*/
export interface RESTGetAPIChannelMessageReactionUsersQuery {
@@ -395,7 +429,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* The components to include with the message
*
@@ -614,25 +648,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: string;
};
@@ -656,7 +690,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
*
* @default ChannelType.PrivateThread
*/
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
type?: ThreadChannelType | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
*/
@@ -716,7 +750,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
/*
/**
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
*/
export interface RESTGetAPIChannelThreadsArchivedQuery {

View File

@@ -24,8 +24,11 @@ import type {
GuildSystemChannelFlags,
GuildVerificationLevel,
GuildWidgetStyle,
APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption,
} from '../../payloads/v10/index';
import type {
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
DistributiveOmit,
DistributivePick,
Nullable,
@@ -449,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
deaf?: boolean | undefined;
}
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member
@@ -930,10 +933,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
*/
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
APIGuildOnboarding,
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
>;
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
> & {
/**
* Prompts shown during onboarding and in customize community
*/
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
};
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
> & {
/**
* Options available within the prompt
*/
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
};
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
> & {
/**
* Emoji id
*/
emoji_id?: Snowflake | null | undefined;
/**
* Emoji name
*/
emoji_name?: string | null | undefined;
/**
* Whether this emoji is animated
*/
emoji_animated?: boolean | null | undefined;
};
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding

View File

@@ -18,6 +18,7 @@ export * from './template';
export * from './user';
export * from './voice';
export * from './webhook';
export * from './monetization';
export const APIVersion = '10';
@@ -830,6 +831,16 @@ export const Routes = {
* Route for:
* - GET `/sticker-packs`
*/
stickerPacks() {
return '/sticker-packs' as const;
},
/**
* Route for:
* - GET `/sticker-packs`
*
* @deprecated Use {@link Routes.stickerPacks} instead.
*/
nitroStickerPacks() {
return '/sticker-packs' as const;
},
@@ -892,14 +903,45 @@ export const Routes = {
/**
* Route for:
* - GET `/applications/@me`
* - PATCH `/applications/@me`
*/
currentApplication() {
return '/applications/@me' as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/entitlements`
* - POST `/applications/{application.id}/entitlements`
*/
entitlements(applicationId: Snowflake) {
return `/applications/${applicationId}/entitlements` as const;
},
/**
* Route for:
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/skus`
*/
skus(applicationId: Snowflake) {
return `/applications/${applicationId}/skus` as const;
},
};
export const StickerPackApplicationId = '710982414301790216';
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export const CDNRoutes = {
/**
* Route for:
@@ -909,7 +951,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
emoji(emojiId: Snowflake, format: EmojiFormat) {
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
return `/emojis/${emojiId}.${format}` as const;
},
@@ -921,7 +963,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
},
@@ -931,7 +973,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
},
@@ -941,7 +983,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
guildId: Snowflake,
guildDiscoverySplash: string,
format: Format,
) {
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
},
@@ -953,7 +999,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
return `/banners/${guildId}/${guildBanner}.${format}` as const;
},
@@ -965,7 +1011,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
return `/banners/${userId}/${userBanner}.${format}` as const;
},
@@ -979,7 +1025,7 @@ export const CDNRoutes = {
*
* This route supports the extension: PNG
*/
defaultUserAvatar(index: DefaultUserAvatarAssets) {
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
return `/embed/avatars/${index}.png` as const;
},
@@ -991,7 +1037,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
return `/avatars/${userId}/${userAvatar}.${format}` as const;
},
@@ -1003,7 +1049,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
guildId: Snowflake,
userId: Snowflake,
memberAvatar: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
},
@@ -1023,7 +1074,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
applicationIcon<Format extends ApplicationIconFormat>(
applicationId: Snowflake,
applicationIcon: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
},
@@ -1033,7 +1088,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
applicationCover<Format extends ApplicationCoverFormat>(
applicationId: Snowflake,
applicationCoverImage: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
},
@@ -1043,7 +1102,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
applicationAsset<Format extends ApplicationAssetFormat>(
applicationId: Snowflake,
applicationAssetId: string,
format: Format,
) {
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},
@@ -1053,11 +1116,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
achievementIcon(
achievementIcon<Format extends AchievementIconFormat>(
applicationId: Snowflake,
achievementId: Snowflake,
achievementIconHash: string,
format: AchievementIconFormat,
format: Format,
) {
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
},
@@ -1068,7 +1131,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},
@@ -1078,8 +1141,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
applicationId: Snowflake,
assetId: string,
format: Format = ImageFormat.PNG as Format,
) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},
/**
@@ -1088,7 +1155,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
},
@@ -1098,7 +1165,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
return `/stickers/${stickerId}.${format}` as const;
},
@@ -1108,7 +1175,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
},
@@ -1118,10 +1185,10 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildScheduledEventCover(
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
guildScheduledEventId: Snowflake,
guildScheduledEventCoverImage: string,
format: GuildScheduledEventCoverFormat,
format: Format,
) {
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
},
@@ -1132,7 +1199,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
guildMemberBanner<Format extends GuildMemberBannerFormat>(
guildId: Snowflake,
userId: Snowflake,
guildMemberBanner: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
},
};
@@ -1154,19 +1226,12 @@ export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export interface CDNQuery {
/**
* The returned image can have the size changed by using this query parameter

85
rest/v10/monetization.ts Normal file
View File

@@ -0,0 +1,85 @@
import type { Snowflake } from '../../globals';
import type { APIEntitlement, APISKU } from '../../v10';
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export interface RESTGetAPIEntitlementsQuery {
/**
* User ID to look up entitlements for
*/
user_id?: Snowflake | undefined;
/**
* Optional list of SKU IDs to check entitlements for
* Comma-delimited set of snowflakes
*/
sku_ids?: string | undefined;
/**
* Retrieve entitlements before this entitlement ID
*/
before?: Snowflake | undefined;
/**
* Retrieve entitlements after this entitlement ID
*/
after?: Snowflake | undefined;
/**
* Number of entitlements to return (1-100)
*
* @default 100
*/
limit?: number | undefined;
/**
* Guild ID to look up entitlements for
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
*/
exclude_ended?: boolean | undefined;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export interface RESTPostAPIEntitlementBody {
/**
* ID of the SKU to grant the entitlement to
*/
sku_id: Snowflake;
/**
* ID of the guild or user to grant the entitlement to
*/
owner_id: Snowflake;
/**
* The type of entitlement owner
*/
owner_type: EntitlementOwnerType;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export enum EntitlementOwnerType {
Guild = 1,
User,
}
/**
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
*/
export type RESTDeleteAPIEntitlementResult = never;
/**
* https://discord.com/developers/docs/monetization/skus#list-skus
*/
export type RESTGetAPISKUsResult = APISKU[];

View File

@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
* Notify @everyone that a stage instance has started
*/
send_start_notification?: boolean | undefined;
/**
* The guild scheduled event associated with this stage instance
*/
guild_scheduled_event_id?: Snowflake | undefined;
}
/**

View File

@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v10/index';
export type RESTGetAPIStickerResult = APISticker;
/**
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*/
export interface RESTGetNitroStickerPacksResult {
export interface RESTGetStickerPacksResult {
sticker_packs: APIStickerPack[];
}
/**
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*
* @deprecated Use `RESTGetStickerPacksResult` instead
*/
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
/**
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
*/

View File

@@ -5,11 +5,11 @@ import type {
APIEmbed,
APIMessage,
APIWebhook,
APIAttachment,
MessageFlags,
APIMessageActionRowComponent,
} from '../../payloads/v10/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
import type { RESTAPIAttachment } from './channel';
/**
* https://discord.com/developers/docs/resources/webhook#create-webhook
*/
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
*/
thread_name?: string | undefined;
/**
* Array of tag ids to apply to the thread
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
};
/**

View File

@@ -454,7 +454,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
/**
* @deprecated API and gateway v8 are deprecated and the types will not receive further updates, please update to v10.
*/
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member

View File

@@ -1,4 +1,5 @@
import type { APIApplication, APIApplicationRoleConnectionMetadata } from '../../payloads/v9/application';
import type { StrictPartial, Nullable } from '../../utils/internals';
/**
* https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
@@ -19,3 +20,25 @@ export type RESTPutAPIApplicationRoleConnectionMetadataResult = APIApplicationRo
* https://discord.com/developers/docs/resources/application#get-current-application
*/
export type RESTGetCurrentApplicationResult = APIApplication;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationJSONBody = StrictPartial<
Pick<
APIApplication,
| 'custom_install_url'
| 'description'
| 'flags'
| 'role_connections_verification_url'
| 'install_params'
| 'interactions_endpoint_url'
| 'tags'
> &
Nullable<Pick<APIApplication, 'icon' | 'cover_image'>>
>;
/**
* https://discord.com/developers/docs/resources/application#edit-current-application
*/
export type RESTPatchCurrentApplicationResult = APIApplication;

View File

@@ -2,7 +2,6 @@ import type { Permissions, Snowflake } from '../../globals';
import type {
APIActionRowComponent,
APIAllowedMentions,
APIAttachment,
APIChannel,
APIEmbed,
APIExtendedInvite,
@@ -18,11 +17,13 @@ import type {
MessageFlags,
OverwriteType,
ThreadAutoArchiveDuration,
ThreadChannelType,
VideoQualityMode,
APIGuildForumTag,
APIGuildForumDefaultReactionEmoji,
SortOrderType,
ForumLayoutType,
ChannelFlags,
} from '../../payloads/v9/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, StrictPartial } from '../../utils/internals';
@@ -60,15 +61,15 @@ export interface RESTPatchAPIChannelJSONBody {
*/
position?: number | null | undefined;
/**
* 0-1024 character channel topic (0-4096 characters for forum channels)
* 0-1024 character channel topic (0-4096 characters for thread-only channels)
*
* Channel types: text, news, forum
* Channel types: text, news, forum, media
*/
topic?: string | null | undefined;
/**
* Whether the channel is nsfw
*
* Channel types: text, voice, news, forum
* Channel types: text, voice, news, forum, media
*/
nsfw?: boolean | null | undefined;
/**
@@ -76,7 +77,7 @@ export interface RESTPatchAPIChannelJSONBody {
* bots, as well as users with the permission `MANAGE_MESSAGES` or `MANAGE_CHANNELS`,
* are unaffected
*
* Channel types: text, newsThread, publicThread, privateThread, forum
* Channel types: text, newsThread, publicThread, privateThread, forum, media
*/
rate_limit_per_user?: number | null | undefined;
/**
@@ -100,7 +101,7 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* ID of the new parent category for a channel
*
* Channel types: text, voice, news
* Channel types: text, voice, news, stage, forum, media
*/
parent_id?: Snowflake | null | undefined;
/**
@@ -136,9 +137,19 @@ export interface RESTPatchAPIChannelJSONBody {
/**
* Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity
*
* Channel types: text, news
* Channel types: text, news, forum, media
*/
default_auto_archive_duration?: ThreadAutoArchiveDuration | undefined;
/**
* Channel flags combined as a bit field.
*/
flags?: ChannelFlags | undefined;
/**
* The set of tags that can be used in a thread-only channel; limited to 20
*
* Channel types: forum, media
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread
*
@@ -146,28 +157,22 @@ export interface RESTPatchAPIChannelJSONBody {
*/
invitable?: boolean | undefined;
/**
* The set of tags that can be used in a forum channel; limited to 20
* The emoji to show in the add reaction button on a thread in a thread-only channel
*
* Channel types: forum
*/
available_tags?: (Partial<APIGuildForumTag> & Pick<APIGuildForumTag, 'name'>)[] | undefined;
/**
* The emoji to show in the add reaction button on a thread in a forum channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_reaction_emoji?: APIGuildForumDefaultReactionEmoji | undefined;
/**
* The initial `rate_limit_per_user` to set on newly created threads in a channel.
* This field is copied to the thread at creation time and does not live update
*
* Channel types: forum
* Channel types: text, forum, media
*/
default_thread_rate_limit_per_user?: number | null | undefined;
/**
* The default sort order type used to order posts in a forum channel
* The default sort order type used to order posts in a thread-only channel
*
* Channel types: forum
* Channel types: forum, media
*/
default_sort_order?: SortOrderType | null | undefined;
/**
@@ -176,6 +181,12 @@ export interface RESTPatchAPIChannelJSONBody {
* Channel types: forum
*/
default_forum_layout?: ForumLayoutType | undefined;
/**
* The ids of the set of tags that have been applied to a thread-only channel; limited to 5
*
* Channel types: forum, media
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -235,6 +246,24 @@ export type APIMessageReferenceSend = StrictPartial<APIMessageReference> &
fail_if_not_exists?: boolean | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#attachment-object
*/
export interface RESTAPIAttachment {
/**
* Attachment id or a number that matches `n` in `files[n]`
*/
id: Snowflake | number;
/**
* Name of the file
*/
filename?: string | undefined;
/**
* Description of the file
*/
description?: string | undefined;
}
/**
* https://discord.com/developers/docs/resources/channel#create-message
*/
@@ -292,11 +321,16 @@ export interface RESTPostAPIChannelMessageJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
flags?: MessageFlags | undefined;
/**
* If `true` and nonce is present, it will be checked for uniqueness in the past few minutes.
* If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
*/
enforce_nonce?: boolean | undefined;
}
/**
@@ -336,7 +370,7 @@ export type RESTDeleteAPIChannelMessageOwnReaction = never;
*/
export type RESTDeleteAPIChannelMessageUserReactionResult = never;
/*
/**
* https://discord.com/developers/docs/resources/channel#get-reactions
*/
export interface RESTGetAPIChannelMessageReactionUsersQuery {
@@ -411,7 +445,7 @@ export interface RESTPatchAPIChannelMessageJSONBody {
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* The components to include with the message
*
@@ -630,25 +664,25 @@ export interface RESTPostAPIChannelMessagesThreadsJSONBody {
}
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsJSONBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: RESTPostAPIChannelMessageJSONBody;
/**
* The IDs of the set of tags that have been applied to a thread in a forum channel; limited to 5
* The IDs of the set of tags to apply to the thread; limited to 5
*/
applied_tags?: Snowflake[] | undefined;
};
/**
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel
* https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
*/
export type RESTPostAPIGuildForumThreadsFormDataBody = RESTPostAPIChannelMessagesThreadsJSONBody & {
/**
* First message in the forum thread
* The initial message of the thread
*/
message: string;
};
@@ -672,7 +706,7 @@ export interface RESTPostAPIChannelThreadsJSONBody extends RESTPostAPIChannelMes
*
* @default ChannelType.PrivateThread
*/
type?: ChannelType.AnnouncementThread | ChannelType.PublicThread | ChannelType.PrivateThread | undefined;
type?: ThreadChannelType | undefined;
/**
* Whether non-moderators can add other non-moderators to the thread; only available when creating a private thread
*/
@@ -732,7 +766,7 @@ export interface RESTGetAPIChannelThreadMembersQuery {
*/
export type RESTGetAPIChannelThreadMembersResult = APIThreadMember[];
/*
/**
* https://discord.com/developers/docs/resources/channel#list-public-archived-threads
*/
export interface RESTGetAPIChannelThreadsArchivedQuery {

View File

@@ -24,8 +24,11 @@ import type {
GuildWidgetStyle,
APIDMChannel,
APIGroupDMChannel,
APIGuildOnboardingPrompt,
APIGuildOnboardingPromptOption,
} from '../../payloads/v9/index';
import type {
AddUndefinedToPossiblyUndefinedPropertiesOfInterface,
DistributiveOmit,
DistributivePick,
Nullable,
@@ -449,7 +452,7 @@ export interface RESTPutAPIGuildMemberJSONBody {
deaf?: boolean | undefined;
}
export type RESTPutAPIGuildMemberResult = APIGuildMember | never;
export type RESTPutAPIGuildMemberResult = APIGuildMember | undefined;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-member
@@ -936,10 +939,42 @@ export type RESTGetAPIGuildOnboardingResult = APIGuildOnboarding;
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
*/
export type RESTPutAPIGuildOnboardingJSONBody = Pick<
APIGuildOnboarding,
'default_channel_ids' | 'enabled' | 'mode' | 'prompts'
>;
export type RESTPutAPIGuildOnboardingJSONBody = AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Pick<APIGuildOnboarding, 'default_channel_ids' | 'enabled' | 'mode'>>
> & {
/**
* Prompts shown during onboarding and in customize community
*/
prompts?: RESTAPIModifyGuildOnboardingPromptData[] | undefined;
};
export type RESTAPIModifyGuildOnboardingPromptData = Pick<APIGuildOnboardingPrompt, 'id' | 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPrompt, 'id' | 'title' | 'options' | 'guild_id'>>
> & {
/**
* Options available within the prompt
*/
options: RESTAPIModifyGuildOnboardingPromptOptionData[];
};
export type RESTAPIModifyGuildOnboardingPromptOptionData = Pick<APIGuildOnboardingPromptOption, 'title'> &
AddUndefinedToPossiblyUndefinedPropertiesOfInterface<
Partial<Omit<APIGuildOnboardingPromptOption, 'title' | 'emoji' | 'guild_id'>>
> & {
/**
* Emoji id
*/
emoji_id?: Snowflake | null | undefined;
/**
* Emoji name
*/
emoji_name?: string | null | undefined;
/**
* Whether this emoji is animated
*/
emoji_animated?: boolean | null | undefined;
};
/**
* https://discord.com/developers/docs/resources/guild#modify-guild-onboarding

View File

@@ -18,6 +18,7 @@ export * from './template';
export * from './user';
export * from './voice';
export * from './webhook';
export * from './monetization';
export const APIVersion = '9';
@@ -839,6 +840,16 @@ export const Routes = {
* Route for:
* - GET `/sticker-packs`
*/
stickerPacks() {
return '/sticker-packs' as const;
},
/**
* Route for:
* - GET `/sticker-packs`
*
* @deprecated Use {@link Routes.stickerPacks} instead.
*/
nitroStickerPacks() {
return '/sticker-packs' as const;
},
@@ -901,14 +912,45 @@ export const Routes = {
/**
* Route for:
* - GET `/applications/@me`
* - PATCH `/applications/@me`
*/
currentApplication() {
return '/applications/@me' as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/entitlements`
* - POST `/applications/{application.id}/entitlements`
*/
entitlements(applicationId: Snowflake) {
return `/applications/${applicationId}/entitlements` as const;
},
/**
* Route for:
* - DELETE `/applications/{application.id}/entitlements/{entitlement.id}`
*/
entitlement(applicationId: Snowflake, entitlementId: Snowflake) {
return `/applications/${applicationId}/entitlements/${entitlementId}` as const;
},
/**
* Route for:
* - GET `/applications/{application.id}/skus`
*/
skus(applicationId: Snowflake) {
return `/applications/${applicationId}/skus` as const;
},
};
export const StickerPackApplicationId = '710982414301790216';
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export const CDNRoutes = {
/**
* Route for:
@@ -918,7 +960,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
emoji(emojiId: Snowflake, format: EmojiFormat) {
emoji<Format extends EmojiFormat>(emojiId: Snowflake, format: Format) {
return `/emojis/${emojiId}.${format}` as const;
},
@@ -930,7 +972,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildIcon(guildId: Snowflake, guildIcon: string, format: GuildIconFormat) {
guildIcon<Format extends GuildIconFormat>(guildId: Snowflake, guildIcon: string, format: Format) {
return `icons/${guildId}/${guildIcon}.${format}` as const;
},
@@ -940,7 +982,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildSplash(guildId: Snowflake, guildSplash: string, format: GuildSplashFormat) {
guildSplash<Format extends GuildSplashFormat>(guildId: Snowflake, guildSplash: string, format: Format) {
return `/splashes/${guildId}/${guildSplash}.${format}` as const;
},
@@ -950,7 +992,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildDiscoverySplash(guildId: Snowflake, guildDiscoverySplash: string, format: GuildDiscoverySplashFormat) {
guildDiscoverySplash<Format extends GuildDiscoverySplashFormat>(
guildId: Snowflake,
guildDiscoverySplash: string,
format: Format,
) {
return `/discovery-splashes/${guildId}/${guildDiscoverySplash}.${format}` as const;
},
@@ -962,7 +1008,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildBanner(guildId: Snowflake, guildBanner: string, format: GuildBannerFormat) {
guildBanner<Format extends GuildBannerFormat>(guildId: Snowflake, guildBanner: string, format: Format) {
return `/banners/${guildId}/${guildBanner}.${format}` as const;
},
@@ -974,7 +1020,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userBanner(userId: Snowflake, userBanner: string, format: UserBannerFormat) {
userBanner<Format extends UserBannerFormat>(userId: Snowflake, userBanner: string, format: Format) {
return `/banners/${userId}/${userBanner}.${format}` as const;
},
@@ -988,7 +1034,7 @@ export const CDNRoutes = {
*
* This route supports the extension: PNG
*/
defaultUserAvatar(index: DefaultUserAvatarAssets) {
defaultUserAvatar<Index extends DefaultUserAvatarAssets>(index: Index) {
return `/embed/avatars/${index}.png` as const;
},
@@ -1000,7 +1046,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
userAvatar(userId: Snowflake, userAvatar: string, format: UserAvatarFormat) {
userAvatar<Format extends UserAvatarFormat>(userId: Snowflake, userAvatar: string, format: Format) {
return `/avatars/${userId}/${userAvatar}.${format}` as const;
},
@@ -1012,7 +1058,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberAvatar(guildId: Snowflake, userId: Snowflake, memberAvatar: string, format: GuildMemberAvatarFormat) {
guildMemberAvatar<Format extends GuildMemberAvatarFormat>(
guildId: Snowflake,
userId: Snowflake,
memberAvatar: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/avatars/${memberAvatar}.${format}` as const;
},
@@ -1032,7 +1083,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationIcon(applicationId: Snowflake, applicationIcon: string, format: ApplicationIconFormat) {
applicationIcon<Format extends ApplicationIconFormat>(
applicationId: Snowflake,
applicationIcon: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationIcon}.${format}` as const;
},
@@ -1042,7 +1097,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationCover(applicationId: Snowflake, applicationCoverImage: string, format: ApplicationCoverFormat) {
applicationCover<Format extends ApplicationCoverFormat>(
applicationId: Snowflake,
applicationCoverImage: string,
format: Format,
) {
return `/app-icons/${applicationId}/${applicationCoverImage}.${format}` as const;
},
@@ -1052,7 +1111,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
applicationAsset(applicationId: Snowflake, applicationAssetId: string, format: ApplicationAssetFormat) {
applicationAsset<Format extends ApplicationAssetFormat>(
applicationId: Snowflake,
applicationAssetId: string,
format: Format,
) {
return `/app-assets/${applicationId}/${applicationAssetId}.${format}` as const;
},
@@ -1062,11 +1125,11 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
achievementIcon(
achievementIcon<Format extends AchievementIconFormat>(
applicationId: Snowflake,
achievementId: Snowflake,
achievementIconHash: string,
format: AchievementIconFormat,
format: Format,
) {
return `/app-assets/${applicationId}/achievements/${achievementId}/icons/${achievementIconHash}.${format}` as const;
},
@@ -1077,7 +1140,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
stickerPackBanner(stickerPackBannerAssetId: Snowflake, format: StickerPackBannerFormat) {
stickerPackBanner<Format extends StickerPackBannerFormat>(stickerPackBannerAssetId: Snowflake, format: Format) {
return `/app-assets/${StickerPackApplicationId}/store/${stickerPackBannerAssetId}.${format}` as const;
},
@@ -1087,8 +1150,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
storePageAsset(applicationId: Snowflake, assetId: string) {
return `/app-assets/${applicationId}/store/${assetId}.png` as const;
storePageAsset<Format extends StorePageAssetFormat = ImageFormat.PNG>(
applicationId: Snowflake,
assetId: string,
format: Format = ImageFormat.PNG as Format,
) {
return `/app-assets/${applicationId}/store/${assetId}.${format}` as const;
},
/**
@@ -1097,7 +1164,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
teamIcon(teamId: Snowflake, teamIcon: string, format: TeamIconFormat) {
teamIcon<Format extends TeamIconFormat>(teamId: Snowflake, teamIcon: string, format: Format) {
return `/team-icons/${teamId}/${teamIcon}.${format}` as const;
},
@@ -1107,7 +1174,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, Lottie, GIF
*/
sticker(stickerId: Snowflake, format: StickerFormat) {
sticker<Format extends StickerFormat>(stickerId: Snowflake, format: Format) {
return `/stickers/${stickerId}.${format}` as const;
},
@@ -1117,7 +1184,7 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
roleIcon(roleId: Snowflake, roleIcon: string, format: RoleIconFormat) {
roleIcon<Format extends RoleIconFormat>(roleId: Snowflake, roleIcon: string, format: Format) {
return `/role-icons/${roleId}/${roleIcon}.${format}` as const;
},
@@ -1127,10 +1194,10 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP
*/
guildScheduledEventCover(
guildScheduledEventCover<Format extends GuildScheduledEventCoverFormat>(
guildScheduledEventId: Snowflake,
guildScheduledEventCoverImage: string,
format: GuildScheduledEventCoverFormat,
format: Format,
) {
return `/guild-events/${guildScheduledEventId}/${guildScheduledEventCoverImage}.${format}` as const;
},
@@ -1141,7 +1208,12 @@ export const CDNRoutes = {
*
* This route supports the extensions: PNG, JPEG, WebP, GIF
*/
guildMemberBanner(guildId: Snowflake, userId: Snowflake, guildMemberBanner: string, format: GuildMemberBannerFormat) {
guildMemberBanner<Format extends GuildMemberBannerFormat>(
guildId: Snowflake,
userId: Snowflake,
guildMemberBanner: string,
format: Format,
) {
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
},
};
@@ -1162,20 +1234,13 @@ export type ApplicationCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | I
export type ApplicationAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type AchievementIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerPackBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StorePageAssetFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type TeamIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type StickerFormat = Extract<ImageFormat, ImageFormat.PNG | ImageFormat.Lottie | ImageFormat.GIF>;
export type RoleIconFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildScheduledEventCoverFormat = Exclude<ImageFormat, ImageFormat.Lottie | ImageFormat.GIF>;
export type GuildMemberBannerFormat = Exclude<ImageFormat, ImageFormat.Lottie>;
export enum ImageFormat {
JPEG = 'jpeg',
PNG = 'png',
WebP = 'webp',
GIF = 'gif',
Lottie = 'json',
}
export interface CDNQuery {
/**
* The returned image can have the size changed by using this query parameter

85
rest/v9/monetization.ts Normal file
View File

@@ -0,0 +1,85 @@
import type { Snowflake } from '../../globals';
import type { APIEntitlement, APISKU } from '../../v10';
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export interface RESTGetAPIEntitlementsQuery {
/**
* User ID to look up entitlements for
*/
user_id?: Snowflake | undefined;
/**
* Optional list of SKU IDs to check entitlements for
* Comma-delimited set of snowflakes
*/
sku_ids?: string | undefined;
/**
* Retrieve entitlements before this entitlement ID
*/
before?: Snowflake | undefined;
/**
* Retrieve entitlements after this entitlement ID
*/
after?: Snowflake | undefined;
/**
* Number of entitlements to return (1-100)
*
* @default 100
*/
limit?: number | undefined;
/**
* Guild ID to look up entitlements for
*/
guild_id?: Snowflake | undefined;
/**
* Whether ended entitlements should be omitted
*/
exclude_ended?: boolean | undefined;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#list-entitlements
*/
export type RESTGetAPIEntitlementsResult = APIEntitlement[];
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export interface RESTPostAPIEntitlementBody {
/**
* ID of the SKU to grant the entitlement to
*/
sku_id: Snowflake;
/**
* ID of the guild or user to grant the entitlement to
*/
owner_id: Snowflake;
/**
* The type of entitlement owner
*/
owner_type: EntitlementOwnerType;
}
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export type RESTPostAPIEntitlementResult = Partial<Omit<APIEntitlement, 'starts_at' | 'ends_at'>>;
/**
* https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement
*/
export enum EntitlementOwnerType {
Guild = 1,
User,
}
/**
* https://discord.com/developers/docs/monetization/entitlements#delete-test-entitlement
*/
export type RESTDeleteAPIEntitlementResult = never;
/**
* https://discord.com/developers/docs/monetization/skus#list-skus
*/
export type RESTGetAPISKUsResult = APISKU[];

View File

@@ -23,6 +23,10 @@ export interface RESTPostAPIStageInstanceJSONBody {
* Notify @everyone that a stage instance has started
*/
send_start_notification?: boolean | undefined;
/**
* The guild scheduled event associated with this stage instance
*/
guild_scheduled_event_id?: Snowflake | undefined;
}
/**

View File

@@ -6,12 +6,19 @@ import type { APISticker, APIStickerPack } from '../../payloads/v9/index';
export type RESTGetAPIStickerResult = APISticker;
/**
* https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*/
export interface RESTGetNitroStickerPacksResult {
export interface RESTGetStickerPacksResult {
sticker_packs: APIStickerPack[];
}
/**
* https://discord.com/developers/docs/resources/sticker#list-sticker-packs
*
* @deprecated Use `RESTGetStickerPacksResult` instead
*/
export type RESTGetNitroStickerPacksResult = RESTGetStickerPacksResult;
/**
* https://discord.com/developers/docs/resources/sticker#list-guild-stickers
*/

View File

@@ -5,11 +5,11 @@ import type {
APIEmbed,
APIMessage,
APIWebhook,
APIAttachment,
MessageFlags,
APIMessageActionRowComponent,
} from '../../payloads/v9/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, Nullable } from '../../utils/internals';
import type { RESTAPIAttachment } from './channel';
/**
* https://discord.com/developers/docs/resources/webhook#create-webhook
*/
@@ -139,7 +139,7 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
/**
* Attachment objects with filename and description
*/
attachments?: (Pick<APIAttachment, 'id' | 'description'> & Partial<Pick<APIAttachment, 'filename'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
/**
* Message flags combined as a bitfield
*/
@@ -150,6 +150,10 @@ export interface RESTPostAPIWebhookWithTokenJSONBody {
* Available only if the webhook is in a forum channel and a thread is not specified in {@link RESTPostAPIWebhookWithTokenQuery.thread_id} query parameter
*/
thread_name?: string | undefined;
/**
* Array of tag ids to apply to the thread
*/
applied_tags?: Snowflake[] | undefined;
}
/**
@@ -257,7 +261,7 @@ export type RESTPatchAPIWebhookWithTokenMessageJSONBody = AddUndefinedToPossibly
*
* See https://discord.com/developers/docs/resources/channel#attachment-object
*/
attachments?: (Pick<APIAttachment, 'id'> & Partial<Pick<APIAttachment, 'filename' | 'description'>>)[] | undefined;
attachments?: RESTAPIAttachment[] | undefined;
};
/**

View File

@@ -0,0 +1,30 @@
import { expectAssignable } from 'tsd';
import type { APIGuildOnboarding, RESTPutAPIGuildOnboardingJSONBody } from '../../v10';
declare const onboarding: APIGuildOnboarding;
expectAssignable<RESTPutAPIGuildOnboardingJSONBody>({});
expectAssignable<RESTPutAPIGuildOnboardingJSONBody>(onboarding);
expectAssignable<RESTPutAPIGuildOnboardingJSONBody>({
default_channel_ids: ['123456789012345678'],
prompts: [
{
id: '123456789012345678',
title: 'This is a title',
options: [
{
title: 'yeet',
emoji_name: '😎',
role_ids: undefined,
},
{
id: '123456789012345678',
title: 'yeet with id',
emoji_id: '123456789012345678',
},
],
in_onboarding: undefined,
},
],
enabled: undefined,
});

View File

@@ -81,7 +81,8 @@ const config = {
},
slug: 'discord-api-types'
}
]
],
gitRefName: 'main',
})
]
],

View File

@@ -301,16 +301,81 @@
"dev": true
},
"node_modules/@babel/code-frame": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
"integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
"dependencies": {
"@babel/highlight": "^7.16.7"
"@babel/highlight": "^7.22.13",
"chalk": "^2.4.2"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/code-frame/node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dependencies": {
"color-convert": "^1.9.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/@babel/code-frame/node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
},
"node_modules/@babel/code-frame/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@babel/code-frame/node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/compat-data": {
"version": "7.17.10",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz",
@@ -357,12 +422,13 @@
}
},
"node_modules/@babel/generator": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz",
"integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
"integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
"dependencies": {
"@babel/types": "^7.18.2",
"@jridgewell/gen-mapping": "^0.3.0",
"@babel/types": "^7.23.0",
"@jridgewell/gen-mapping": "^0.3.2",
"@jridgewell/trace-mapping": "^0.3.17",
"jsesc": "^2.5.1"
},
"engines": {
@@ -370,11 +436,11 @@
}
},
"node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz",
"integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==",
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
"dependencies": {
"@jridgewell/set-array": "^1.0.0",
"@jridgewell/set-array": "^1.0.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
"@jridgewell/trace-mapping": "^0.3.9"
},
@@ -492,9 +558,9 @@
}
},
"node_modules/@babel/helper-environment-visitor": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz",
"integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
"engines": {
"node": ">=6.9.0"
}
@@ -511,23 +577,23 @@
}
},
"node_modules/@babel/helper-function-name": {
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz",
"integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
"dependencies": {
"@babel/template": "^7.16.7",
"@babel/types": "^7.17.0"
"@babel/template": "^7.22.15",
"@babel/types": "^7.23.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-hoist-variables": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz",
"integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==",
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
"dependencies": {
"@babel/types": "^7.16.7"
"@babel/types": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
@@ -643,20 +709,28 @@
}
},
"node_modules/@babel/helper-split-export-declaration": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz",
"integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==",
"version": "7.22.6",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
"dependencies": {
"@babel/types": "^7.16.7"
"@babel/types": "^7.22.5"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.19.1",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"engines": {
"node": ">=6.9.0"
}
@@ -697,12 +771,12 @@
}
},
"node_modules/@babel/highlight": {
"version": "7.17.12",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz",
"integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"dependencies": {
"@babel/helper-validator-identifier": "^7.16.7",
"chalk": "^2.0.0",
"@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
"engines": {
@@ -774,9 +848,9 @@
}
},
"node_modules/@babel/parser": {
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz",
"integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -2016,31 +2090,31 @@
}
},
"node_modules/@babel/template": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
"integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==",
"version": "7.22.15",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"dependencies": {
"@babel/code-frame": "^7.16.7",
"@babel/parser": "^7.16.7",
"@babel/types": "^7.16.7"
"@babel/code-frame": "^7.22.13",
"@babel/parser": "^7.22.15",
"@babel/types": "^7.22.15"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/traverse": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz",
"integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==",
"version": "7.23.2",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
"integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
"dependencies": {
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.18.2",
"@babel/helper-environment-visitor": "^7.18.2",
"@babel/helper-function-name": "^7.17.9",
"@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.18.0",
"@babel/types": "^7.18.2",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.0",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
"@babel/helper-hoist-variables": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
"@babel/parser": "^7.23.0",
"@babel/types": "^7.23.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
},
@@ -2049,11 +2123,12 @@
}
},
"node_modules/@babel/types": {
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz",
"integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
"dependencies": {
"@babel/helper-validator-identifier": "^7.16.7",
"@babel/helper-string-parser": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
},
"engines": {
@@ -4638,9 +4713,9 @@
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz",
"integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==",
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
"engines": {
"node": ">=6.0.0"
}
@@ -4681,12 +4756,12 @@
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz",
"integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
"dependencies": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@leichtgewicht/ip-codec": {
@@ -11041,9 +11116,9 @@
}
},
"node_modules/follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
"integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
"funding": [
{
"type": "individual",
@@ -14437,9 +14512,15 @@
"dev": true
},
"node_modules/nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"bin": {
"nanoid": "bin/nanoid.cjs"
},
@@ -15453,9 +15534,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
"integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"funding": [
{
"type": "opencollective",
@@ -15464,10 +15545,14 @@
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"dependencies": {
"nanoid": "^3.3.4",
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
@@ -21322,11 +21407,63 @@
"dev": true
},
"@babel/code-frame": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
"integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
"requires": {
"@babel/highlight": "^7.16.7"
"@babel/highlight": "^7.22.13",
"chalk": "^2.4.2"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
},
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"@babel/compat-data": {
@@ -21364,21 +21501,22 @@
}
},
"@babel/generator": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz",
"integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",
"integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",
"requires": {
"@babel/types": "^7.18.2",
"@jridgewell/gen-mapping": "^0.3.0",
"@babel/types": "^7.23.0",
"@jridgewell/gen-mapping": "^0.3.2",
"@jridgewell/trace-mapping": "^0.3.17",
"jsesc": "^2.5.1"
},
"dependencies": {
"@jridgewell/gen-mapping": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz",
"integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==",
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
"integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
"requires": {
"@jridgewell/set-array": "^1.0.0",
"@jridgewell/set-array": "^1.0.1",
"@jridgewell/sourcemap-codec": "^1.4.10",
"@jridgewell/trace-mapping": "^0.3.9"
}
@@ -21466,9 +21604,9 @@
}
},
"@babel/helper-environment-visitor": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz",
"integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ=="
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
"integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA=="
},
"@babel/helper-explode-assignable-expression": {
"version": "7.16.7",
@@ -21479,20 +21617,20 @@
}
},
"@babel/helper-function-name": {
"version": "7.17.9",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz",
"integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
"integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
"requires": {
"@babel/template": "^7.16.7",
"@babel/types": "^7.17.0"
"@babel/template": "^7.22.15",
"@babel/types": "^7.23.0"
}
},
"@babel/helper-hoist-variables": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz",
"integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==",
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
"integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
"requires": {
"@babel/types": "^7.16.7"
"@babel/types": "^7.22.5"
}
},
"@babel/helper-member-expression-to-functions": {
@@ -21578,17 +21716,22 @@
}
},
"@babel/helper-split-export-declaration": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz",
"integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==",
"version": "7.22.6",
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
"integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
"requires": {
"@babel/types": "^7.16.7"
"@babel/types": "^7.22.5"
}
},
"@babel/helper-string-parser": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw=="
},
"@babel/helper-validator-identifier": {
"version": "7.19.1",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz",
"integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w=="
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A=="
},
"@babel/helper-validator-option": {
"version": "7.16.7",
@@ -21617,12 +21760,12 @@
}
},
"@babel/highlight": {
"version": "7.17.12",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz",
"integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==",
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"requires": {
"@babel/helper-validator-identifier": "^7.16.7",
"chalk": "^2.0.0",
"@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
"dependencies": {
@@ -21678,9 +21821,9 @@
}
},
"@babel/parser": {
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz",
"integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow=="
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw=="
},
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
"version": "7.17.12",
@@ -22480,38 +22623,39 @@
}
},
"@babel/template": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
"integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==",
"version": "7.22.15",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"requires": {
"@babel/code-frame": "^7.16.7",
"@babel/parser": "^7.16.7",
"@babel/types": "^7.16.7"
"@babel/code-frame": "^7.22.13",
"@babel/parser": "^7.22.15",
"@babel/types": "^7.22.15"
}
},
"@babel/traverse": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz",
"integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==",
"version": "7.23.2",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",
"integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",
"requires": {
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.18.2",
"@babel/helper-environment-visitor": "^7.18.2",
"@babel/helper-function-name": "^7.17.9",
"@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.18.0",
"@babel/types": "^7.18.2",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.0",
"@babel/helper-environment-visitor": "^7.22.20",
"@babel/helper-function-name": "^7.23.0",
"@babel/helper-hoist-variables": "^7.22.5",
"@babel/helper-split-export-declaration": "^7.22.6",
"@babel/parser": "^7.23.0",
"@babel/types": "^7.23.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
}
},
"@babel/types": {
"version": "7.18.4",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz",
"integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==",
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
"requires": {
"@babel/helper-validator-identifier": "^7.16.7",
"@babel/helper-string-parser": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
}
},
@@ -24483,9 +24627,9 @@
}
},
"@jridgewell/resolve-uri": {
"version": "3.0.7",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz",
"integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA=="
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
"integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA=="
},
"@jridgewell/set-array": {
"version": "1.1.1",
@@ -24519,12 +24663,12 @@
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"@jridgewell/trace-mapping": {
"version": "0.3.13",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz",
"integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
"requires": {
"@jridgewell/resolve-uri": "^3.0.3",
"@jridgewell/sourcemap-codec": "^1.4.10"
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"@leichtgewicht/ip-codec": {
@@ -29187,9 +29331,9 @@
}
},
"follow-redirects": {
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
"integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw=="
},
"for-each": {
"version": "0.3.3",
@@ -31590,9 +31734,9 @@
"dev": true
},
"nanoid": {
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
},
"natural-compare": {
"version": "1.4.0",
@@ -32314,11 +32458,11 @@
"dev": true
},
"postcss": {
"version": "8.4.14",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
"integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
"version": "8.4.31",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
"requires": {
"nanoid": "^3.3.4",
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More