zmp-sdk 2.21.0 → 2.22.0
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/changelog-setup.js +20 -0
- package/changelog/changelog-template.hbs +30 -0
- package/changelog/dist/changelog-setup.dev.js +24 -0
- package/dist/browser.min.js +40 -7
- package/dist/index.es.js +40 -7
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/apis/index.d.ts +3 -1
- package/dist/types/src/constants.d.ts +8 -0
- package/dist/types/src/services/mock-mp-service.d.ts +3 -1
- package/dist/types/src/services/zalo-mp-service.d.ts +2 -0
- package/dist/types/src/types/entity.d.ts +7 -0
- package/dist/types/src/types/enum.d.ts +2 -1
- package/dist/types/src/types/interface.d.ts +2 -1
- package/package.json +8 -11
|
@@ -13,6 +13,7 @@ import { Routing } from './routing';
|
|
|
13
13
|
import ZJSBridge from '../zaloJsBridge';
|
|
14
14
|
import { SDKServiceInterface } from '../types/interface';
|
|
15
15
|
import { ZMPEEmitter } from '../event-emitter';
|
|
16
|
+
import { contextInfo } from '../types/entity';
|
|
16
17
|
export default class ZaloMiniProgramSDKService implements SDKServiceInterface {
|
|
17
18
|
#private;
|
|
18
19
|
events: ZMPEEmitter;
|
|
@@ -27,6 +28,7 @@ export default class ZaloMiniProgramSDKService implements SDKServiceInterface {
|
|
|
27
28
|
getAppId(): string;
|
|
28
29
|
getZAppId(): string;
|
|
29
30
|
getDeviceId(): string;
|
|
31
|
+
getContext(): contextInfo | null;
|
|
30
32
|
getJSBridge(): ZJSBridge;
|
|
31
33
|
login(object?: InputDataType.CallbackType): Promise<string>;
|
|
32
34
|
loginZaloV3(): Promise<string | null>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as InputDataType from './inputData';
|
|
2
2
|
import * as CallbackDataType from './callbackData';
|
|
3
|
-
import { systemInfo } from './entity';
|
|
3
|
+
import { systemInfo, contextInfo } from './entity';
|
|
4
4
|
import { MediaPickerType } from './enum';
|
|
5
5
|
import { SDKCreator } from '..';
|
|
6
6
|
export interface SDKServiceInterface {
|
|
7
7
|
getAppId: () => string;
|
|
8
8
|
getDeviceId: () => string;
|
|
9
|
+
getContext: () => contextInfo | null;
|
|
9
10
|
login: (object?: InputDataType.CallbackType) => Promise<string>;
|
|
10
11
|
getLoginStatus: () => boolean;
|
|
11
12
|
getAccessToken: (object?: InputDataType.CallbackType) => Promise<string | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zmp-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.0",
|
|
4
4
|
"description": "Zalo Mini App SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,12 +12,11 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"
|
|
16
|
-
"tsdocs": "rimraf ./tsdocs && typedoc ./src/index.ts --options ./typedoc.json ./src",
|
|
15
|
+
"changelog": "auto-changelog -p",
|
|
17
16
|
"watch": "rollup -c -w",
|
|
18
17
|
"build": "rimraf dist && NODE_ENV=production rollup -c",
|
|
19
18
|
"version": "NODE_ENV=production yarn run build",
|
|
20
|
-
"release": "np --no-2fa"
|
|
19
|
+
"release": "np --no-2fa && yarn run changelog"
|
|
21
20
|
},
|
|
22
21
|
"author": {
|
|
23
22
|
"name": "Zalo"
|
|
@@ -27,15 +26,11 @@
|
|
|
27
26
|
"runPublish": true
|
|
28
27
|
},
|
|
29
28
|
"auto-changelog": {
|
|
30
|
-
"output": "
|
|
29
|
+
"output": "../changelog/zmp-sdk.CHANGELOG.md",
|
|
31
30
|
"unreleased": true,
|
|
32
31
|
"commitLimit": false,
|
|
33
|
-
"template": "./
|
|
34
|
-
"handlebarsSetup": "./
|
|
35
|
-
},
|
|
36
|
-
"apidoc": {
|
|
37
|
-
"title": "Custom apiDoc browser title",
|
|
38
|
-
"url": ""
|
|
32
|
+
"template": "./changelog/changelog-template.hbs",
|
|
33
|
+
"handlebarsSetup": "./changelog/changelog-setup.js"
|
|
39
34
|
},
|
|
40
35
|
"devDependencies": {
|
|
41
36
|
"@babel/core": "^7.0.0-0",
|
|
@@ -45,6 +40,8 @@
|
|
|
45
40
|
"@babel/preset-env": "^7.16.11",
|
|
46
41
|
"@babel/preset-typescript": "^7.12.7",
|
|
47
42
|
"@babel/runtime": "^7.0.0-beta.46",
|
|
43
|
+
"@commitlint/cli": "^17.0.3",
|
|
44
|
+
"@commitlint/config-conventional": "^17.0.3",
|
|
48
45
|
"@open-wc/rollup-plugin-html": "^1.2.5",
|
|
49
46
|
"@rollup/plugin-alias": "^3.1.9",
|
|
50
47
|
"@rollup/plugin-html": "^0.2.2",
|