node-easywechat 3.3.4 → 3.3.5

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 CHANGED
@@ -1,6 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
3
 
4
+ ## v3.3.5 (2023-04-28)
5
+
6
+ - Fix: 修复部分接口请求方式及请求参数设置方式异常的问题
7
+
4
8
  ## v3.3.4 (2023-04-23)
5
9
 
6
10
  - Fix: 更新依赖包node-socialite
@@ -136,7 +136,7 @@ class Application {
136
136
  getAuthorization(authorizationCode) {
137
137
  return __awaiter(this, void 0, void 0, function* () {
138
138
  let response = (yield this.getClient().request('post', 'cgi-bin/component/api_query_auth', {
139
- params: {
139
+ json: {
140
140
  component_appid: this.getAccount().getAppId(),
141
141
  authorization_code: authorizationCode,
142
142
  }
@@ -157,7 +157,7 @@ class Application {
157
157
  refreshAuthorizerToken(authorizerAppId, authorizerRefreshToken) {
158
158
  return __awaiter(this, void 0, void 0, function* () {
159
159
  let response = (yield this.getClient().request('post', 'cgi-bin/component/api_authorizer_token', {
160
- params: {
160
+ json: {
161
161
  component_appid: this.getAccount().getAppId(),
162
162
  authorizer_appid: authorizerAppId,
163
163
  authorizer_refresh_token: authorizerRefreshToken,
@@ -177,7 +177,7 @@ class Application {
177
177
  createPreAuthorizationCode() {
178
178
  return __awaiter(this, void 0, void 0, function* () {
179
179
  let response = (yield this.getClient().request('post', 'cgi-bin/component/api_create_preauthcode', {
180
- params: {
180
+ json: {
181
181
  component_appid: this.getAccount().getAppId(),
182
182
  }
183
183
  })).toObject();
@@ -67,7 +67,7 @@ class ComponentAccessToken {
67
67
  refresh() {
68
68
  return __awaiter(this, void 0, void 0, function* () {
69
69
  let response = (yield this.httpClient.request('post', 'cgi-bin/component/api_component_token', {
70
- params: {
70
+ data: {
71
71
  component_appid: this.appId,
72
72
  component_appsecret: this.secret,
73
73
  component_verify_ticket: yield this.verifyTicket.getTicket(),
@@ -210,7 +210,7 @@ class Application {
210
210
  return __awaiter(this, void 0, void 0, function* () {
211
211
  if (!suiteAccessToken)
212
212
  suiteAccessToken = this.getSuiteAccessToken();
213
- let response = (yield this.getClient().request('post', 'cgi-bin/service/get_pre_auth_code', {
213
+ let response = (yield this.getClient().request('get', 'cgi-bin/service/get_pre_auth_code', {
214
214
  params: {
215
215
  suite_access_token: yield suiteAccessToken.getToken(),
216
216
  }
@@ -67,7 +67,7 @@ class SuiteAccessToken {
67
67
  refresh() {
68
68
  return __awaiter(this, void 0, void 0, function* () {
69
69
  let response = (yield this.httpClient.request('post', 'cgi-bin/service/get_suite_token', {
70
- params: {
70
+ json: {
71
71
  suite_id: this.suiteId,
72
72
  suite_secret: this.suiteSecret,
73
73
  suite_ticket: yield this.suiteTicket.getTicket(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-easywechat",
3
- "version": "3.3.4",
3
+ "version": "3.3.5",
4
4
  "description": "EasyWechat SDK for Node.js (NOT OFFICIAL)",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {