gamelet-pixui-frame
Version:
pixui开发者框架
67 lines (66 loc) • 3.72 kB
TypeScript
import { IGameletAPI } from '../../interfaces/igameletapi';
import { IUserdata } from '../../interfaces/ipresetdata';
declare class UEGameletAPIImpl implements IGameletAPI {
constructor();
canUsePlatformAPI(): boolean;
getRuntimeEnv(): string;
genAppScopeEventName(evt: string): string;
getAppID(): number;
getAppKey(): string;
getAppName(): string;
getAppVersion(): string;
queryAppStatus(appID: number): Promise<any>;
getAppEntranceConfig(key: string): any;
getOpenArgs(): string;
getIsProductEnvironment(): boolean;
getIsHitBackendWhitelist(): boolean;
getIsSupportCallbroker(): boolean;
getPlatformDesc(): string;
getEntryInfo(): string;
getFaasAddr(): string;
getUserData(): Promise<any>;
refreshUserDataTokens(): Promise<void>;
reportJSExceptionStringToTDM(content: string): void;
reportStringToTDM(content: string, tag: string): void;
reportNumberToTDM(tag: string): void;
faasReportStringToTDM(content: string, tag: string): Promise<any>;
faasReportNumberToTDM(tag: string): Promise<any>;
setDataStash(dataKey: string, dataValue: string): Promise<void>;
getDataStash(dataKey: string): Promise<string>;
clearDataStash(): Promise<void>;
writeCookie(customerName: string, content: string): Promise<void>;
writeRoleCookie(customerName: string, content: string): Promise<void>;
readCookie(customerName: string): Promise<string>;
readRoleCookie(customerName: string): Promise<string>;
deleteCookie(customerName: string): 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(): 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): void;
gameCustomFunction(functionName: string, ...args: any[]): Promise<any>;
reportStatsV2(iType: number, iChangjingId: string, iGoodsId: string, iCountId: number, iFee: number, iFlowId: number, extendList?: Array<Object> | undefined, appId?: number): void;
reportMonitorV2(tag: string, content: string, itype: number): void;
setGameletAppEnv(appInfo: object, isProductEnvironment?: boolean): void;
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 UEGameletAPI: {
getInstance: () => UEGameletAPIImpl;
};
export {};