@discordjs/rest 0.4.0 → 0.5.0-dev.1650240529-9ef7ffd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,108 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ # [0.4.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@0.3.0...@discordjs/rest@0.4.0) (2022-04-17)
6
+
7
+ ## Bug Fixes
8
+
9
+ - **gateway:** Use version 10 (#7689) ([8880de0](https://github.com/discordjs/discord.js/commit/8880de0cecdf273fd6df23988e4cb77774a75390))
10
+ - **RequestHandler:** Only reset tokens for authenticated 401s (#7508) ([b9ff7b0](https://github.com/discordjs/discord.js/commit/b9ff7b057379a47ce13265f78e21bf0d55feaf0a))
11
+ - **ci:** Ci error (#7454) ([0af9bc8](https://github.com/discordjs/discord.js/commit/0af9bc841ffe1a297d308500d696bad4b85abda9))
12
+ - Use png as extension for defaultAvatarURL (#7414) ([538e9ce](https://github.com/discordjs/discord.js/commit/538e9cef459d00d74b9bd6852da3ce2acac9bae5))
13
+ - **rest:** Sublimit all requests on unhandled routes (#7366) ([733ac82](https://github.com/discordjs/discord.js/commit/733ac82d5dffabc622fb59e06d06e83396734dc6))
14
+ - Fix some typos (#7393) ([92a04f4](https://github.com/discordjs/discord.js/commit/92a04f4d98f6c6760214034cc8f5a1eaa78893c7))
15
+ - **rest:** Don't add empty query (#7308) ([d0fa5aa](https://github.com/discordjs/discord.js/commit/d0fa5aaa26d316608120bca3050e14eefbe2f93b))
16
+ - **rest:** Use http agent when protocol is not https (#7309) ([d8ea572](https://github.com/discordjs/discord.js/commit/d8ea572fb8a51f2f6a902c4926e814017d115708))
17
+ - `ref` delay for rate limited requests (#7239) ([ed0cfd9](https://github.com/discordjs/discord.js/commit/ed0cfd91edc3a2b23a34a8ecd9db38baa12b52fa))
18
+
19
+ ## Documentation
20
+
21
+ - Enhance /rest README (#7757) ([a1329bd](https://github.com/discordjs/discord.js/commit/a1329bd3ebafc6d5b5e2788ff082674f01b726f3))
22
+ - Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
23
+
24
+ ## Features
25
+
26
+ - Add `makeURLSearchParams` utility function (#7744) ([8eaec11](https://github.com/discordjs/discord.js/commit/8eaec114a98026024c21545988860c123948c55d))
27
+ - Add API v10 support (#7477) ([72577c4](https://github.com/discordjs/discord.js/commit/72577c4bfd02524a27afb6ff4aebba9301a690d3))
28
+ - Add support for module: NodeNext in TS and ESM (#7598) ([8f1986a](https://github.com/discordjs/discord.js/commit/8f1986a6aa98365e09b00e84ad5f9f354ab61f3d))
29
+ - **builders:** Add attachment command option type (#7203) ([ae0f35f](https://github.com/discordjs/discord.js/commit/ae0f35f51d68dfa5a7dc43d161ef9365171debdb))
30
+ - **cdn:** Add support for scheduled event image covers (#7335) ([ac26d9b](https://github.com/discordjs/discord.js/commit/ac26d9b1307d63e116b043505e5f925db7ed01aa))
31
+ - Rest hash and handler sweeping (#7255) ([3bb4829](https://github.com/discordjs/discord.js/commit/3bb48298004d292214c6cb8f927c2fea78a42952))
32
+ - Rest docs (#7281) ([9054f2f](https://github.com/discordjs/discord.js/commit/9054f2f7ad7f246431e5f53403535bf301c27a80))
33
+
34
+ ## Refactor
35
+
36
+ - **requestmanager:** Use timestampfrom (#7459) ([3298510](https://github.com/discordjs/discord.js/commit/32985109c3b7614d364007608f8c5af4bed753ae))
37
+ - **files:** Remove redundant file property names (#7340) ([6725038](https://github.com/discordjs/discord.js/commit/67250382f99872a9edff99ebaa482ffa895b0c37))
38
+ - **files:** File data can be much more than buffer (#7238) ([86ab526](https://github.com/discordjs/discord.js/commit/86ab526d493415b14b79b51d08c3677897d219ee))
39
+ - **rest:** Rename attachment to file (#7199) ([c969cbf](https://github.com/discordjs/discord.js/commit/c969cbf6524093757d47108b6a55e62dcb210e8b))
40
+
41
+ ## Testing
42
+
43
+ - **voice:** Fix tests ([62c74b8](https://github.com/discordjs/discord.js/commit/62c74b8333066465e5bd295b8b102b35a506751d))
44
+
45
+ # [0.3.0](https://github.com/discordjs/discord.js/compare/@discordjs/rest@0.2.0...@discordjs/rest@0.3.0) (2021-12-08)
46
+
47
+ ## Bug Fixes
48
+
49
+ - **rest:** Don't add empty query (#7308) ([d0fa5aa](https://github.com/discordjs/discord.js/commit/d0fa5aaa26d316608120bca3050e14eefbe2f93b))
50
+ - **rest:** Use http agent when protocol is not https (#7309) ([d8ea572](https://github.com/discordjs/discord.js/commit/d8ea572fb8a51f2f6a902c4926e814017d115708))
51
+ - `ref` delay for rate limited requests (#7239) ([ed0cfd9](https://github.com/discordjs/discord.js/commit/ed0cfd91edc3a2b23a34a8ecd9db38baa12b52fa))
52
+
53
+ ## Documentation
54
+
55
+ - Fix a typo and use milliseconds instead of ms (#7251) ([0dd56af](https://github.com/discordjs/discord.js/commit/0dd56afe1cdf16f1e7d9afe1f8c29c31d1833a25))
56
+
57
+ ## Features
58
+
59
+ - Rest hash and handler sweeping (#7255) ([3bb4829](https://github.com/discordjs/discord.js/commit/3bb48298004d292214c6cb8f927c2fea78a42952))
60
+ - Rest docs (#7281) ([9054f2f](https://github.com/discordjs/discord.js/commit/9054f2f7ad7f246431e5f53403535bf301c27a80))
61
+
62
+ ## Refactor
63
+
64
+ - **files:** File data can be much more than buffer (#7238) ([86ab526](https://github.com/discordjs/discord.js/commit/86ab526d493415b14b79b51d08c3677897d219ee))
65
+ - **rest:** Rename attachment to file (#7199) ([c969cbf](https://github.com/discordjs/discord.js/commit/c969cbf6524093757d47108b6a55e62dcb210e8b))
66
+
67
+ ## Testing
68
+
69
+ - **voice:** Fix tests ([62c74b8](https://github.com/discordjs/discord.js/commit/62c74b8333066465e5bd295b8b102b35a506751d))
70
+
71
+ # [0.2.0-canary.0](https://github.com/discordjs/discord.js-modules/compare/@discordjs/rest@0.1.1-canary.0...@discordjs/rest@0.2.0-canary.0) (2021-12-08)
72
+
73
+ ## Bug Fixes
74
+
75
+ - **CDN#icon:** remove `guild` prefixes ([#67](https://github.com/discordjs/discord.js-modules/issues/67)) ([8882686](https://github.com/discordjs/discord.js-modules/commit/88826869d8ed3695f2b9475bea8d3b851df270bd))
76
+ - **Cdn:** make parameters immutable ([#84](https://github.com/discordjs/discord.js-modules/issues/84)) ([3105b61](https://github.com/discordjs/discord.js-modules/commit/3105b614da603dd3c8479dea089b5953d3c8b89b))
77
+ - **CDN:** use correct types ([#86](https://github.com/discordjs/discord.js-modules/issues/86)) ([64b02d4](https://github.com/discordjs/discord.js-modules/commit/64b02d4649a38802dd1a4e7a738ec64c27dea760))
78
+ - **Rest:** lint errors ([53c0cce](https://github.com/discordjs/discord.js-modules/commit/53c0ccefee80225ca7640cf88f44c68da99f31e7))
79
+ - use hash instead of animatedHash for default avatar test ([#74](https://github.com/discordjs/discord.js-modules/issues/74)) ([4852838](https://github.com/discordjs/discord.js-modules/commit/485283824cf368874096d59a64131970401218e9))
80
+
81
+ ## Features
82
+
83
+ - **CDN#guildIcon:** implement dynamic logic ([#53](https://github.com/discordjs/discord.js-modules/issues/53)) ([c4b2803](https://github.com/discordjs/discord.js-modules/commit/c4b280366b0c5920c147126ccb9068f16fc898aa))
84
+ - **CDN:** add role icon endpoint ([#64](https://github.com/discordjs/discord.js-modules/issues/64)) ([4d7d692](https://github.com/discordjs/discord.js-modules/commit/4d7d692b4954c373941d2d8f3e3335a9a8543220))
85
+ - **CDN:** add sticker endpoints ([#60](https://github.com/discordjs/discord.js-modules/issues/60)) ([3b714ba](https://github.com/discordjs/discord.js-modules/commit/3b714bada415a7987dd6aa50c938751c66dc05be))
86
+ - **CDN:** guild member avatars ([#68](https://github.com/discordjs/discord.js-modules/issues/68)) ([90c25ad](https://github.com/discordjs/discord.js-modules/commit/90c25ad4afa5ec5906867f431afcaf11fb56355a))
87
+ - **Errors:** show data sent when an error occurs ([#72](https://github.com/discordjs/discord.js-modules/issues/72)) ([3e2edc8](https://github.com/discordjs/discord.js-modules/commit/3e2edc8974e2c62c324db0c151da4d34c289c40a))
88
+ - expose https agent options ([#82](https://github.com/discordjs/discord.js-modules/issues/82)) ([7f1c9be](https://github.com/discordjs/discord.js-modules/commit/7f1c9be817bbc6a4a11a726c952580dd3cb7b149))
89
+ - **RateLimits:** optionally error on ratelimits ([#77](https://github.com/discordjs/discord.js-modules/issues/77)) ([a371f0b](https://github.com/discordjs/discord.js-modules/commit/a371f0bc6c76cffaf048fd0fbf9c64a6c4d6619e))
90
+ - **RequestManager:** support setting global headers in options ([#70](https://github.com/discordjs/discord.js-modules/issues/70)) ([d1758c7](https://github.com/discordjs/discord.js-modules/commit/d1758c74b00a3f83c39745cd9af147a7f8f2b12b))
91
+ - **Requests:** add attachment keys and form data for stickers ([#81](https://github.com/discordjs/discord.js-modules/issues/81)) ([7c2b0c0](https://github.com/discordjs/discord.js-modules/commit/7c2b0c0e432b82776bb57c1708f3be6b4affde56))
92
+ - **Rest:** add response and request events ([#85](https://github.com/discordjs/discord.js-modules/issues/85)) ([c3aba56](https://github.com/discordjs/discord.js-modules/commit/c3aba567572e73548c38cd7c7f9945e9361833de))
93
+ - **REST:** change api version to v9 ([#62](https://github.com/discordjs/discord.js-modules/issues/62)) ([4c980e6](https://github.com/discordjs/discord.js-modules/commit/4c980e6ad6c0297519ec0f09ec27953764a4a12d))
94
+ - **Rest:** improve global rate limit and invalid request tracking ([#51](https://github.com/discordjs/discord.js-modules/issues/51)) ([b73cc06](https://github.com/discordjs/discord.js-modules/commit/b73cc060daa701de71815a824ebaccdc9ebf2859))
95
+ - **Rest:** use native Node.js AbortController ([#66](https://github.com/discordjs/discord.js-modules/issues/66)) ([3b53910](https://github.com/discordjs/discord.js-modules/commit/3b539102f07c413ffd3ee60718ac8e5a709bdd0e))
96
+ - **SequentialHandler:** add more info to debug when rate limit was hit ([#78](https://github.com/discordjs/discord.js-modules/issues/78)) ([a4e404b](https://github.com/discordjs/discord.js-modules/commit/a4e404b2e6df625a48176b9f1bfac6cfe86c5d66))
97
+
98
+ # [0.1.1-canary.0](https://github.com/discordjs/discord.js-modules/compare/@discordjs/rest@0.1.0-canary.0...@discordjs/rest@0.1.1-canary.0) (2021-08-24)
99
+
100
+ ## Bug Fixes
101
+
102
+ - **Rest:** use reference type for DOM ([#55](https://github.com/discordjs/discord.js-modules/issues/55)) ([07f5aa7](https://github.com/discordjs/discord.js-modules/commit/07f5aa744092c16b0f05b05055e5d4bbd49754e7))
103
+
104
+ # 0.1.0-canary.0 (2021-06-29)
105
+
106
+ ## Features
107
+
108
+ - **rest:** Implement rest module ([#34](https://github.com/discordjs/discord.js-modules/issues/34)) ([6990f0f](https://github.com/discordjs/discord.js-modules/commit/6990f0f7f3ca958a95f9b1b19681b42669743427))
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ var require_package = __commonJS({
52
52
  "package.json"(exports, module2) {
53
53
  module2.exports = {
54
54
  name: "@discordjs/rest",
55
- version: "0.4.0",
55
+ version: "0.5.0-dev",
56
56
  description: "The REST API for discord.js",
57
57
  scripts: {
58
58
  build: "tsup && tsc --emitDeclarationOnly --incremental",
package/dist/index.mjs CHANGED
@@ -33,7 +33,7 @@ var require_package = __commonJS({
33
33
  "package.json"(exports, module) {
34
34
  module.exports = {
35
35
  name: "@discordjs/rest",
36
- version: "0.4.0",
36
+ version: "0.5.0-dev",
37
37
  description: "The REST API for discord.js",
38
38
  scripts: {
39
39
  build: "tsup && tsc --emitDeclarationOnly --incremental",
package/dist/lib/CDN.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,90 +1,91 @@
1
1
  {
2
- "name": "@discordjs/rest",
3
- "version": "0.4.0",
4
- "description": "The REST API for discord.js",
5
- "scripts": {
6
- "build": "tsup && tsc --emitDeclarationOnly --incremental",
7
- "test": "jest --pass-with-no-tests --collect-coverage",
8
- "lint": "prettier --check . && eslint src __tests__ --ext mjs,js,ts",
9
- "format": "prettier --write . && eslint src __tests__ --ext mjs,js,ts --fix",
10
- "docs": "typedoc --json docs/typedoc-out.json src/index.ts && node scripts/docs.mjs",
11
- "prepublishOnly": "yarn build && yarn lint && yarn test",
12
- "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/rest/*'"
13
- },
14
- "main": "./dist/index.js",
15
- "module": "./dist/index.mjs",
16
- "typings": "./dist/index.d.ts",
17
- "exports": {
18
- "import": "./dist/index.mjs",
19
- "require": "./dist/index.js",
20
- "types": "./dist/index.d.ts"
21
- },
22
- "directories": {
23
- "lib": "src",
24
- "test": "__tests__"
25
- },
26
- "files": [
27
- "dist"
28
- ],
29
- "contributors": [
30
- "Crawl <icrawltogo@gmail.com>",
31
- "Amish Shah <amishshah.2k@gmail.com>",
32
- "SpaceEEC <spaceeec@yahoo.com>",
33
- "Vlad Frangu <kingdgrizzle@gmail.com>",
34
- "Antonio Roman <kyradiscord@gmail.com>"
35
- ],
36
- "license": "Apache-2.0",
37
- "keywords": [
38
- "discord",
39
- "api",
40
- "rest",
41
- "discordapp",
42
- "discordjs"
43
- ],
44
- "repository": {
45
- "type": "git",
46
- "url": "git+https://github.com/discordjs/discord.js.git"
47
- },
48
- "bugs": {
49
- "url": "https://github.com/discordjs/discord.js/issues"
50
- },
51
- "homepage": "https://discord.js.org",
52
- "dependencies": {
53
- "@discordjs/collection": "workspace:^",
54
- "@sapphire/async-queue": "^1.3.1",
55
- "@sapphire/snowflake": "^3.2.1",
56
- "@types/node-fetch": "^2.6.1",
57
- "discord-api-types": "^0.29.0",
58
- "form-data": "^4.0.0",
59
- "node-fetch": "^2.6.7",
60
- "tslib": "^2.3.1"
61
- },
62
- "devDependencies": {
63
- "@babel/core": "^7.17.9",
64
- "@babel/plugin-proposal-decorators": "^7.17.9",
65
- "@babel/preset-env": "^7.16.11",
66
- "@babel/preset-typescript": "^7.16.7",
67
- "@discordjs/ts-docgen": "^0.4.1",
68
- "@types/jest": "^27.4.1",
69
- "@typescript-eslint/eslint-plugin": "^5.19.0",
70
- "@typescript-eslint/parser": "^5.19.0",
71
- "babel-plugin-const-enum": "^1.2.0",
72
- "babel-plugin-transform-typescript-metadata": "^0.3.2",
73
- "eslint": "^8.13.0",
74
- "eslint-config-marine": "^9.4.1",
75
- "eslint-config-prettier": "^8.5.0",
76
- "eslint-plugin-import": "^2.26.0",
77
- "jest": "^27.5.1",
78
- "nock": "^13.2.4",
79
- "prettier": "^2.6.2",
80
- "tsup": "^5.12.5",
81
- "typedoc": "^0.22.15",
82
- "typescript": "^4.6.3"
83
- },
84
- "engines": {
85
- "node": ">=16.9.0"
86
- },
87
- "publishConfig": {
88
- "access": "public"
89
- }
90
- }
2
+ "name": "@discordjs/rest",
3
+ "version": "0.5.0-dev.1650240529-9ef7ffd",
4
+ "description": "The REST API for discord.js",
5
+ "scripts": {
6
+ "build": "tsup && tsc --emitDeclarationOnly --incremental",
7
+ "test": "jest --pass-with-no-tests --collect-coverage",
8
+ "lint": "prettier --check . && eslint src __tests__ --ext mjs,js,ts",
9
+ "format": "prettier --write . && eslint src __tests__ --ext mjs,js,ts --fix",
10
+ "docs": "typedoc --json docs/typedoc-out.json src/index.ts && node scripts/docs.mjs",
11
+ "prepublishOnly": "yarn build && yarn lint && yarn test",
12
+ "changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/rest/*'"
13
+ },
14
+ "main": "./dist/index.js",
15
+ "module": "./dist/index.mjs",
16
+ "typings": "./dist/index.d.ts",
17
+ "exports": {
18
+ "import": "./dist/index.mjs",
19
+ "require": "./dist/index.js",
20
+ "types": "./dist/index.d.ts"
21
+ },
22
+ "directories": {
23
+ "lib": "src",
24
+ "test": "__tests__"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "contributors": [
30
+ "Crawl <icrawltogo@gmail.com>",
31
+ "Amish Shah <amishshah.2k@gmail.com>",
32
+ "SpaceEEC <spaceeec@yahoo.com>",
33
+ "Vlad Frangu <kingdgrizzle@gmail.com>",
34
+ "Antonio Roman <kyradiscord@gmail.com>"
35
+ ],
36
+ "license": "Apache-2.0",
37
+ "keywords": [
38
+ "discord",
39
+ "api",
40
+ "rest",
41
+ "discordapp",
42
+ "discordjs"
43
+ ],
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "git+https://github.com/discordjs/discord.js.git"
47
+ },
48
+ "bugs": {
49
+ "url": "https://github.com/discordjs/discord.js/issues"
50
+ },
51
+ "homepage": "https://discord.js.org",
52
+ "dependencies": {
53
+ "@discordjs/collection": "^0.7.0-dev",
54
+ "@sapphire/async-queue": "^1.3.1",
55
+ "@sapphire/snowflake": "^3.2.1",
56
+ "@types/node-fetch": "^2.6.1",
57
+ "discord-api-types": "^0.29.0",
58
+ "form-data": "^4.0.0",
59
+ "node-fetch": "^2.6.7",
60
+ "tslib": "^2.3.1"
61
+ },
62
+ "devDependencies": {
63
+ "@babel/core": "^7.17.9",
64
+ "@babel/plugin-proposal-decorators": "^7.17.9",
65
+ "@babel/preset-env": "^7.16.11",
66
+ "@babel/preset-typescript": "^7.16.7",
67
+ "@discordjs/ts-docgen": "^0.4.1",
68
+ "@types/jest": "^27.4.1",
69
+ "@typescript-eslint/eslint-plugin": "^5.19.0",
70
+ "@typescript-eslint/parser": "^5.19.0",
71
+ "babel-plugin-const-enum": "^1.2.0",
72
+ "babel-plugin-transform-typescript-metadata": "^0.3.2",
73
+ "eslint": "^8.13.0",
74
+ "eslint-config-marine": "^9.4.1",
75
+ "eslint-config-prettier": "^8.5.0",
76
+ "eslint-plugin-import": "^2.26.0",
77
+ "jest": "^27.5.1",
78
+ "nock": "^13.2.4",
79
+ "prettier": "^2.6.2",
80
+ "tsup": "^5.12.5",
81
+ "typedoc": "^0.22.15",
82
+ "typescript": "^4.6.3"
83
+ },
84
+ "engines": {
85
+ "node": ">=16.9.0"
86
+ },
87
+ "publishConfig": {
88
+ "access": "public"
89
+ },
90
+ "stableVersion": "0.5.0-dev"
91
+ }