/** API route paths */ export declare const ROUTES: { readonly VALIDATE: "/onesub/validate"; readonly STATUS: "/onesub/status"; readonly WEBHOOK_APPLE: "/onesub/webhook/apple"; readonly WEBHOOK_GOOGLE: "/onesub/webhook/google"; readonly VALIDATE_PURCHASE: "/onesub/purchase/validate"; readonly PURCHASE_STATUS: "/onesub/purchase/status"; readonly ENTITLEMENT: "/onesub/entitlement"; readonly ENTITLEMENTS: "/onesub/entitlements"; readonly METRICS_ACTIVE: "/onesub/metrics/active"; readonly METRICS_STARTED: "/onesub/metrics/started"; readonly METRICS_EXPIRED: "/onesub/metrics/expired"; /** Non-consumable purchases started in the window (purchasedAt-based). */ readonly METRICS_PURCHASES_STARTED: "/onesub/metrics/purchases/started"; readonly ADMIN_SUBSCRIPTIONS: "/onesub/admin/subscriptions"; /** Single-record detail; takes :transactionId path param. */ readonly ADMIN_SUBSCRIPTION_DETAIL: "/onesub/admin/subscriptions/:transactionId"; /** Per-user profile bundle (subs + purchases + entitlements); takes :userId path param. */ readonly ADMIN_CUSTOMER_DETAIL: "/onesub/admin/customers/:userId"; /** Sync a subscription from Apple Status API; takes :originalTransactionId path param. */ readonly ADMIN_SYNC_APPLE: "/onesub/admin/sync-apple/:originalTransactionId"; /** * Sandbox-only entitlement overrides for manual testing. Listing endpoint. * Apple gives no way to cancel a sandbox subscription bought with a real * Apple Account, so a tester who subscribes once stays entitled until the * store expires it on its own. These let a tester force "not entitled" * without waiting. They apply ONLY to Sandbox receipts. */ readonly ADMIN_TEST_OVERRIDES: "/onesub/admin/test-overrides"; /** Set/clear one override; takes :userId path param. */ readonly ADMIN_TEST_OVERRIDE: "/onesub/admin/test-overrides/:userId"; /** Sign an Apple Promotional Offer payload (requires apple.offerKeyId + offerPrivateKey). */ readonly APPLE_OFFER_SIGNATURE: "/onesub/apple/offer-signature"; }; /** Default server port */ export declare const DEFAULT_PORT = 4100; /** Subscription status values */ export declare const SUBSCRIPTION_STATUS: { readonly ACTIVE: "active"; /** Payment failed but the store still grants access while retrying. Treat as entitled. */ readonly GRACE_PERIOD: "grace_period"; /** Payment failed; retry/grace window expired; entitlement REVOKED until user fixes payment. */ readonly ON_HOLD: "on_hold"; /** User-voluntary pause (Google only); entitlement REVOKED until autoResumeTime or manual resume. */ readonly PAUSED: "paused"; readonly EXPIRED: "expired"; readonly CANCELED: "canceled"; readonly NONE: "none"; }; /** Purchase type values */ export declare const PURCHASE_TYPE: { readonly CONSUMABLE: "consumable"; readonly NON_CONSUMABLE: "non_consumable"; readonly SUBSCRIPTION: "subscription"; }; /** * Canonical error codes returned by the server and thrown by the SDK. * Clients should branch on these machine-readable codes rather than parsing * human-readable `error` strings. The `OneSubError` class in `@jeonghwanko/onesub-sdk` * carries one of these in its `.code` property. */ export declare const ONESUB_ERROR_CODE: { readonly INVALID_INPUT: "INVALID_INPUT"; readonly APPLE_CONFIG_MISSING: "APPLE_CONFIG_MISSING"; readonly GOOGLE_CONFIG_MISSING: "GOOGLE_CONFIG_MISSING"; readonly USER_ID_TOO_LONG: "USER_ID_TOO_LONG"; readonly RECEIPT_VALIDATION_FAILED: "RECEIPT_VALIDATION_FAILED"; readonly NO_RECEIPT_DATA: "NO_RECEIPT_DATA"; readonly UNAUTHORIZED: "UNAUTHORIZED"; readonly INVALID_ADMIN_SECRET: "INVALID_ADMIN_SECRET"; readonly TRANSACTION_BELONGS_TO_OTHER_USER: "TRANSACTION_BELONGS_TO_OTHER_USER"; readonly TRANSACTION_NOT_FOUND: "TRANSACTION_NOT_FOUND"; readonly NON_CONSUMABLE_ALREADY_OWNED: "NON_CONSUMABLE_ALREADY_OWNED"; readonly MISSING_SIGNED_PAYLOAD: "MISSING_SIGNED_PAYLOAD"; readonly INVALID_SIGNED_PAYLOAD: "INVALID_SIGNED_PAYLOAD"; readonly MISSING_MESSAGE_DATA: "MISSING_MESSAGE_DATA"; readonly PACKAGE_NAME_MISMATCH: "PACKAGE_NAME_MISMATCH"; readonly BUNDLE_ID_MISMATCH: "BUNDLE_ID_MISMATCH"; readonly ENTITLEMENT_NOT_FOUND: "ENTITLEMENT_NOT_FOUND"; readonly ENTITLEMENTS_NOT_CONFIGURED: "ENTITLEMENTS_NOT_CONFIGURED"; readonly INTERNAL_ERROR: "INTERNAL_ERROR"; readonly STORE_ERROR: "STORE_ERROR"; readonly WEBHOOK_PROCESSING_FAILED: "WEBHOOK_PROCESSING_FAILED"; readonly NOT_IN_PROVIDER: "NOT_IN_PROVIDER"; readonly RN_IAP_NOT_INSTALLED: "RN_IAP_NOT_INSTALLED"; readonly PRODUCT_NOT_FOUND: "PRODUCT_NOT_FOUND"; readonly PURCHASE_TIMEOUT: "PURCHASE_TIMEOUT"; readonly USER_CANCELLED: "USER_CANCELLED"; readonly CONCURRENT_PURCHASE: "CONCURRENT_PURCHASE"; readonly PROVIDER_UNMOUNTED: "PROVIDER_UNMOUNTED"; readonly NETWORK_ERROR: "NETWORK_ERROR"; }; /** Union of all canonical error code string literals. */ export type OneSubErrorCode = typeof ONESUB_ERROR_CODE[keyof typeof ONESUB_ERROR_CODE]; /** * Receipt string prefixes that the mock providers (when `config.{apple,google}.mockMode` * is true) interpret as specific test scenarios. Send one of these as the * `receipt` field to exercise the corresponding code path without real store * credentials. Anything not matching these prefixes is treated as a valid * receipt (deterministic fake transactionId derived from the string). */ export declare const MOCK_RECEIPT_PREFIX: { readonly REVOKED: "MOCK_REVOKED"; readonly EXPIRED: "MOCK_EXPIRED"; readonly INVALID: "MOCK_INVALID"; readonly BAD_SIG: "MOCK_BAD_SIG"; readonly NETWORK_ERROR: "MOCK_NETWORK_ERROR"; readonly SANDBOX: "MOCK_SANDBOX"; }; //# sourceMappingURL=constants.d.ts.map