zmp-sdk 2.13.0 → 2.15.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/dist/browser.min.js +5522 -4008
- package/dist/index.es.js +5517 -4001
- package/dist/index.js +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/types/src/constants.d.ts +1 -0
- package/dist/types/src/controller/index.d.ts +1 -1
- package/dist/types/src/controller/interface.d.ts +1 -1
- package/dist/types/src/services/openApi.d.ts +1 -1
- package/dist/types/src/types/entity.d.ts +2 -2
- package/dist/types/src/types/enum.d.ts +2 -1
- package/dist/types/src/types/inputData.d.ts +9 -0
- package/dist/types/src/utils/common.d.ts +1 -0
- package/dist/types/src/utils/response.d.ts +2 -0
- package/package.json +1 -1
|
@@ -57,7 +57,7 @@ export declare abstract class SDKCreator {
|
|
|
57
57
|
errorKeys: string[];
|
|
58
58
|
}>;
|
|
59
59
|
clearStorage(object: InputDataType.ClearStorageDataType): Promise<void>;
|
|
60
|
-
getUserInfo(object?: InputDataType.
|
|
60
|
+
getUserInfo(object?: InputDataType.GetUserInfoDataType<CallbackDataType.GetUserInfoSuccessCallback>): Promise<CallbackDataType.GetUserInfoSuccessCallback>;
|
|
61
61
|
getNetworkType(object: InputDataType.CallbackType): Promise<CallbackDataType.NetworkTypeSuccessCallback>;
|
|
62
62
|
onNetworkStatusChange(callback: (res: InputDataType.OnNetworkStatusChangeCallback) => void): Promise<void>;
|
|
63
63
|
startBeaconDiscovery(object: InputDataType.StartBeaconDiscoveryDataType): Promise<boolean>;
|
|
@@ -23,7 +23,7 @@ export interface SDKInterface {
|
|
|
23
23
|
errorKeys: Array<string>;
|
|
24
24
|
}>;
|
|
25
25
|
clearStorage: (option?: InputDataType.ClearStorageDataType) => Promise<void>;
|
|
26
|
-
getUserInfo: (object?: InputDataType.
|
|
26
|
+
getUserInfo: (object?: InputDataType.GetUserInfoDataType<CallbackDataType.GetUserInfoSuccessCallback>) => Promise<CallbackDataType.GetUserInfoSuccessCallback>;
|
|
27
27
|
getNetworkType: (object?: InputDataType.CallbackType | undefined) => Promise<CallbackDataType.NetworkTypeSuccessCallback>;
|
|
28
28
|
onNetworkStatusChange: (callback: (res: InputDataType.OnNetworkStatusChangeCallback) => void) => Promise<void>;
|
|
29
29
|
startBeaconDiscovery: (object: InputDataType.StartBeaconDiscoveryDataType) => Promise<boolean>;
|
|
@@ -17,7 +17,7 @@ export declare class OpenApi {
|
|
|
17
17
|
* });
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
|
-
static getUserInfo(this: ZaloMiniProgramSDK, object?: InputDataType.
|
|
20
|
+
static getUserInfo(this: ZaloMiniProgramSDK, object?: InputDataType.GetUserInfoDataType<CallbackDataType.GetUserInfoSuccessCallback>): Promise<CallbackDataType.GetUserInfoSuccessCallback>;
|
|
21
21
|
/**
|
|
22
22
|
* Gets user phone number.
|
|
23
23
|
*
|
|
@@ -281,6 +281,9 @@ export declare type OpenShareSheet<T> = CallbackType<T> & {
|
|
|
281
281
|
link: string;
|
|
282
282
|
chatOnly: boolean;
|
|
283
283
|
id: string;
|
|
284
|
+
title: string;
|
|
285
|
+
description: string;
|
|
286
|
+
thumbnail: string;
|
|
284
287
|
};
|
|
285
288
|
};
|
|
286
289
|
/**
|
|
@@ -395,4 +398,10 @@ export declare type RedirectCallbackData = CallbackType & {
|
|
|
395
398
|
export declare type OnCallbackData = {
|
|
396
399
|
data: any;
|
|
397
400
|
};
|
|
401
|
+
/**
|
|
402
|
+
* Get user info data type
|
|
403
|
+
*/
|
|
404
|
+
export declare type GetUserInfoDataType<T> = CallbackType<T> & {
|
|
405
|
+
avatarType: 'small' | 'normal' | 'large';
|
|
406
|
+
};
|
|
398
407
|
export {};
|
|
@@ -61,3 +61,4 @@ export declare const getAppUrl: (appId: string) => string;
|
|
|
61
61
|
export declare const isSupportNativeStorage: () => boolean;
|
|
62
62
|
export declare const stringifyData: (data: any) => string;
|
|
63
63
|
export declare const stringToData: (data: string | null) => any;
|
|
64
|
+
export declare const showUserInfoPermissionModal: (acceptHandler?: (() => void) | undefined, denyHandler?: (() => void) | undefined) => void;
|
|
@@ -5,5 +5,7 @@ export declare const apiResponse: {
|
|
|
5
5
|
loginRequired: () => CommonError;
|
|
6
6
|
missingParam: (params: string[] | string) => CommonError;
|
|
7
7
|
wrongTypeParam: (arg: string, expected: string, got: string) => CommonError;
|
|
8
|
+
cannotGetShareInfo: () => CommonError;
|
|
9
|
+
lengthInvalid: (arg: string) => CommonError;
|
|
8
10
|
};
|
|
9
11
|
};
|