import { ApiClient } from '../utils/api'; import { PurchaseItem, PurchaseURLOptions, Transaction, TipURLOptions } from '../types'; /** * Service for handling purchases and transactions * * IMPORTANT: Before using methods that require authentication (like getPurchasedItems), * ensure that a valid session has been initialized through AuthService.initializeGameServer(). * Without a valid session token, these methods will return empty results. */ export declare class PurchaseService { private apiClient; private gameId; private storeBaseUrl; constructor(apiClient: ApiClient, gameId: string, storeBaseUrl: string); /** * Get the store catalog for a game * @returns Promise resolving to an array of purchasable items */ getCatalog(): Promise; /** * Get a specific item by ID * @param itemId Item ID * @returns Promise resolving to the item or null if not found */ getItem(itemId: string): Promise; /** * Generate a purchase URL without initiating a purchase * This URL can be used to redirect the user to the web store to complete the purchase * * @param options Purchase URL options including itemId and sessionToken * @returns The generated purchase URL */ generatePurchaseURL(options: PurchaseURLOptions): string; /** * Generate a tip URL for users to give a tip to the developer * * @param options Tip URL options including sessionToken and gameId * @returns The generated tip URL */ generateTipURL(options: TipURLOptions): string; /** * Get purchased items for the current user * @returns Promise resolving to an array of purchased items */ getPurchasedItems(): Promise; /** * Get transaction history for the current user * @returns Promise resolving to an array of transactions */ getTransactionHistory(): Promise; /** * Sync transaction history from the server for the current user * @returns Promise resolving to a boolean indicating success */ syncTransactionHistory(): Promise; } //# sourceMappingURL=PurchaseService.d.ts.map