API reference
Hand-curated reference for v0.1.x. Auto-generated docs ship in v0.2 (TypeDoc).
Modules
| Page | Contents |
|---|---|
createIAP | Factory function; entry point |
IAP instance | All instance methods |
| Types | Product, EntitlementBase, NativeTransaction, VerifiedTransaction, PurchaseResult, RestoreResult |
| Errors | IAPError, IAPErrorCode, errorHint, isIAPError |
BackendAdapter | Interface for custom transports |
| Events reference | EventMap, EventName, EventPayload, Unsubscribe |
Top-level exports
typescript
import {
// Factory
createIAP,
type IAP,
// Errors
IAPError,
IAPErrorCode,
isIAPError,
// Config
type IAPConfig,
type IAPConfigInput,
type BackendConfig,
type BackendConfigInput,
type StorageConfig,
type OptionsConfig,
// Domain types
type ConfiguredProduct,
type Product,
type ProductType,
type EntitlementBase,
type DefaultEntitlement,
type NativeTransaction,
type VerifiedTransaction,
type Platform,
type PurchaseResult,
type RestoreResult,
// Events
type EventMap,
type EventName,
type EventPayload,
type Unsubscribe,
// Logging
type Logger,
type LogLevel,
// Backend (advanced)
type BackendAdapter,
type RestoreRequest,
type RestoreRequestTransaction,
type VerifyAppleRequest,
type VerifyGoogleRequest,
type VerifyResponse,
HttpBackendAdapter,
HttpClient,
type HttpRequest,
// Version
VERSION,
} from '@nossdev/iap';Stability
- Stable —
createIAP,IAPinterface methods, allEntitlementBase/Product/PurchaseResult/RestoreResulttypes, everyIAPErrorCodevalue, every event inEventMap. These follow semver. - Stable but advanced —
BackendAdapter,HttpBackendAdapter,HttpClient. Public so non-HTTP transports can be implemented; we reserve the right to add new methods toBackendAdapterin minor versions (additive only). - Internal — anything not listed in
src/index.tsis private. Don't import from deep paths.