egg-wechat-sdk-x 1.0.0 → 1.0.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/README.md +2 -2
- package/index.d.ts +39 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Description here.
|
|
|
29
29
|
## Install
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
$ npm i egg-wechat-api --save
|
|
32
|
+
$ npm i egg-wechat-api-x --save
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
## Usage
|
|
@@ -38,7 +38,7 @@ $ npm i egg-wechat-api --save
|
|
|
38
38
|
// {app_root}/config/plugin.js
|
|
39
39
|
exports.wechatApi = {
|
|
40
40
|
enable: true,
|
|
41
|
-
package: 'egg-wechat-api',
|
|
41
|
+
package: 'egg-wechat-api-x',
|
|
42
42
|
};
|
|
43
43
|
```
|
|
44
44
|
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
// interface DataSources {
|
|
3
|
+
// datasources: EggSequelizeMultitableOptions[];
|
|
4
|
+
// }
|
|
5
|
+
// "name": "测试",
|
|
6
|
+
// "appid": "wxd0944fd71221c19c",
|
|
7
|
+
// "appsecret": "fe2574fdfce33dcaa5534d149b77c4a3",
|
|
8
|
+
// "token": "31427543139566790626",
|
|
9
|
+
import OAuth from "wechat-oauth";
|
|
10
|
+
import WechatApiSdk from "wechat-api";
|
|
11
|
+
import EggWechatApi from "./lib/WechatApi";
|
|
12
|
+
import EggWechatOAuth from "./lib/WechatOauth";
|
|
13
|
+
|
|
14
|
+
// "encodingAESKey": ""
|
|
15
|
+
interface WechatSdkOptions {
|
|
16
|
+
name?: string,
|
|
17
|
+
appId: string,
|
|
18
|
+
appSecret: string,
|
|
19
|
+
token?: string,
|
|
20
|
+
encodingAESKey?: string
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface EggWechatSdkOptions {
|
|
24
|
+
defaultAppId: string,
|
|
25
|
+
[propname: string]: WechatSdkOptions,
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare module 'egg' {
|
|
30
|
+
|
|
31
|
+
interface Application {
|
|
32
|
+
WechatApi: EggWechatApi;
|
|
33
|
+
WechatOauth: EggWechatOAuth;
|
|
34
|
+
}
|
|
35
|
+
// extend your config
|
|
36
|
+
interface EggAppConfig {
|
|
37
|
+
wechatSdk: EggWechatSdkOptions;
|
|
38
|
+
}
|
|
39
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "egg-wechat-sdk-x",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"eggPlugin": {
|
|
6
6
|
"name": "wechatSdk",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"files": [
|
|
40
40
|
"app.js",
|
|
41
41
|
"lib",
|
|
42
|
-
"config"
|
|
42
|
+
"config",
|
|
43
|
+
"index.d.ts"
|
|
43
44
|
],
|
|
44
45
|
"ci": {
|
|
45
46
|
"version": "16, 18"
|
|
@@ -54,4 +55,4 @@
|
|
|
54
55
|
"homepage": "https://github.com/qoyf/egg-wechat-sdk#readme",
|
|
55
56
|
"author": "",
|
|
56
57
|
"license": "MIT"
|
|
57
|
-
}
|
|
58
|
+
}
|