@momo-cloud/gami-sdk 0.0.29 → 0.0.30
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/index.public.d.ts +29 -20
- package/dist/index.public.js +939 -939
- package/package.json +23 -1
package/dist/index.public.d.ts
CHANGED
|
@@ -25,13 +25,13 @@ declare const GamiSDK: {
|
|
|
25
25
|
gameId: string;
|
|
26
26
|
userId: string | undefined;
|
|
27
27
|
userInfo: IUserInfo | null;
|
|
28
|
-
deviceInfo:
|
|
28
|
+
deviceInfo: TDeviceInfo_2;
|
|
29
29
|
isBrowser: boolean;
|
|
30
30
|
feature: any;
|
|
31
31
|
isIos: boolean;
|
|
32
32
|
isProd: boolean;
|
|
33
33
|
isUat: boolean;
|
|
34
|
-
|
|
34
|
+
close: () => void;
|
|
35
35
|
goHome: () => void;
|
|
36
36
|
init: ({ gameId, source, appjson, userId }: {
|
|
37
37
|
gameId?: string;
|
|
@@ -74,31 +74,31 @@ declare const GamiSDK: {
|
|
|
74
74
|
description: string;
|
|
75
75
|
duration: number;
|
|
76
76
|
type?: "success" | "failure" | "info";
|
|
77
|
-
}) =>
|
|
78
|
-
showAlert: (title: string, message: string, buttons?: string[]) =>
|
|
77
|
+
}) => void;
|
|
78
|
+
showAlert: (title: string, message: string, buttons?: string[]) => void;
|
|
79
79
|
setItem: (key: string, obj: any) => void;
|
|
80
|
-
getItem: (key: string) => Promise<
|
|
80
|
+
getItem: (key: string) => Promise<any>;
|
|
81
81
|
openWeb: ({ url, html, title }: {
|
|
82
82
|
url?: string;
|
|
83
83
|
html?: string;
|
|
84
84
|
title?: string;
|
|
85
|
-
}) => Promise<
|
|
86
|
-
openURL: (url: string) => Promise<
|
|
87
|
-
scanQRCode: () => Promise<
|
|
85
|
+
}) => Promise<boolean>;
|
|
86
|
+
openURL: (url: string) => Promise<boolean>;
|
|
87
|
+
scanQRCode: () => Promise<null>;
|
|
88
88
|
shareExternal: (params: {
|
|
89
89
|
title?: string;
|
|
90
90
|
message?: string;
|
|
91
91
|
url?: string;
|
|
92
92
|
subject?: string;
|
|
93
|
-
}) => Promise<
|
|
94
|
-
copyToClipBoard: (text: string, message?: string) => Promise<
|
|
95
|
-
shareFacebook: (url: string) => Promise<
|
|
96
|
-
shareMessenger: (url: string) => Promise<
|
|
97
|
-
requestPermission: (permission: string) => Promise<
|
|
98
|
-
checkPermission: (permission: string) => Promise<
|
|
99
|
-
getContacts: () => Promise<
|
|
93
|
+
}) => Promise<boolean>;
|
|
94
|
+
copyToClipBoard: (text: string, message?: string) => Promise<boolean>;
|
|
95
|
+
shareFacebook: (url: string) => Promise<boolean>;
|
|
96
|
+
shareMessenger: (url: string) => Promise<boolean>;
|
|
97
|
+
requestPermission: (permission: string) => Promise<string>;
|
|
98
|
+
checkPermission: (permission: string) => Promise<string>;
|
|
99
|
+
getContacts: () => Promise<null>;
|
|
100
100
|
formatUrl: (origin: string, args?: any[]) => string;
|
|
101
|
-
request: ({ path, method, subDomain, params, body, extraHeader
|
|
101
|
+
request: ({ path, method, subDomain, params, body, extraHeader }: {
|
|
102
102
|
path: string;
|
|
103
103
|
method: string;
|
|
104
104
|
subDomain?: string;
|
|
@@ -132,12 +132,12 @@ declare const GamiSDK: {
|
|
|
132
132
|
alarm: number | Date;
|
|
133
133
|
des: string;
|
|
134
134
|
toast?: string;
|
|
135
|
-
}) => Promise<
|
|
136
|
-
requestPlatformApi: (name: string, ...params: any[]) =>
|
|
135
|
+
}) => Promise<boolean>;
|
|
136
|
+
requestPlatformApi: (name: string, ...params: any[]) => null;
|
|
137
137
|
listen: (name: string, callback: (args: any[]) => void) => void;
|
|
138
138
|
listenShaking: ({ onShake }: {
|
|
139
139
|
onShake: (data: any) => void;
|
|
140
|
-
}) =>
|
|
140
|
+
}) => undefined;
|
|
141
141
|
onFocusApp: (callback: () => void) => void;
|
|
142
142
|
onBlurApp: (callback: () => void) => void;
|
|
143
143
|
registerNoti: (action: (data: any) => void) => void;
|
|
@@ -163,7 +163,7 @@ declare const GamiSDK: {
|
|
|
163
163
|
refId: string;
|
|
164
164
|
refExtra?: string | object;
|
|
165
165
|
useWeb?: boolean;
|
|
166
|
-
}) =>
|
|
166
|
+
}) => void;
|
|
167
167
|
};
|
|
168
168
|
export { GamiSDK }
|
|
169
169
|
export default GamiSDK;
|
|
@@ -216,6 +216,15 @@ export declare type TDeviceInfo = {
|
|
|
216
216
|
devicePerformance?: string;
|
|
217
217
|
};
|
|
218
218
|
|
|
219
|
+
declare type TDeviceInfo_2 = {
|
|
220
|
+
appVersion: string;
|
|
221
|
+
buildVersion: string;
|
|
222
|
+
bundleId: string;
|
|
223
|
+
deviceManufacturer?: string;
|
|
224
|
+
deviceName?: string;
|
|
225
|
+
devicePerformance?: string;
|
|
226
|
+
};
|
|
227
|
+
|
|
219
228
|
declare type TEvent = {
|
|
220
229
|
response_info: {
|
|
221
230
|
error_message: string;
|