UNPKG

gamelet-pixui-frame

Version:

pixui开发者框架

85 lines (84 loc) 4.44 kB
import { IGameletAPI } from '../../../interfaces/igameletapi'; import { IUserdata } from '../../../interfaces/ipresetdata'; declare class JSSDKAppWindowGameletAPIImpl implements IGameletAPI { userSetAppInfo: any; constructor(); canUsePlatformAPI(): boolean; getRuntimeEnv(): string; genAppScopeEventName(evt: string): string; getAppID(): number; getAppId(): number; getAppKey(): string; getAppName(): string; getAppVersion(): string; getAppEntranceConfig(key: string): any; getOpenArgs(): string; getIsProductEnvironment(): boolean; getIsHitBackendWhitelist(): boolean; getIsSupportCallbroker(): boolean; getPlatformDesc(): string; getEntryInfo(): string; getFaasAddr(): string; getUserData(): Promise<IUserdata>; refreshUserDataTokens(): Promise<void>; reportJSExceptionStringToTDM(content: string): void; reportStringToTDM(content: any, tag: any): void; reportNumberToTDM(tag: any): void; faasReportStringToTDM(content: string, tag: string): Promise<any>; faasReportNumberToTDM(tag: string): Promise<any>; setDataStash(dataKey: string, dataValue: any): Promise<void>; getDataStash(dataKey: string): Promise<string>; clearDataStash(): Promise<void>; /** * 写cookie文件 */ writeCookie(customerName: string, content: string, appId?: number): Promise<void>; writeRoleCookie(customerName: string, content: string, appId?: number): Promise<void>; /** * 读取cookie */ readCookie(customerName: string, appId?: number): Promise<string>; readRoleCookie(customerName: string, appId?: number): Promise<string>; /** * 删除cookie */ deleteCookie(customerName: string, appId?: number): Promise<void>; addOnGameCommandListener(func: (cmd: string) => void): void; removeOnGameCommandListener(func: (cmd: string) => void): void; addOnSrvPushDataListener(func: (msg: string) => void): void; removeOnSrvPushDataListener(func: (msg: string) => void): void; addEventListener(evt: string, func: (...args: any[]) => void): void; removeEventListener(evt: string, func: (...args: any[]) => void): void; dispatchEvent(evt: string, ...args: any[]): void; addLocalEventListener(evt: string, func: (...args: any[]) => void): void; removeLocalEventListener(evt: string, func: (...args: any[]) => void): void; dispatchLocalEvent(evt: string, ...args: any[]): void; callGame(msg: string): void; open(appID: number, extend?: object): void; close(appID?: number, features?: object): void; reportStats(usredata: IUserdata, iModule: number, iChannelID: number, iType: number, iActId: number, iJumpType: number, sJumpURL: string, sRecommendID: string, sChangjingID: string | number, iGoodsID: number, iCountID: number, iFee: number, iActStyle: number, iFlowID: number, sExtendList: Array<Object> | undefined): void; callApplicationBroker(commandId: number, subCommandId: number, req: object, callback: (msg: any) => void): Promise<void>; gameCustomFunction(functionName: string, ...args: any[]): void; reportStatsV2(iType: number, iChangjingId: string, iGoodsId: string, iCountId: number, iFee: number, iFlowId: number, extendList?: Array<Object> | undefined, appId?: number): Promise<void>; reportMonitorV2(tag: string, content: string, itype: number): Promise<void>; getArchivePath(): Promise<any>; loadFileToArrayBuffer(url: string): Promise<ArrayBuffer>; saveArrayBufferToFile(path: string, arrayBuffer: ArrayBuffer): Promise<any>; loadFileToString(url: string): Promise<any>; saveStringToFile(path: string, str: string): Promise<any>; setGameletAppEnv(appInfo: object, _isProductEnvironment?: boolean): Promise<void>; getAppInfo(appId: number, appKey: string): Promise<any>; queryAppStatus(appId: number): Promise<{}>; getResourcePath(): string; cacheAsset(url: string, callback: (savePath: string, isSuccess: boolean) => void): void; isAssetCached(url: string): Promise<boolean>; getAssetCachePath(url: string): Promise<string>; storeAsset(url: string, callback: (savePath: string, isSuccess: boolean) => void): void; isAssetStored(url: string): Promise<boolean>; getAssetStorePath(url: string): Promise<string>; getJSSDKVersion(): string; } export declare let JSSDKAppWindowGameletAPI: { getInstance: () => JSSDKAppWindowGameletAPIImpl; }; export {};