zmp-sdk 2.51.3 → 2.51.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/apis/apis/showFunctionButtonWidget.js +1 -1
- package/apis/constants.js +1 -1
- package/apis/index.d.ts +17 -6
- package/apis/package.json.js +1 -1
- package/browser.min.js +2 -2
- package/index.d.ts +17 -6
- package/index.es.js +2 -2
- package/index.js +2 -2
- package/index.umd.js +2 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AsyncVoidCallback as AsyncVoidCallback$1, StreamType as StreamType$1, MediaConstraints as MediaConstraints$1, PhotoConstraint as PhotoConstraint$1, PhotoFrame as PhotoFrame$1, MediaDevice as MediaDevice$1, CameraEvents as CameraEvents$1 } from '@mp-types';
|
|
2
|
+
import { AppError as AppError$1 } from '@utils/errorHandler';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @typedef {"none" | "wifi" | "cellular" | "unknown"} NetworkType
|
|
@@ -1061,8 +1062,8 @@ declare const ACTION: {
|
|
|
1061
1062
|
skipJump: boolean;
|
|
1062
1063
|
};
|
|
1063
1064
|
};
|
|
1064
|
-
declare const AUTHEN_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber"];
|
|
1065
|
-
declare const GET_SETTINGS_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.camera", "scope.micro"];
|
|
1065
|
+
declare const AUTHEN_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.userFriends"];
|
|
1066
|
+
declare const GET_SETTINGS_SCOPE_VALUES: readonly ["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.userFriends", "scope.camera", "scope.micro"];
|
|
1066
1067
|
|
|
1067
1068
|
type AsyncCallbackFailObject = {
|
|
1068
1069
|
code: number;
|
|
@@ -5333,11 +5334,11 @@ declare function checkIsAllowedInteractWithOA(args: AsyncVoidCallback & TypeOf<(
|
|
|
5333
5334
|
declare function getSetting(args?: AsyncCallback<GetSettingReturn>): Promise<GetSettingReturn>;
|
|
5334
5335
|
|
|
5335
5336
|
declare const authorizeArgs: ZodOptional<ZodObject<{
|
|
5336
|
-
scopes: ZodOptional<ZodArray<ZodEnum<["scope.userInfo", "scope.userLocation", "scope.userPhonenumber"]>, "many">>;
|
|
5337
|
+
scopes: ZodOptional<ZodArray<ZodEnum<["scope.userInfo", "scope.userLocation", "scope.userPhonenumber", "scope.userFriends"]>, "many">>;
|
|
5337
5338
|
}, "strip", ZodTypeAny, {
|
|
5338
|
-
scopes?: ("scope.userInfo" | "scope.userLocation" | "scope.userPhonenumber")[] | undefined;
|
|
5339
|
+
scopes?: ("scope.userInfo" | "scope.userLocation" | "scope.userPhonenumber" | "scope.userFriends")[] | undefined;
|
|
5339
5340
|
}, {
|
|
5340
|
-
scopes?: ("scope.userInfo" | "scope.userLocation" | "scope.userPhonenumber")[] | undefined;
|
|
5341
|
+
scopes?: ("scope.userInfo" | "scope.userLocation" | "scope.userPhonenumber" | "scope.userFriends")[] | undefined;
|
|
5341
5342
|
}>>[];
|
|
5342
5343
|
/**
|
|
5343
5344
|
* ### Cấp quyền sử dụng API
|
|
@@ -5774,7 +5775,17 @@ declare const showFunctionButtonWidgetArgs: ZodObject<{
|
|
|
5774
5775
|
type: string;
|
|
5775
5776
|
id: string;
|
|
5776
5777
|
}>[];
|
|
5777
|
-
|
|
5778
|
+
type FunctionButtonWidgetContext = {
|
|
5779
|
+
callAction: (actionName: string, actionData: any) => void;
|
|
5780
|
+
};
|
|
5781
|
+
type FunctionButtonWidgetOnDataReceived = (interactToken: string, type: string, context: FunctionButtonWidgetContext) => void;
|
|
5782
|
+
type FunctionButtonWidgetOnError = (error: AppError$1) => void;
|
|
5783
|
+
type ShowFunctionButtonWidgetValidatedArgs = TypeOf<(typeof showFunctionButtonWidgetArgs)[0]>;
|
|
5784
|
+
type ShowFunctionButtonWidgetArgs = Omit<ShowFunctionButtonWidgetValidatedArgs, "onDataReceived" | "onError"> & {
|
|
5785
|
+
onDataReceived?: FunctionButtonWidgetOnDataReceived;
|
|
5786
|
+
onError?: FunctionButtonWidgetOnError;
|
|
5787
|
+
};
|
|
5788
|
+
declare function showFunctionButtonWidget(args: AsyncVoidCallback & ShowFunctionButtonWidgetArgs): Promise<void>;
|
|
5778
5789
|
|
|
5779
5790
|
declare const scanNFCArgs: ZodObject<{
|
|
5780
5791
|
type: ZodEnum<["cccd"]>;
|