@momo-cloud/gami-sdk 0.0.32 → 0.0.34
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 +23 -97
- package/dist/index.public.js +1119 -939
- package/package.json +1 -1
package/dist/index.public.d.ts
CHANGED
|
@@ -39,36 +39,43 @@ declare const GamiSDK: {
|
|
|
39
39
|
appjson: string;
|
|
40
40
|
userId?: string;
|
|
41
41
|
}) => Promise<void>;
|
|
42
|
+
customGameRequest: (params: {
|
|
43
|
+
subDomain?: string;
|
|
44
|
+
path: string;
|
|
45
|
+
method: string;
|
|
46
|
+
body?: any;
|
|
47
|
+
extraHeader?: any;
|
|
48
|
+
}) => Promise<any>;
|
|
42
49
|
startGame: () => Promise<any>;
|
|
43
50
|
endGame: () => Promise<void>;
|
|
44
|
-
getBalance: (
|
|
51
|
+
getBalance: (params: {
|
|
45
52
|
balanceIds: string[];
|
|
46
|
-
}) => Promise<
|
|
47
|
-
getBalanceConfig: () => Promise<
|
|
53
|
+
}) => Promise<any>;
|
|
54
|
+
getBalanceConfig: () => Promise<any>;
|
|
48
55
|
getConfig: () => Promise<any>;
|
|
49
|
-
getTheme: (
|
|
56
|
+
getTheme: (params: {
|
|
50
57
|
ext: string;
|
|
51
58
|
name: string;
|
|
52
59
|
}) => Promise<any>;
|
|
53
|
-
submit: (
|
|
60
|
+
submit: (params: {
|
|
54
61
|
steps: any[];
|
|
55
62
|
score: number;
|
|
56
63
|
}) => Promise<any>;
|
|
57
64
|
spin: () => Promise<any>;
|
|
58
65
|
getMilestone: () => Promise<any>;
|
|
59
|
-
getLeaderboard: (
|
|
66
|
+
getLeaderboard: (params: {
|
|
60
67
|
boardId: string;
|
|
61
|
-
group
|
|
68
|
+
group?: "friend" | "global";
|
|
62
69
|
limit?: number;
|
|
63
70
|
page?: number;
|
|
64
|
-
}) => Promise<
|
|
65
|
-
getEvent: (
|
|
71
|
+
}) => Promise<any>;
|
|
72
|
+
getEvent: (params: {
|
|
66
73
|
eventId: string;
|
|
67
|
-
}) => Promise<
|
|
68
|
-
getHistory: (
|
|
74
|
+
}) => Promise<any>;
|
|
75
|
+
getHistory: (params: {
|
|
69
76
|
page: number;
|
|
70
77
|
limit: number;
|
|
71
|
-
}) => Promise<
|
|
78
|
+
}) => Promise<any>;
|
|
72
79
|
showToast: (params: {
|
|
73
80
|
title?: string;
|
|
74
81
|
description: string;
|
|
@@ -98,22 +105,23 @@ declare const GamiSDK: {
|
|
|
98
105
|
checkPermission: (permission: string) => Promise<string>;
|
|
99
106
|
getContacts: () => Promise<null>;
|
|
100
107
|
formatUrl: (origin: string, args?: any[]) => string;
|
|
101
|
-
request: ({ path, method, subDomain, params, body, extraHeader }: {
|
|
108
|
+
request: ({ path, method, subDomain, params, body, extraHeader, mockData }: {
|
|
102
109
|
path: string;
|
|
103
110
|
method: string;
|
|
104
111
|
subDomain?: string;
|
|
105
112
|
params?: any[];
|
|
106
113
|
body?: any;
|
|
107
114
|
extraHeader?: any;
|
|
108
|
-
|
|
115
|
+
mockData?: any;
|
|
109
116
|
}) => Promise<any>;
|
|
110
|
-
fetch: ({ path, method, subDomain, params, body, extraHeader }: {
|
|
117
|
+
fetch: ({ path, method, subDomain, params, body, extraHeader, mockData }: {
|
|
111
118
|
path: string;
|
|
112
119
|
method: string;
|
|
113
120
|
params?: any[];
|
|
114
121
|
subDomain?: string;
|
|
115
122
|
body?: any;
|
|
116
123
|
extraHeader?: any;
|
|
124
|
+
mockData?: any;
|
|
117
125
|
}) => Promise<any>;
|
|
118
126
|
fetchBinary: ({ url }: {
|
|
119
127
|
url: string;
|
|
@@ -187,26 +195,6 @@ declare interface StorageAPI {
|
|
|
187
195
|
cacheFile(url: string): Promise<string>;
|
|
188
196
|
}
|
|
189
197
|
|
|
190
|
-
declare type TBalance = {
|
|
191
|
-
response_info: {
|
|
192
|
-
error_message: string;
|
|
193
|
-
error_code: number;
|
|
194
|
-
event_tracking: string;
|
|
195
|
-
};
|
|
196
|
-
result: {
|
|
197
|
-
config?: TBalanceConfig[];
|
|
198
|
-
balances: {
|
|
199
|
-
[key: string]: number;
|
|
200
|
-
};
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
declare type TBalanceConfig = {
|
|
205
|
-
balanceId: string;
|
|
206
|
-
name: string;
|
|
207
|
-
icon: string;
|
|
208
|
-
};
|
|
209
|
-
|
|
210
198
|
export declare type TDeviceInfo = {
|
|
211
199
|
appVersion: string;
|
|
212
200
|
buildVersion: string;
|
|
@@ -225,68 +213,6 @@ declare type TDeviceInfo_2 = {
|
|
|
225
213
|
devicePerformance?: string;
|
|
226
214
|
};
|
|
227
215
|
|
|
228
|
-
declare type TEvent = {
|
|
229
|
-
response_info: {
|
|
230
|
-
error_message: string;
|
|
231
|
-
error_code: number;
|
|
232
|
-
event_tracking: string;
|
|
233
|
-
};
|
|
234
|
-
result: TeventItem[];
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
declare type TeventItem = {
|
|
238
|
-
id: string;
|
|
239
|
-
startMs: number;
|
|
240
|
-
endMs: number;
|
|
241
|
-
title: string;
|
|
242
|
-
banner1x2: string;
|
|
243
|
-
banner1x1: string;
|
|
244
|
-
refId: string;
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
declare type THistory = {
|
|
248
|
-
response_info: {
|
|
249
|
-
error_message: string;
|
|
250
|
-
error_code: number;
|
|
251
|
-
event_tracking: string;
|
|
252
|
-
};
|
|
253
|
-
result: {
|
|
254
|
-
history: THistoryItem[];
|
|
255
|
-
category: string[];
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
declare type THistoryItem = {
|
|
260
|
-
tag: string[];
|
|
261
|
-
icon: string;
|
|
262
|
-
title: string;
|
|
263
|
-
desc: string;
|
|
264
|
-
refId: string;
|
|
265
|
-
refExtra: string;
|
|
266
|
-
timestamp: number;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
declare type TLeaderboard = {
|
|
270
|
-
response_info: {
|
|
271
|
-
error_message: string;
|
|
272
|
-
error_code: number;
|
|
273
|
-
event_tracking: string;
|
|
274
|
-
};
|
|
275
|
-
result: {
|
|
276
|
-
serverTime: number;
|
|
277
|
-
resetTime: number;
|
|
278
|
-
metadata: TLeaderboardItem;
|
|
279
|
-
board: TLeaderboardItem[];
|
|
280
|
-
};
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
declare type TLeaderboardItem = {
|
|
284
|
-
name: string;
|
|
285
|
-
avatar: string;
|
|
286
|
-
rank: number;
|
|
287
|
-
score: number;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
216
|
export declare const Utils: {
|
|
291
217
|
num10to11: (number: string) => string;
|
|
292
218
|
num11to10: (number: string) => string;
|