import { BalancyAuthResponseData, BalancyLinkResponseData, BalancyPurchaseProductResponseData, Core, BalancyProduct } from '../../../wasm/dist';
import { BalancyStatus, CMS, Nullable } from './index';
import { AdsAdType } from '../enums';
import { SmartObjectsItem, SmartObjectsOfferGroupInfo, SmartObjectsOfferInfo, SmartObjectsShopSlot, SmartObjectsStoreItem, SmartObjectsAnalyticsABTest, SmartObjectsAnalyticsABTestVariant } from '../liveops';
import { BalancyProductInfo } from './actions.class';
export declare enum ProductType {
    Consumable = 1,
    NonConsumable = 2,
    Subscription = 3
}
export declare class Product {
    productId: string;
    platformProductId: string;
    name: string;
    description: string;
    price: number;
    type: ProductType;
    constructor(productId: string, platformProductId: string, name: string, description: string, price: number, type: ProductType);
    static fromBalancyProduct(balancyProduct: BalancyProduct): Product;
}
export declare class ProductsResponse {
    products: Product[];
    success: boolean;
    errorCode: number;
    errorMessage: string;
    constructor(products: Product[], success: boolean, errorCode: number, errorMessage: string);
}
export declare class ProductResponse {
    product: Product | null;
    success: boolean;
    errorCode: number;
    errorMessage: string;
    constructor(product: Product | null, success: boolean, errorCode: number, errorMessage: string);
}
export declare class BalancyPaymentInfo {
    price: number;
    receipt: string;
    productId: string;
    currency: string;
    orderId: string;
    constructor(price: number, receipt: string, productId: string, currency: string, orderId: string);
}
export declare class APILocalization {
    private readonly wasm;
    private static instance;
    constructor(wasm: Core);
    static getLocalizedValue(key: string): string;
    static changeLocalization(code: string): void;
    static getCurrentLocalizationCode(): string;
    static getAllLocalizationCodes(): string[];
}
export declare class APIInventory {
    private static instance;
    static setInstance(apiInstance: API): void;
    static addItems(item: Nullable<SmartObjectsItem>, amount: number): number;
    static removeItems(item: Nullable<SmartObjectsItem>, amount: number): number;
    static getTotalItemsCount(item: Nullable<SmartObjectsItem>): number;
}
declare class APIAuth {
    private static instance;
    static setInstance(apiInstance: API): void;
    static withNameAndPassword(name: string, password: string, callback: (responseData: BalancyAuthResponseData) => void): void;
}
declare class APILink {
    private static instance;
    static setInstance(apiInstance: API): void;
    static withNameAndPassword(name: string, password: string, forceLink: boolean, callback: (responseData: BalancyLinkResponseData) => void): void;
}
declare class APIGeneral {
    private static instance;
    static setInstance(apiInstance: API): void;
    static levelStarted(): void;
    static levelCompleted(): void;
    static levelFailed(): void;
}
export declare class APIDebug {
    private static instance;
    static setInstance(apiInstance: API): void;
    static setCompiledScripts(scripts: string): void;
}
export declare class APIVisualScripting {
    private static instance;
    static setInstance(apiInstance: API): void;
    /**
     * Run a visual script by its CMS ID.
     * @param scriptId The script's ID in the CMS.
     * @param launcherId Optional identifier for who launched the script (e.g., a GameEvent UnnyId).
     * @param input Optional object with input parameters keyed by port name. Will be JSON-serialized.
     * @param onComplete Optional callback invoked when the script finishes, receiving the exit port name and output values.
     * @returns The instance ID of the running script, or empty string on failure.
     */
    static runScriptById(scriptId: string, launcherId?: string, input?: Record<string, unknown>, onComplete?: (exitPort: string, outputs: Record<string, unknown>) => void): string;
    /**
     * Run a visual script by its name.
     * @param scriptName The script's name in the CMS.
     * @param launcherId Optional identifier for who launched the script.
     * @param input Optional object with input parameters keyed by port name. Will be JSON-serialized.
     * @param onComplete Optional callback invoked when the script finishes, receiving the exit port name and output values.
     * @returns The instance ID of the running script, or empty string on failure.
     */
    static runScriptByName(scriptName: string, launcherId?: string, input?: Record<string, unknown>, onComplete?: (exitPort: string, outputs: Record<string, unknown>) => void): string;
    /**
     * Stop a running visual script by its instance ID.
     * @param instanceId The instance ID returned from runScriptById/runScriptByName.
     * @returns True if the script was found and stopped.
     */
    static stopScript(instanceId: string): boolean;
}
export declare class API {
    readonly wasm: Core;
    readonly cms: CMS;
    static Localization: typeof APILocalization;
    static Inventory: typeof APIInventory;
    static Auth: typeof APIAuth;
    static Link: typeof APILink;
    static General: typeof APIGeneral;
    static Debug: typeof APIDebug;
    static Scripts: typeof APIVisualScripting;
    private static instance;
    private localizationInstance;
    private static status;
    constructor(wasm: Core, cms: CMS);
    static getStatus(): BalancyStatus;
    static trackAdRevenue(type: AdsAdType, revenue: number, placement: string): void;
    static softPurchaseStoreItem(storeItem: SmartObjectsStoreItem): boolean;
    static softPurchaseShopSlot(shopSlot: SmartObjectsShopSlot): boolean;
    static softPurchaseGameOffer(offerInfo: SmartObjectsOfferInfo): boolean;
    static softPurchaseGameOfferGroup(offerGroupInfo: SmartObjectsOfferGroupInfo, storeItem: SmartObjectsStoreItem): boolean;
    static setTimeCheatingOffset(seconds: number): void;
    static getTimeCheatingOffset(): number;
    /**
     * Sets a custom UTC time provider that overrides the SDK's internal server time.
     * The callback should return the current UTC time as seconds since Unix epoch.
     * This works in all environments including production.
     */
    static setCustomUTCTimeProvider(provider: () => number): void;
    /**
     * Removes the custom UTC time provider and returns to the SDK's internal server time.
     */
    static resetCustomUTCTimeProvider(): void;
    static prepareWebView(onReady?: () => void): void;
    static showWebView(): void;
    static hideWebView(): void;
    static startAbTestManually(abTest: Nullable<SmartObjectsAnalyticsABTest>, variant: Nullable<SmartObjectsAnalyticsABTestVariant>): boolean;
    static notifyAppPause(secondsElapsed: number): void;
    static notifyAppResume(): void;
    static hardPurchaseStoreItem(storeItem: SmartObjectsStoreItem, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void;
    static hardPurchaseShopSlot(shopSlot: SmartObjectsShopSlot, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void;
    static hardPurchaseGameOffer(offerInfo: SmartObjectsOfferInfo, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void;
    static hardPurchaseGameOfferGroup(offerGroupInfo: SmartObjectsOfferGroupInfo, storeItem: SmartObjectsStoreItem, paymentInfo: BalancyPaymentInfo, callback: (responseData: BalancyPurchaseProductResponseData) => void, requireValidation: boolean): void;
    static getProducts(callback: (response: ProductsResponse) => void): void;
    static getProduct(productId: string, callback: (response: ProductResponse) => void): void;
    private toNative;
    private static callbacks;
    static hardPurchase(productInfo: BalancyProductInfo, callback: (success: boolean, errorMessage: string) => void): void;
    static initPurchase(storeItem: Nullable<SmartObjectsStoreItem>, callback: (success: boolean, errorMessage: string) => void): void;
    static initPurchaseShop(shopSlot: Nullable<SmartObjectsShopSlot>, callback: (success: boolean, errorMessage: string) => void): void;
    static initPurchaseOffer(offerInfo: Nullable<SmartObjectsOfferInfo>, callback: (success: boolean, errorMessage: string) => void): void;
    static initPurchaseOfferGroup(offerGroupInfo: Nullable<SmartObjectsOfferGroupInfo>, storeItem: Nullable<SmartObjectsStoreItem>, callback: (success: boolean, errorMessage: string) => void): void;
    private static getCallbackData;
    static finalizedHardPurchase(success: boolean, productInfo: BalancyProductInfo, paymentInfo: BalancyPaymentInfo | null): void;
    private static reportHardPurchase;
}
export {};
//# sourceMappingURL=balancy-api.class.d.ts.map