egg-wechat-sdk-x 1.0.0 → 1.0.4

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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/index.d.ts +38 -0
  3. 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,38 @@
1
+
2
+ // interface DataSources {
3
+ // datasources: EggSequelizeMultitableOptions[];
4
+ // }
5
+ // "name": "测试",
6
+ // "appid": "wxd0944fd71221c19c",
7
+ // "appsecret": "fe2574fdfce33dcaa5534d149b77c4a3",
8
+ // "token": "31427543139566790626",
9
+
10
+ import EggWechatApi from "./lib/WechatApi";
11
+ import EggWechatOAuth from "./lib/WechatOauth";
12
+
13
+ // "encodingAESKey": ""
14
+ interface WechatSdkOptions {
15
+ name?: string,
16
+ appId: string,
17
+ appSecret: string,
18
+ token?: string,
19
+ encodingAESKey?: string
20
+ }
21
+
22
+ interface EggWechatSdkOptions {
23
+ defaultAppId: string,
24
+ [propname: string]: WechatSdkOptions,
25
+
26
+ }
27
+
28
+ declare module 'egg' {
29
+
30
+ interface Application {
31
+ WechatApi: EggWechatApi;
32
+ WechatOauth: EggWechatOAuth;
33
+ }
34
+ // extend your config
35
+ interface EggAppConfig {
36
+ wechatSdk: EggWechatSdkOptions;
37
+ }
38
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egg-wechat-sdk-x",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
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
+ }