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