zmp-sdk 2.22.0 → 2.23.0-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.json +14501 -0
- package/changelog/changelog-setup.js +2 -2
- package/changelog/changelog-template.hbs +1 -1
- package/changelog/dist/changelog-setup.dev.js +2 -2
- package/dist/browser.min.js +113 -36
- package/dist/index.es.js +113 -36
- package/dist/index.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/types/src/apis/index.d.ts +5 -1
- package/dist/types/src/services/mock-mp-service.d.ts +6 -2
- package/dist/types/src/services/zalo-mp-service.d.ts +7 -2
- package/dist/types/src/types/callbackData.d.ts +10 -0
- package/dist/types/src/types/interface.d.ts +7 -3
- package/dist/types/src/zaloJsBridge.d.ts +8 -0
- package/package.json +7 -6
|
@@ -172,3 +172,13 @@ export declare type CheckTransactionSuccessCallBack = {
|
|
|
172
172
|
transTime: string;
|
|
173
173
|
createdAt: string;
|
|
174
174
|
};
|
|
175
|
+
/**
|
|
176
|
+
* Request auth code
|
|
177
|
+
* @typedef GetAuthCodeSuccessCallback
|
|
178
|
+
*/
|
|
179
|
+
export declare type GetAuthCodeSuccessCallback = {
|
|
180
|
+
/** authCode */
|
|
181
|
+
authCode: string;
|
|
182
|
+
/** authCodeVrf */
|
|
183
|
+
authCodeVerify: string;
|
|
184
|
+
};
|
|
@@ -5,17 +5,21 @@ import { MediaPickerType } from './enum';
|
|
|
5
5
|
import { SDKCreator } from '..';
|
|
6
6
|
export interface SDKServiceInterface {
|
|
7
7
|
getAppId: () => string;
|
|
8
|
-
getDeviceId: () => string
|
|
9
|
-
|
|
8
|
+
getDeviceId: () => Promise<string>;
|
|
9
|
+
getDeviceIdSync: () => string;
|
|
10
|
+
getContext: () => Promise<contextInfo | null>;
|
|
11
|
+
getContextSync: () => contextInfo | null;
|
|
12
|
+
getAuthCode: () => Promise<CallbackDataType.GetAuthCodeSuccessCallback>;
|
|
10
13
|
login: (object?: InputDataType.CallbackType) => Promise<string>;
|
|
11
14
|
getLoginStatus: () => boolean;
|
|
12
15
|
getAccessToken: (object?: InputDataType.CallbackType) => Promise<string | null>;
|
|
16
|
+
setAccessToken: (accessToken: string) => void;
|
|
13
17
|
getVersion: () => string;
|
|
14
18
|
getSystemInfo: () => systemInfo;
|
|
15
19
|
setNavigationBarTitle: (object: InputDataType.NavBarTitleType) => Promise<any>;
|
|
16
20
|
setNavigationBarColor: (object: InputDataType.NavBarColorType) => Promise<any>;
|
|
17
21
|
setBackgroundColor: (object: InputDataType.BackgroundColorType) => Promise<any>;
|
|
18
|
-
setNavigationBarLeftButton: (type?:
|
|
22
|
+
setNavigationBarLeftButton: (type?: 'none' | 'back' | 'home' | 'both', confirmToExit?: 0 | 2) => Promise<any>;
|
|
19
23
|
setDeviceOrientation: (object: InputDataType.DeviceOrientationType) => Promise<void>;
|
|
20
24
|
setStorage: (object: InputDataType.SetStorageDataType) => Promise<{
|
|
21
25
|
errorKeys: Array<string>;
|
|
@@ -16,6 +16,14 @@ export default class ZaloJSBridge extends EventEmitter {
|
|
|
16
16
|
private sendLogTimer;
|
|
17
17
|
private isJumped;
|
|
18
18
|
constructor();
|
|
19
|
+
getCookie: (name: string) => Promise<{
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
getCookieSync: (name: string) => {
|
|
24
|
+
name: string;
|
|
25
|
+
value: string;
|
|
26
|
+
};
|
|
19
27
|
set accessTk(value: string);
|
|
20
28
|
set jsAccessTk(value: string);
|
|
21
29
|
jump: () => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zmp-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0-0",
|
|
4
4
|
"description": "Zalo Mini App SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"changelog": "auto-changelog -p",
|
|
15
|
+
"changelog": "auto-changelog -p && node ./scripts/build-changelog.js",
|
|
16
16
|
"watch": "rollup -c -w",
|
|
17
17
|
"build": "rimraf dist && NODE_ENV=production rollup -c",
|
|
18
18
|
"version": "NODE_ENV=production yarn run build",
|
|
19
|
-
"release": "np --no-2fa && yarn run changelog"
|
|
19
|
+
"release": "np --no-2fa && yarn run changelog",
|
|
20
|
+
"release:dev": "np --no-2fa --branch develop"
|
|
20
21
|
},
|
|
21
22
|
"author": {
|
|
22
23
|
"name": "Zalo"
|
|
@@ -26,11 +27,10 @@
|
|
|
26
27
|
"runPublish": true
|
|
27
28
|
},
|
|
28
29
|
"auto-changelog": {
|
|
29
|
-
"output": "
|
|
30
|
+
"output": "./CHANGELOG.json",
|
|
30
31
|
"unreleased": true,
|
|
31
32
|
"commitLimit": false,
|
|
32
|
-
"template": "
|
|
33
|
-
"handlebarsSetup": "./changelog/changelog-setup.js"
|
|
33
|
+
"template": "json"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.0.0-0",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"@types/qrcode": "^1.4.1",
|
|
53
53
|
"babel-plugin-lodash": "^3.3.4",
|
|
54
54
|
"jest": "^25.1.0",
|
|
55
|
+
"json2md": "^1.12.0",
|
|
55
56
|
"kida-docs": "^2.5.3",
|
|
56
57
|
"np": "^7.2.0",
|
|
57
58
|
"npm": "^6.14.11",
|