import { PurchaseUpdatesRequest } from '../types/IAPTypes'; /** * useIapPurchaseUpdates hook should be called in your main screen component. This hook automatically invokes * getPurchaseUpdates API and populates states during main screen launch and App state transitions from BG -> FG. * "iapPurchaseUpdates" state returned by this hook has unfulfilled and canceled consumable purchases. * Amazon recommends that you persist the returned PurchaseUpdates data and query the system only * for updates by calling the hook with reset flag being false. * * This hook ensures to keep getting you latest purchase updates. * * ```ts * Sample Usage: * export const AppMainPage = () => { * // Calling useIapPurchaseUpdates in main screen * const {iapPurchaseUpdatesLoading, iapPurchaseUpdatesError, iapPurchaseUpdates} = * useIapPurchaseUpdates({ reset: false }); * ... * ... * // Once PurchaseUpdates is loaded, call handler * if (!iapPurchaseUpdatesLoading) { * if (iapPurchaseUpdatesError) { * // Handle Error based on iapPurchaseUpdates.responseCode * ... * } else { * // Persist the iapPurchaseUpdates.receiptList and fulfill the purchases. * ... * } * } * ... * } * ``` * * @param purchaseUpdatesRequest Purchase Updates request parameters * @returns States and value of Purchase updates */ export declare const useIapPurchaseUpdates: (purchaseUpdatesRequest: PurchaseUpdatesRequest) => { iapPurchaseUpdatesLoading: any; iapPurchaseUpdatesError: any; iapPurchaseUpdates: any; };