@momo-cloud/gami-sdk 0.0.27 → 0.0.29

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.
@@ -1,3 +1,5 @@
1
+ import { EventEmitter } from 'eventemitter3';
2
+
1
3
  export declare const Calendar: CalendarAPI;
2
4
 
3
5
  declare interface CalendarAPI {
@@ -14,14 +16,7 @@ declare interface CalendarAPI {
14
16
  }): Promise<boolean>;
15
17
  }
16
18
 
17
- export declare const GameEvent: GameEventEmitter;
18
-
19
- declare class GameEventEmitter extends EventTarget {
20
- on(event: string, listener: EventListener): this;
21
- off(event: string, listener: EventListener): this;
22
- emit(event: string, data?: any): boolean;
23
- once(event: string, listener: EventListener): this;
24
- }
19
+ export declare const GameEvent: EventEmitter<string | symbol, any>;
25
20
 
26
21
  declare const GamiSDK: {
27
22
  setServerTime: (value: number) => void;
@@ -30,6 +25,7 @@ declare const GamiSDK: {
30
25
  gameId: string;
31
26
  userId: string | undefined;
32
27
  userInfo: IUserInfo | null;
28
+ deviceInfo: TDeviceInfo;
33
29
  isBrowser: boolean;
34
30
  feature: any;
35
31
  isIos: boolean;
@@ -146,6 +142,14 @@ declare const GamiSDK: {
146
142
  onBlurApp: (callback: () => void) => void;
147
143
  registerNoti: (action: (data: any) => void) => void;
148
144
  unregisterNoti: () => void;
145
+ openLoginApp: ({ path, subDomain, params, options, pinKey }: {
146
+ path: string;
147
+ subDomain?: "ai" | "aws" | "api";
148
+ params?: any;
149
+ options?: any;
150
+ pinKey?: string;
151
+ }, callback: (data: any) => void) => void;
152
+ UploadImage: (base64: string) => Promise<string>;
149
153
  trackingEvent: (event: string, data: any) => void;
150
154
  screenTracking: ({ game_id, event_name, action_name, screen_name, extra, error_code }: {
151
155
  game_id?: string;
@@ -203,6 +207,15 @@ declare type TBalanceConfig = {
203
207
  icon: string;
204
208
  };
205
209
 
210
+ export declare type TDeviceInfo = {
211
+ appVersion: string;
212
+ buildVersion: string;
213
+ bundleId: string;
214
+ deviceManufacturer?: string;
215
+ deviceName?: string;
216
+ devicePerformance?: string;
217
+ };
218
+
206
219
  declare type TEvent = {
207
220
  response_info: {
208
221
  error_message: string;