* Move transformers types to a single file
* Add script to test TS Compiler api capabilities
Remove nested objects where possible
* Use Partial<Role> and DiscordOverwrite instead of objects in AuditLogChange
* Fix typescript errors
* Remove interfaces.json
It is a generated file from the test script, not something that should be commited
* Start work on the test generation script
The TS version got bumped to 5.5.3
* Fix any type, use node16 module resolution
"node" is a deprecated alias for "node10", node16 is the recommended
Add code to check for type errors when getting the types from the interfaces
Fix errors when TS tries to find the files that the root tsconfig.json handles
* remove some useless compile options in TSApiTest
* Add jsdoc parsing
JSDoc tags with the next right after are not supported
* fix small format issue
* Fix ApplicationCommandPermissions todo
* Fix CI error
* Simplify parseDocumentation
* get type directly from the sourceFile
* remove hasUndefinedUnion as it is no longer used
* fix discordeno bin file name
* Update the yarn lockfile
* Merge scripts into one
* Use `@internal` instead of `@private` + `@deprecated`
* work on .d.ts files
* Process interface members once
* Move emit/preEmit diagnostics to a unit test
they can take quite a while, even 3-4 seconds, so running in the CLI every time does not seem ideal
* test: add build:types to test:unit dependencies
This is a test commit, it will provably get reversed. The scope is to see what CI does with this
* add find-up to deno import map
* add typescript to the deno import map
* Add node:assert to deno import map
* check for this.timeout that exists
deno does not have the timeout
* add build:type to deno-unit
* Temp hack to work-around the script deno tests
* Test with bun running the test as well
* fix turbo deps for unit tests
* remove test scripts
* Update CI to use build:type cache
* Apply code review suggestion
Co-authored-by: LTS20050703 <lts20050703@gmail.com>
* Add code to modify the interface member
* use an actual config
The config source is still a dummy object for now
* Search and use discordeno.config.js file
* provide config from cli options
* Handle props in base objects
The dependencies of an object need to be declared/updated manually, it would be painful to fix this in such a way that would be something that Typescript can give us from the compiler API
* add some tests for desired proprieties
* also check for a .mjs config file
* Add support for .ts config files
We use the typescript compiler to emit an in-memory version of the config file, import it and then remove it. It does not do bundling so if the config imports local files it will not work. Also the file is not type-checked as it would slow down the config loading
* remove compiler host, use callback on program.emit
* fix deno ci error
* add node:fs/promises to deno import map
---------
Co-authored-by: LTS20050703 <lts20050703@gmail.com>
* Fix biome formatting of package.json files to match the yarn one
* Ignore package.json
This includes a format on the member toggles as that pr got merged while using ESLint formatting and it didn't get updated before merging
* Add flags field to ModifyGuildMember
Also add the GuildMemberFlags enum as that was missing
* Add flags to member object
* Fix type error
* Update member transformer
* Readd flags desired propriety
* Rename enum to MemberFlag for consitency
* Rename to GuildMemberFlags, use number not the enum itself
* Use ToggleBitfield for flags
* Add getters
* Fix build error
* Merge flags in toggles
* change flags getter to return the actual flags
And not our custom toggles values
* Fix reverse transformer
* Migrate eslint and prettier to biomejs
This does NOT include examples/bigbot as it has its own formatter
* Update to biome 1.8.0
* Readd dotenv dev dependency to rest
During a merge it got lost
* Add flags enums
* Remove extra MessageFlags enum from `@discordeno/bot`
This is not a breaking in itself as `@discordeno/types` has this enum
* Fix CI error, remove usage of MessageFlags and SkuFlags
* Revert "remove usage of MessageFlags and SkuFlags"
This reverts part of commit 954b347ebb.
* fix ci error
* Add GetReactions#type & DiscordReactionType
* Add burst and burstColors to reaction add/remove events
The reaction remove event only has burst, not burstColors
* Add type to message reaction add/remove
* Fix type error
---------
Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
* Support integrationTypesConfig in Application
* Add support for commands with integrationTypes and contexts
And deprecate the dmPermission boolean, it is being replaced by contexts
* Update contexts comment to make it more clear
* User-Installed apps
* Add integrationType oauth parameter
fixes#3517
* Add null to contexts
closes#3523
* Mark oauth2 install params as nullable
closes#3525
* Fix typescript errors
* Add preview notices
---------
Co-authored-by: Matt Hatcher <3768988+MatthewSH@users.noreply.github.com>
* misc: Make the token a required property on the rest manager.
* refactor: Make unnecessarily required properties optional.
* misc: Improve interface for `createBot()` and allow passing in `transformers`/`handlers`.
* fix: Test made redundant by changes still being included.
* fix: Missing non-null assertions.
* fix: Benchmarks failing.
* misc: Remove `cache.requestMembers.pending` as an exposed option.
* style: Switch back to interface approach.
* Explicitly check for null or undefined
* fix formatting error
This file isn't even modified by this pr, but ok
* revert checkIfExists, manually review each case
* Update for the RoleFlags and AttachmentFlags
* Fix need for TS bang (!)
* update invite transformer
* update invite transformer
* fix consistency
* add guild safety | closes#3020
* Adds approx guild count | closes#3078
* Team member permissions | closes#3105
According to current documentation DiscordTeamMemberRole#Owner does not have a value anymore, in this commit it still had so it is included to be changed by a later commit
* Default thread ratelimit | closes#3216
* Entitlements and SKUs | closes#3219
The entitlements events needs testing for the typing
* Typing endpoint docs update | closes#3222
* Add guildScheduledEventId to CreateStageInstance | closes#3228
* Add listSkus helper
I did forget it in the commit before
* Update Application Endpoints | closes#3230
* Update documentation | closes#3233
* fix starting a thread in forum | closes#3234 & closes#3036
* Add fired events on get widget endpoint | closes#3235
* Add fired events on get widget endpoint pt2 | closes#3236
* Update SKU and Entitlement fields | closes#3238
* Split permissions for expressions and events | closes#3249
* Make GetEntitlements#excludeEnded more specific | closes#3251
* Fix thread/forum channel docs regression | closes#3252
* Another description change for GetEntitlements#excludeEnded | closes#3253
* Document applied_tags on Execute Webhook | closes#3265
* Fix entitlement event types
* Add types from api-docs-commit related to #2930
* Add rest from api-docs-commit related to #2930
* Add types from api-docs-commit related to #3072
* Add rest from api-docs-commit related to #3072
* Add types from api-docs-commit related to #3247
* Add transformers and helpers
* refactor: ignore handlers if events for an handler isnt provided
* style: use !event instead of event === undefined check
* fix: handleGuildDelete check
* feat: add support for customizers
* Fixing typescript build errors
* add customers for transformGatewayBot
and transformThreadMemberGuildCreate customizers and transformer