import * as IAPTypes from "./types/IAPTypes.js"; /** * Presents the primary API for interacting with the Amazon Appstore purchasing framework. */ export declare class PurchasingService { /** * Initiates a purchase-flow for a product. * * @param purchaseRequest - Input parameters for purchase. * @returns - Response containing the receipts data and status of the request. */ static purchase(purchaseRequest: IAPTypes.PurchaseRequest): Promise; /** * Initiates a modifySubscription request for a subscription. * * @param modifySubsRequest - Input parameters for Modify subscription. * @return - Response containing the list of receipts data(if succeeded) and status of the request. */ static modifySubscription(modifySubsRequest: IAPTypes.ModifySubscriptionRequest): Promise; /** * Initiates a request to retrieve updates about items the customer has purchased and/or canceled. * * Usage Pattern: * 1) To ensure getting latest purchase updates, Amazon recommends invoking getPurchaseUpdates API in * your app's main screen launch and when App transitions from background to foreground (BG -> FG). * * To simplify this process, leverage the provided usePurchaseUpdates hook from this package. By * calling this hook in your main screen component, the hook will automatically trigger the * getPurchaseUpdates API when the main screen is launched or when the app transitions from BG -> FG. * * 2) Beyond this main screen use case, your app may have specific use cases related to purchases. For * these tailored scenarios, utilize this getPurchaseUpdates API. * * @param purchaseUpdatesRequest - Input parameters. * @returns - Response containing the receipts data and status of the request. */ static getPurchaseUpdates(purchaseUpdatesRequest: IAPTypes.PurchaseUpdatesRequest): Promise; /** * Initiates a request to retrieve item data of up to one-hundred SKUs. * * Usage Pattern: * 1) getProductData is typically called during product page launch for getting and displaying IAP product * info (like Price) for a set of SKUs. * * To simplify this process, leverage the provided useIapProductData hook from this package. By * calling this hook in your product page component, the hook will automatically trigger the * getPurchaseUpdates API when the product page is launched. * * 2) Beyond this product page use case, your app may have specific use cases related to IAP Products. For * these tailored scenarios, utilize this getProductData API. * * @param productDataRequest - Input parameters. * @returns - Response containing the product data and status of the request. */ static getProductData(productDataRequest: IAPTypes.ProductDataRequest): Promise; /** * Notifies Amazon about the purchase fulfillment. * @param notifyFulfillmentRequest - Input parameters. * @returns - Response containing the status of notify fulfillment request. */ static notifyFulfillment(notifyFulfillmentRequest: IAPTypes.NotifyFulfillmentRequest): Promise; /** * Initiates a request to retrieve the user ID of the currently logged-in user. * * Usage Pattern: * 1) To ensure retrieving the receipts for the current user account, Amazon recommends * invoking getUserData API in your app's main screen launch and when App transitions from * background to foreground (BG -> FG). * * To simplify this process, leverage the provided useUserData hook from this package. By * calling this hook in your main screen component, the hook will automatically trigger the * getUserData API when the main screen is launched or when the app transitions from BG -> FG. * * 2) Beyond this main screen use case, your app may have specific use cases related to user-id. For * these tailored scenarios, utilize this getUserData API. * * @param userDataRequest - Input parameters. * @returns - Response containing the user data and response code. */ static getUserData(userDataRequest: IAPTypes.UserDataRequest): Promise; /** * Initiates the request to retrieve an auth code for user profile access * * @returns - Response containing the auth code for user profile access and response code. */ static requestUserProfileAccess(): Promise; }