import type { StatusResponse, ValidateReceiptRequest, ValidateReceiptResponse, ValidatePurchaseRequest, ValidatePurchaseResponse, PurchaseStatusResponse, EntitlementResponse, EntitlementsResponse } from '@onesub/shared'; /** * Checks the subscription status for a given user from the onesub server. */ export declare function checkStatus(serverUrl: string, userId: string): Promise; /** * Validates a subscription receipt with the onesub server. * The server handles Apple/Google verification and stores the subscription. */ export declare function validateReceipt(serverUrl: string, receipt: ValidateReceiptRequest): Promise; /** * Validates a consumable or non-consumable product purchase with the onesub server. * The server verifies the Apple/Google receipt and records the purchase. */ export declare function validatePurchase(serverUrl: string, request: ValidatePurchaseRequest): Promise; /** * Checks the purchase status for a given user from the onesub server. * Optionally filter by productId. */ export declare function checkPurchaseStatus(serverUrl: string, userId: string, productId?: string): Promise; /** * Check a single entitlement for a user. Returns `{ active: false, source: null }` * when the user has no matching record, or throws on transport / server error. * * Returns 404 errorCode `ENTITLEMENT_NOT_FOUND` when the id is unknown to the * server (config mismatch). The throw differentiates this from "user not entitled". */ export declare function checkEntitlement(serverUrl: string, userId: string, id: string): Promise; /** * Check all entitlements configured on the server in one round-trip. * Use on app launch / login to populate the entitlements map. * * Returns `{ entitlements: {} }` when the server has no entitlements * configured (the route is not mounted, returning 404 — surfaced here as an * empty map rather than a throw, since "no entitlements configured" is a * valid runtime state, not an error). */ export declare function checkEntitlements(serverUrl: string, userId: string): Promise; //# sourceMappingURL=api.d.ts.map