declare namespace qg {

    interface isEnvReadyReq {
        applicationID: string;
    }
	
	interface isSandboxActivatedReq {
        applicationID: string;
    }
	
	interface productInfoReq {
		applicationID: string;
        priceType: number;
		productIds: string[];
    }
	
	interface purchaseIntentReq {
        applicationID: string;
		productId: string;
		priceType: number;
		publicKey: string;
		developerPayload ?: string;
    }
	
	interface consumeOwnedPurchaseReq {
        applicationID: string;
		purchaseToken : string;
		publicKey: string;
		developerPayload ?: string;
    }
	
	interface ownedPurchasesReq {
		applicationID : string;
        priceType: number;
		publicKey : string;
    }
	
	interface ownedPurchasesRecordReq {
		applicationID : string;
        priceType: number;
		publicKey : string;
    }
	

   
	function setKeepScreenOn(param:{keepScreenOn:boolean,success?:Function,fail?:Function,complete?:Function});
	function gameLogin(param:{forceLogin:number,appid:string,success?:Function,fail?:Function,complete?:Function});
	function gameLoginWithReal(param:{forceLogin:number,appid:string,success?:Function,fail?:Function,complete?:Function});
	function isEnvReady(param:{isEnvReadyReq:isEnvReadyReq,success?:Function,fail?:Function});
	function isSandboxActivated(param:{isSandboxActivatedReq:isSandboxActivatedReq,success?:Function,fail?:Function});
	function obtainProductInfo(param:{productInfoReq:productInfoReq,success?:Function,fail?:Function});
	function createPurchaseIntent(param:{purchaseIntentReq:purchaseIntentReq,success?:Function,fail?:Function});
	function consumeOwnedPurchase(param:{consumeOwnedPurchaseReq:consumeOwnedPurchaseReq,success?:Function,fail?:Function});
	function obtainOwnedPurchases(param:{ownedPurchasesReq:ownedPurchasesReq,success?:Function,fail?:Function});
	function obtainOwnedPurchaseRecord(param:{ownedPurchasesRecordReq:ownedPurchasesRecordReq,success?:Function,fail?:Function});
	function setUnderAgeOfPromise(underAgeOfPromise:boolean);
	function createRewardedVideoAd(param:{adUnitId:string,multiton?:boolean,success?:Function,fail?:Function,complete?:Function});
	function serviceShare(param:{shareType:number,title?:string,summary?:string,targetUrl?:string,imagePath?:string,mediaUrl?:string,platforms?:string[],success?:Function,fail?:Function,cancel?:Function});
	function hasShortcutInstalled(param:{success?:Function,fail?:Function,complete?:Function});
	function installShortcut(param:{message?:string,success?:Function,fail?:Function,complete?:Function});
	function getClipboardData(param:{success?:Function,fail?:Function,complete?:Function});
	function setClipboardData(param:{data:string,success?:Function,fail?:Function,complete?:Function});
	function launchNativeApp(param:{packageName:string,success?:Function,fail?:Function,complete?:Function})
	function onShow(callback: Function);
}