Skip to content

docs: cross-link wrapper SDKs + doc pages to openiap.dev API references#107

Merged
hyochan merged 26 commits into
mainfrom
docs/openiap-dev-references-all-libs
Apr 26, 2026
Merged

docs: cross-link wrapper SDKs + doc pages to openiap.dev API references#107
hyochan merged 26 commits into
mainfrom
docs/openiap-dev-references-all-libs

Conversation

@hyochan
Copy link
Copy Markdown
Member

@hyochan hyochan commented Apr 26, 2026

Summary

  • Add doc comments on every public OpenIAP API across all wrapper SDKs (apple, google, react-native-iap, expo-iap, flutter, kmp, godot) linking to www.openiap.dev/docs/apis/; full @param/@returns/@throws/@example for the 5 core funcs (initConnection, fetchProducts, requestPurchase, finishTransaction, getAvailablePurchases). Preserves original Apple StoreKit / @platform / @example content.
  • GraphQL schema descriptions get canonical URLs, propagated to every generated Types file via codegen.
  • Docs site (~70 API + Type pages) get a one-paragraph iOS/Android behaviour blurb with Apple/Google reference links.
  • Mobile/tablet UI fixes: CodeBlock badge attached as tab-bar (no overlap with scrolling code), sidebar drawer below sticky nav (no z-index collision with hamburger), sidebar margin-left clamped so the centering offset doesn't shove it right at 768–1400px.

Test plan

  • swift build — packages/apple
  • ./gradlew :openiap:compilePlayDebugKotlin — packages/google
  • ./gradlew :library:compileKotlinMetadata — kmp-iap
  • bun run lint:tsc — expo-iap
  • yarn typecheck — react-native-iap (pre-existing example-expo errors unrelated)
  • dart analyze lib — flutter_inapp_purchase
  • bun run build — packages/docs (vite + tsc)
  • Visual QA: mobile sidebar opens, drawer items clickable, code block badge stays inside the tab bar at narrow widths
  • Visual QA: tablet 768–1300px viewport — sidebar stays at left edge, content fills the rest

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Massive cross-SDK docs refresh: clearer API semantics, platform-specific behavior notes, event-driven purchase flow guidance (listener-delivered outcomes), timing/acknowledgement rules, deprecation guidance (prefer verifyPurchase), expanded examples, and many OpenIAP/Apple/Google reference links.
  • Style
    • Docs UI improvements: revamped code-block header/tabs and sidebar/responsive layout for better navigation.
  • Bug Fixes
    • Adjusted fetchProducts default behavior: omitting type now defaults to in-app products.

Comprehensive doc-comment + doc-page enrichment so every public OpenIAP
API surfaces a link to its canonical reference, with iOS/Android-specific
behaviour notes.

Wrapper SDKs (Apple, Google, react-native-iap, expo-iap, flutter, kmp,
godot): added KDoc/JSDoc/Dartdoc/Swiftdoc/GDdoc on every public API
function with a one-line summary and a `@see` link to
www.openiap.dev/docs/apis/<symbol>. The 5 most-used cross-platform calls
(initConnection, fetchProducts, requestPurchase, finishTransaction,
getAvailablePurchases) get full @param/@returns/@throws/@example blocks.
Original rich docs (Apple StoreKit references, @platform tags, examples)
were preserved during the merge.

GraphQL schema (api.graphql, api-ios.graphql, api-android.graphql):
descriptions now include the canonical doc URL, propagated to every
generated Types file via codegen.

Docs site (packages/docs):
- API + Type pages (~70) get a one-paragraph iOS/Android behaviour
  blurb with links to the corresponding Apple StoreKit / Google Play
  Billing reference.
- Mobile/tablet UI fixes:
  - CodeBlock language badge + Copy button rendered as a tab-bar
    attached to the top of the code block (no more floating overlap
    over horizontally scrolling code).
  - Mobile sidebar drawer starts below the sticky top nav (top: 56px)
    so taps on the drawer no longer collide with the nav's hamburger
    menu; z-indexes raised to 9000/9001/8999 to remove ambiguity.
  - Sidebar margin-left clamped to non-positive so the desktop
    centering offset stops shoving the sidebar to the right of the
    viewport in the 768-1400px tablet range.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@hyochan hyochan added cross-platform Cross-platform (both Android & iOS) 📖 documentation Improvements or additions to documentation labels Apr 26, 2026
@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

/gemini review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Large, cross‑SDK documentation and docs‑site update: JSDoc/KDoc/SwiftDoc/DartDoc/GDScript and website pages expanded to clarify platform behaviors, parameter semantics, event‑driven purchase flows, deprecations, and OpenIAP reference links. One internal change: OpenIapModule.fetchProducts default branch now treats omitted params.type as .inApp (was .all).

Changes

Cohort / File(s) Summary
Core TypeScript libraries
libraries/expo-iap/src/index.ts, libraries/expo-iap/src/modules/...ts, libraries/expo-iap/src/types.ts, libraries/expo-iap/src/useIAP.ts
Expanded JSDoc/KDoc: clarified SKU/type semantics, listener-driven purchase outcomes, platform notes, deprecations, and added @see links. No signature/logic changes.
React Native SDK
libraries/react-native-iap/src/index.ts, libraries/react-native-iap/src/hooks/useIAP.ts, libraries/react-native-iap/src/types.ts
Rewrote public JSDoc for fetch/request/finish/verify flows and hook return types; added examples, platform specifics, @throws, and OpenIAP @see links. Docs only.
Flutter / Dart
libraries/flutter_inapp_purchase/lib/flutter_inapp_purchase.dart, libraries/flutter_inapp_purchase/lib/types.dart
Updated DartDoc across lifecycle, product/purchase, verification, and deprecation notes; clarified event vs promise semantics. No behavior changes.
Godot / GDScript
libraries/godot-iap/addons/godot-iap/godot_iap.gd, libraries/godot-iap/addons/godot-iap/types.gd
Expanded GDScript docstrings mapping methods to native SDKs, clarified event-driven outcomes, timing constraints, and deprecations. Docs only.
Kotlin / KMP
libraries/kmp-iap/library/src/.../InAppPurchaseAndroid.kt, .../InAppPurchaseIOS.kt, .../openiap/Types.kt
Added/rewrote KDoc for public APIs and resolver types: timing/ordering constraints, alternative-billing notes, verification semantics, and OpenIAP links. No signature changes.
Swift / Apple
packages/apple/Sources/Models/Types.swift, packages/apple/Sources/OpenIapModule.swift
Extensive SwiftDoc additions for resolver protocols and module APIs; note: internal default in fetchProducts changed to treat omitted type as .inApp. Otherwise docs/see-links added; public signatures unchanged.
OpenIap Store (Kotlin)
packages/google/openiap/src/main/java/.../OpenIapStore.kt, .../Types.kt
Reworded KDoc mapping methods to BillingClient/Play behaviors (ack/consume windows, token/reporting guidance). Comments/links only.
GraphQL schema docs
packages/gql/src/api.graphql, packages/gql/src/api-android.graphql, packages/gql/src/api-ios.graphql
Refined field docstrings with platform semantics, deprecation guidance (validateReceipt → verifyPurchase), and OpenIAP links. Schema types unchanged.
Docs — API pages
packages/docs/src/pages/docs/apis/... (many files; e.g., fetch-products.tsx, request-purchase.tsx, finish-transaction.tsx, init-connection.tsx, end-connection.tsx, restore-purchases.tsx, deep-link-to-subscriptions.tsx, Android/iOS pages)
Added platform-specific implementation notes (StoreKit/Play Billing), examples, version gates, new Parameters/Returns/Throws anchors, and external refs. Content-only changes.
Docs — Types / pages
packages/docs/src/pages/docs/types/... (product, purchase, storefront, verify-purchase, subscription types, Android/iOS types)
Added cross‑platform type mapping notes, platform scoping, managed‑provider guidance, and OpenIAP links. Rendering/text changes only.
Docs — Android API pages
packages/docs/src/pages/docs/apis/android/... (acknowledge/consume/alternative-billing/create-.../is-billing-program-available/launch-external-link/enable-billing-program)
Clarified BillingClient wrapper mappings, Play Billing version notes, 3‑day ack/consume rules, token reporting windows, and alternative-billing semantics. Docs only.
Docs — iOS API pages
packages/docs/src/pages/docs/apis/ios/... (sync, refund, storefront, transactions, promoted product, external purchase flows, code redemption, receipt validation)
Added StoreKit 2 mappings, iOS version requirements, JWS/receipt guidance, pending/unfinished transaction semantics, and deprecation notes. Content-only updates.
Docs — types & UI
packages/docs/src/components/CodeBlock.tsx, packages/docs/src/styles/*.css, many docs type pages
Refactored code-block header layout and type linkification (clickable type refs), adjusted sidebar/drawer z-index/geometry for responsive UI; CodeBlock linkification logic updated. UI/rendering and doc text changes.
Docs audit tooling
scripts/audit-docs.ts, package.json, knowledge/internal/07-docs-consistency.md, CLAUDE.md
Added docs consistency guide and scripts/audit-docs.ts with new audit:docs script; script enforces doc→type/page link and field consistency (warnings and hard failures). New tooling file added.

Sequence Diagram(s)

(Skipped — changes are documentation, style, and tooling; no new multi-component runtime control flow introduced that requires visualization.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I hopped through files and left neat tracks,
Across Swift, Dart, Kotlin, JS and hacks.
Links and notes in tidy rows,
Guiding devs where purchase flows.
A tiny burrow of docs — ready to grow!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 72.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the primary change: adding cross-links between wrapper SDKs, doc pages, and openiap.dev API references throughout the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/openiap-dev-references-all-libs

CI Format check failed because the API/Type page enrichment paragraphs
were inserted with hand-rolled JSX wrapping that didn't match this
repo's Prettier config. Re-ran `bunx prettier --write` on the 10 flagged
files; result is purely whitespace/wrap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🧹 Nitpick comments (3)
packages/docs/src/styles/documentation.css (1)

947-976: Consider overscroll-behavior: contain on the mobile drawer.

The desktop sticky sidebar (line 27) has overscroll-behavior: contain, but the mobile drawer redeclaration here doesn't. When the drawer is scrolled to top/bottom, scroll events can chain to body and scroll the underlying page beneath the open drawer — typically undesired for an overlay drawer.

♻️ Proposed addition
     overflow-y: auto;
+    overscroll-behavior: contain;
     box-sizing: border-box;
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/styles/documentation.css` around lines 947 - 976, The
mobile drawer’s .docs-sidebar block lacks overscroll control so scrolling at its
edges can propagate to the page underneath; update the .docs-sidebar CSS (the
mobile drawer redeclaration) to include overscroll-behavior: contain to prevent
scroll chaining to the body when the drawer is scrolled to the top or bottom.
packages/docs/src/styles/code.css (1)

67-79: Duplicate .code-block-wrapper selectors can be merged.

Lines 67-70 and 76-79 both target .code-block-wrapper. Consider consolidating into a single block for readability.

♻️ Proposed consolidation
-/* Copy button for code blocks */
 .code-block-wrapper {
   position: relative;
   margin: var(--spacing-md) 0;
+  display: flex;
+  flex-direction: column;
 }

 /* Language badge + Copy button live as a tab-bar attached to the top of
    the code block — same background, no floating overlap with horizontally
    scrolling code (the previous absolute-positioned version masked code at
    narrow widths even with a solid background). */
-.code-block-wrapper {
-  display: flex;
-  flex-direction: column;
-}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/styles/code.css` around lines 67 - 79, Merge the duplicate
.code-block-wrapper rules into a single selector by combining the properties
from both blocks (position, margin, display, and flex-direction) into one
consolidated .code-block-wrapper rule; remove the redundant block so there’s
only one .code-block-wrapper definition (preserve the explanatory comment above
the selector if needed).
libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt (1)

4986-4989: Add @Deprecated annotations to mark APIs as deprecated in the Kotlin type system.

The validateReceipt and validateReceiptIOS methods have deprecation documented in comments, but lack @Deprecated annotations. IDEs and compilers won't warn consumers about these methods being deprecated without the annotation.

Suggested change
+    `@Deprecated`("Use verifyPurchase instead.")
     suspend fun validateReceipt(options: VerifyPurchaseProps): VerifyPurchaseResult
     /**
      * Verify a purchase against your own backend (returns isValid + raw store metadata).
      * See: https://www.openiap.dev/docs/apis/ios/validate-receipt-ios
      */
+    `@Deprecated`("Use verifyPurchase instead.")
     suspend fun validateReceiptIOS(options: VerifyPurchaseProps): VerifyPurchaseResultIOS
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt`
around lines 4986 - 4989, The two deprecated suspend functions validateReceipt
and validateReceiptIOS should be annotated with Kotlin's `@Deprecated` so callers
receive compiler/IDE warnings; update the declarations for suspend fun
validateReceipt(options: VerifyPurchaseProps): VerifyPurchaseResult and suspend
fun validateReceiptIOS(options: VerifyPurchaseProps): VerifyPurchaseResult to
include `@Deprecated` with a clear message (e.g., "Deprecated: use verifyPurchase
instead") and, optionally, a ReplaceWith that points to verifyPurchase(...) to
aid automated refactoring. Ensure annotations are placed directly above each
function declaration so the Kotlin compiler recognizes them as deprecated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@libraries/godot-iap/addons/godot-iap/godot_iap.gd`:
- Around line 274-276: The docs for fetch_products claim SUBS returns
ProductSubscription instances but the implementation maps to
Types.ProductAndroid / Types.ProductIOS; pick one approach: either update the
docstring to state that fetch_products returns arrays of
Types.ProductAndroid/Types.ProductIOS (and remove mention of
ProductSubscription/Product), or change the mapper inside fetch_products to
construct and return Types.ProductSubscription wrapper objects for SUBS results
(instead of Types.ProductAndroid/Types.ProductIOS) so subscription items have
the correct wrapper type; locate the mapping logic in the fetch_products
implementation and either adjust the returned constructor/type names or update
the doc comments to precisely match Types.ProductAndroid/Types.ProductIOS
output.
- Around line 205-217: The documentation for init_connection incorrectly shows
an argument; update the docblock so it matches the actual API: remove or clarify
the example that calls init_connection(config) and any mentions of [param
config], InitConnectionConfig, enable_billing_program_android and
BillingProgramAndroid.EXTERNAL_OFFER, or explicitly state that init_connection
takes no parameters; ensure the example only shows var ok = await
iap.init_connection() and that the doc text reflects the parameter is not
supported by the current init_connection method.

In `@libraries/godot-iap/addons/godot-iap/types.gd`:
- Line 5288: Doc and enum mismatch: the verifyPurchaseWithProvider comment
mentions Apple/Google/Horizon but the PurchaseVerificationProvider enum only
defines IAPKIT; update them to be consistent. Either (A) expand the
PurchaseVerificationProvider enum (symbol name) to include APPLE, GOOGLE,
HORIZON (and update any switch/serialization/usage sites like
verifyPurchaseWithProvider to handle the new values), or (B) change the comment
on verifyPurchaseWithProvider to only list IAPKIT (or a generic "managed
provider") so it matches the current enum; pick one approach and make sure
symbols PurchaseVerificationProvider and verifyPurchaseWithProvider remain
consistent across the file.

In
`@libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt`:
- Around line 4991-4997: The docs claim managed verification supports "IAPKit,
Apple, Google, Horizon" but the type system (PurchaseVerificationProvider) only
exposes Iapkit and Android rejects non-Iapkit providers; update the comment
above suspend fun verifyPurchase(options: VerifyPurchaseProps):
VerifyPurchaseResult to accurately reflect the implementation: either enumerate
only the supported provider(s) (Iapkit) and note platform limitations, or extend
PurchaseVerificationProvider and platform checks to actually support
Apple/Google/Horizon; reference PurchaseVerificationProvider and verifyPurchase
when making the change so the documentation and types remain consistent.

In `@libraries/react-native-iap/src/index.ts`:
- Around line 669-670: The JSDoc for fetchProducts is missing the nullable
branch: update the return description for fetchProducts to mention that
FetchProductsResult may also be null (i.e., Promise resolving to Product[] |
ProductSubscription[] | mixed array | null), or alternatively tighten the
exported FetchProductsResult type to remove null so docs and typings match;
locate the fetchProducts declaration and the FetchProductsResult type and either
add "or null" to the doc return line or adjust the type definition accordingly.
- Around line 801-803: The JSDoc for getAvailablePurchases incorrectly states
the listed flags are iOS-only; update the PurchaseOptions documentation to
include the Android-specific flag includeSuspendedAndroid used by the
implementation. Edit the comment for getAvailablePurchases / PurchaseOptions to
list includeSuspendedAndroid (describe it briefly as an Android-only option
controlling whether suspended purchases are returned) alongside the existing iOS
flags (alsoPublishToEventListenerIOS, onlyIncludeActiveItemsIOS) so callers on
Android see the supported behavior.

In `@packages/apple/Sources/Models/Types.swift`:
- Around line 2445-2447: The doc comment for verifyPurchaseWithProvider claims
support for “IAPKit, Apple, Google, Horizon” which mismatches the actual
PurchaseVerificationProvider type surface (currently only exposes iapkit);
update the comment on the func verifyPurchaseWithProvider(_:) to list only the
providers the type supports (e.g., iapkit) or otherwise make the language
generic (e.g., “a managed provider (currently: iapkit)”) so the documentation
matches PurchaseVerificationProvider.

In `@packages/apple/Sources/OpenIapModule.swift`:
- Around line 105-107: Docstring for fetchProducts incorrectly states default
type is `.inApp` while the implementation uses `params.type ?? .all`; update the
documentation to state the default is `.all` (or alternatively change the
implementation to default to `.inApp` if that was intended). Specifically,
adjust the comment on the `fetchProducts` method / `ProductRequest` parameter to
reflect the actual default (`.all`) or change the expression `params.type ??
.all` to `params.type ?? .inApp` so docs and runtime match.
- Around line 515-520: Update the documentation for getAvailablePurchases to
accurately describe its scope: state that it lists the user's purchases held by
StoreKit and, depending on the onlyIncludeActiveItemsIOS flag, may return either
only unfinished/active transactions or the broader history (it uses
Transaction.all when onlyIncludeActiveItemsIOS is false). Mention the parameter
onlyIncludeActiveItemsIOS and that Transaction.all is consulted for the full
history so readers understand the difference in behavior.

In `@packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx`:
- Around line 25-38: Update the incorrect method name reference: replace
BillingClient.launchExternalLinkFlow(activity, params) with the correct API call
BillingClient.launchExternalLink(Activity activity, LaunchExternalLinkParams
params, LaunchExternalLinkResponseListener listener) so the prose matches the
signature used elsewhere; ensure the inline text and any surrounding
examples/reference to launchExternalLinkFlow are renamed to launchExternalLink
and, if present, mention the expected parameters/listener form to match the
signature section.

In `@packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx`:
- Around line 24-25: The docs claim the wrapper maps to both
SKPaymentQueue.presentCodeRedemptionSheet() (UIKit) and
AppStore.presentOfferCodeRedeemSheet(in:) (StoreKit 2), but the implementation
in OpenIapModule.swift calls only
SKPaymentQueue.default().presentCodeRedemptionSheet(); update the sentence in
present-code-redemption-sheet-ios.tsx to reflect the actual behavior by removing
or qualifying the StoreKit 2 mention and explicitly referencing
SKPaymentQueue.default().presentCodeRedemptionSheet(), or change wording to
state that StoreKit 2 is not used/implemented here so the doc no longer implies
AppStore.presentOfferCodeRedeemSheet(in:) is invoked.

In `@packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx`:
- Around line 27-35: Update the documentation paragraph in
show-manage-subscriptions-ios.tsx to correctly describe the underlying native
behavior: it does not wrap AppStore.showManageSubscriptions(in:), but instead
triggers the module's deep link behavior by calling deepLinkToSubscriptions(nil)
in OpenIapModule (see OpenIapModule.swift). Rephrase the sentence to state that
the method opens the subscriptions UI via the module's deep link
(deepLinkToSubscriptions) on iOS 15+, and keep the existing Apple StoreKit
reference link for context.

In `@packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx`:
- Around line 26-39: Update the doc text for SubscriptionStatusIOS to match the
actual TypeScript type: remove the claim that it "combines transaction,
renewalInfo, and state" and instead state that the OpenIAP SubscriptionStatusIOS
exposes only renewalInfo (RenewalInfoIOS | null | undefined) and state (string);
reference the SubscriptionStatusIOS and RenewalInfoIOS types in the wording and
keep the Apple docs link as supplemental context rather than implying parity
with Apple's full Product.SubscriptionInfo.Status.

In `@packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt`:
- Around line 423-425: The KDoc incorrectly references a non-existent
currentError; update the comment in OpenIapStore's purchase-flow docs to point
users to the existing APIs: instruct them to observe purchaseUpdatedListener /
purchaseErrorListener (or OpenIapStore.currentPurchase and OpenIapStore.status
with its lastError) for final state instead of currentError, ensuring the text
mentions OpenIapStore.status.lastError and OpenIapStore.currentPurchase by name.

---

Nitpick comments:
In
`@libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt`:
- Around line 4986-4989: The two deprecated suspend functions validateReceipt
and validateReceiptIOS should be annotated with Kotlin's `@Deprecated` so callers
receive compiler/IDE warnings; update the declarations for suspend fun
validateReceipt(options: VerifyPurchaseProps): VerifyPurchaseResult and suspend
fun validateReceiptIOS(options: VerifyPurchaseProps): VerifyPurchaseResult to
include `@Deprecated` with a clear message (e.g., "Deprecated: use verifyPurchase
instead") and, optionally, a ReplaceWith that points to verifyPurchase(...) to
aid automated refactoring. Ensure annotations are placed directly above each
function declaration so the Kotlin compiler recognizes them as deprecated.

In `@packages/docs/src/styles/code.css`:
- Around line 67-79: Merge the duplicate .code-block-wrapper rules into a single
selector by combining the properties from both blocks (position, margin,
display, and flex-direction) into one consolidated .code-block-wrapper rule;
remove the redundant block so there’s only one .code-block-wrapper definition
(preserve the explanatory comment above the selector if needed).

In `@packages/docs/src/styles/documentation.css`:
- Around line 947-976: The mobile drawer’s .docs-sidebar block lacks overscroll
control so scrolling at its edges can propagate to the page underneath; update
the .docs-sidebar CSS (the mobile drawer redeclaration) to include
overscroll-behavior: contain to prevent scroll chaining to the body when the
drawer is scrolled to the top or bottom.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e5a06025-77ad-40bf-9588-da0bd4afcfe5

📥 Commits

Reviewing files that changed from the base of the PR and between 6bd5d34 and d368391.

⛔ Files ignored due to path filters (5)
  • packages/gql/src/generated/Types.kt is excluded by !**/generated/**
  • packages/gql/src/generated/Types.swift is excluded by !**/generated/**
  • packages/gql/src/generated/types.dart is excluded by !**/generated/**
  • packages/gql/src/generated/types.gd is excluded by !**/generated/**
  • packages/gql/src/generated/types.ts is excluded by !**/generated/**
📒 Files selected for processing (95)
  • libraries/expo-iap/src/index.ts
  • libraries/expo-iap/src/modules/android.ts
  • libraries/expo-iap/src/modules/ios.ts
  • libraries/expo-iap/src/types.ts
  • libraries/expo-iap/src/useIAP.ts
  • libraries/flutter_inapp_purchase/lib/flutter_inapp_purchase.dart
  • libraries/flutter_inapp_purchase/lib/types.dart
  • libraries/godot-iap/addons/godot-iap/godot_iap.gd
  • libraries/godot-iap/addons/godot-iap/types.gd
  • libraries/kmp-iap/library/src/androidMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseAndroid.kt
  • libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt
  • libraries/kmp-iap/library/src/iosMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseIOS.kt
  • libraries/react-native-iap/src/hooks/useIAP.ts
  • libraries/react-native-iap/src/index.ts
  • libraries/react-native-iap/src/types.ts
  • packages/apple/Sources/Models/Types.swift
  • packages/apple/Sources/OpenIapModule.swift
  • packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx
  • packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx
  • packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx
  • packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx
  • packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx
  • packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx
  • packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx
  • packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx
  • packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx
  • packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/end-connection.tsx
  • packages/docs/src/pages/docs/apis/fetch-products.tsx
  • packages/docs/src/pages/docs/apis/finish-transaction.tsx
  • packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/get-available-purchases.tsx
  • packages/docs/src/pages/docs/apis/get-storefront.tsx
  • packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/init-connection.tsx
  • packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-external-purchase-custom-link-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/sync-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx
  • packages/docs/src/pages/docs/apis/request-purchase.tsx
  • packages/docs/src/pages/docs/apis/restore-purchases.tsx
  • packages/docs/src/pages/docs/types/active-subscription.tsx
  • packages/docs/src/pages/docs/types/alternative-billing-types.tsx
  • packages/docs/src/pages/docs/types/android/one-time-purchase-offer-detail-android.tsx
  • packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx
  • packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx
  • packages/docs/src/pages/docs/types/billing-programs.tsx
  • packages/docs/src/pages/docs/types/discount-offer.tsx
  • packages/docs/src/pages/docs/types/external-purchase-link.tsx
  • packages/docs/src/pages/docs/types/ios/app-transaction-ios.tsx
  • packages/docs/src/pages/docs/types/ios/discount-ios.tsx
  • packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx
  • packages/docs/src/pages/docs/types/ios/payment-mode-ios.tsx
  • packages/docs/src/pages/docs/types/ios/renewal-info-ios.tsx
  • packages/docs/src/pages/docs/types/ios/subscription-period-ios.tsx
  • packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx
  • packages/docs/src/pages/docs/types/product-request.tsx
  • packages/docs/src/pages/docs/types/product.tsx
  • packages/docs/src/pages/docs/types/purchase.tsx
  • packages/docs/src/pages/docs/types/request-purchase-props.tsx
  • packages/docs/src/pages/docs/types/storefront.tsx
  • packages/docs/src/pages/docs/types/subscription-offer.tsx
  • packages/docs/src/pages/docs/types/subscription-product.tsx
  • packages/docs/src/pages/docs/types/verify-purchase-with-provider-props.tsx
  • packages/docs/src/pages/docs/types/verify-purchase-with-provider-result.tsx
  • packages/docs/src/pages/docs/types/verify-purchase.tsx
  • packages/docs/src/styles/code.css
  • packages/docs/src/styles/documentation.css
  • packages/docs/src/styles/responsive.css
  • packages/google/openiap/src/main/java/dev/hyo/openiap/Types.kt
  • packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt
  • packages/gql/src/api-android.graphql
  • packages/gql/src/api-ios.graphql
  • packages/gql/src/api.graphql

Comment thread libraries/godot-iap/addons/godot-iap/godot_iap.gd Outdated
Comment thread libraries/godot-iap/addons/godot-iap/godot_iap.gd Outdated
Comment thread libraries/godot-iap/addons/godot-iap/types.gd Outdated
Comment thread libraries/react-native-iap/src/index.ts Outdated
Comment thread packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx Outdated
Comment thread packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx Outdated
Comment thread packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx
Fixes 14 unresolved review threads on PR #107:

- Provider list — `verifyPurchaseWithProvider` docs claimed support for
  IAPKit/Apple/Google/Horizon but `PurchaseVerificationProvider` only
  exposes `IAPKit`. Tightened the GraphQL schema description (so all
  generated Types files re-flow on next codegen) and updated every
  hand-written wrapper doc + the `apis` listing page + the
  `verify-purchase-with-provider-props` type page.

- Apple `fetchProducts` doc default `.inApp` → `.all` to match the
  implementation's `params.type ?? .all`.

- Apple `getAvailablePurchases` doc no longer claims "unfinished only";
  describes the `Transaction.all` (default) vs
  `Transaction.currentEntitlements` (when `onlyIncludeActiveItemsIOS`)
  branches.

- Godot `init_connection` doc dropped the bogus `config` parameter — the
  GDScript wrapper currently takes no arguments.

- Godot `fetch_products` return-type doc corrected to reflect the
  wrapper output (`ProductAndroid`/`ProductIOS`, not
  `ProductSubscription`).

- react-native-iap `fetchProducts` `@returns` mentions the nullable
  branch from `FetchProductsResult`.

- react-native-iap `getAvailablePurchases` `@param options` documents
  the Android-only `includeSuspendedAndroid` flag.

- launch-external-link-android.tsx: `BillingClient.launchExternalLinkFlow`
  → `BillingClient.launchExternalLink(activity, params, listener)`
  (matches the Play Billing 8.2.0+ API).

- present-code-redemption-sheet-ios.tsx: drop the StoreKit 2
  `AppStore.presentOfferCodeRedeemSheet(in:)` mention; the wrapper only
  calls `SKPaymentQueue.default().presentCodeRedemptionSheet()`.

- show-manage-subscriptions-ios.tsx: clarify that the wrapper forwards
  to `deepLinkToSubscriptions(nil)` (which itself reaches
  `AppStore.showManageSubscriptions(in:)` when a window scene exists).

- subscription-status-ios.tsx (type doc): the OpenIAP wrapper exposes
  only `renewalInfo` + `state`, not Apple's full `transaction` field.

- packages/google `OpenIapStore.kt`: replaced the broken `currentError`
  reference with `OpenIapStore.status.lastError`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

/gemini review

@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

@coderabbitai review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes cross-linking between wrapper SDK APIs / generated GraphQL types and the openiap.dev API reference pages, while also updating the docs site with platform-behavior blurbs and a few responsive layout fixes.

Changes:

  • Add canonical See: https://www.openiap.dev/docs/apis/... links + expanded doc comments/descriptions across GraphQL schema and generated client types (TS/Dart/Swift/Kotlin).
  • Add/expand docs-site API + Type pages with iOS/Android behavior notes and native reference links.
  • Fix docs-site mobile/tablet UI issues (sidebar drawer layering/positioning; code block header/badge layout).

Reviewed changes

Copilot reviewed 96 out of 101 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/gql/src/generated/types.ts Generated TS types: expanded field docstrings with canonical openiap.dev links.
packages/gql/src/generated/types.dart Generated Dart types: expanded API doc comments with canonical openiap.dev links.
packages/gql/src/generated/Types.swift Generated Swift types: expanded protocol doc comments with canonical openiap.dev links.
packages/gql/src/generated/Types.kt Generated Kotlin types: expanded resolver doc comments with canonical openiap.dev links.
packages/gql/src/api.graphql GraphQL schema: improved root API descriptions + canonical openiap.dev links.
packages/gql/src/api-ios.graphql iOS schema extensions: improved descriptions + canonical openiap.dev links.
packages/gql/src/api-android.graphql Android schema extensions: improved descriptions + canonical openiap.dev links.
packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt Adds KDoc for core store operations and links to openiap.dev reference pages.
packages/google/openiap/src/main/java/dev/hyo/openiap/Types.kt Kotlin types/protocol docs updated with canonical openiap.dev links.
packages/docs/src/styles/responsive.css Removes conflicting mobile sidebar rules; defers to documentation.css mobile drawer styling.
packages/docs/src/styles/documentation.css Fixes sidebar centering offset on tablet; adjusts mobile drawer/overlay z-index and top offset below sticky nav.
packages/docs/src/styles/code.css Reworks code block header/badge as attached “tab bar” instead of absolute overlay.
packages/docs/src/pages/docs/types/verify-purchase.tsx Adds platform behavior blurb + native doc links for verifyPurchase types.
packages/docs/src/pages/docs/types/verify-purchase-with-provider-result.tsx Adds clarification + link to Validation docs.
packages/docs/src/pages/docs/types/verify-purchase-with-provider-props.tsx Adds clarification + link to Validation docs.
packages/docs/src/pages/docs/types/subscription-product.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/subscription-offer.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/storefront.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/request-purchase-props.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/purchase.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/product.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/product-request.tsx Adds platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx Clarifies wrapper projection vs Apple type for SubscriptionStatusIOS.
packages/docs/src/pages/docs/types/ios/subscription-period-ios.tsx Adds iOS-only mapping blurb + Apple reference link.
packages/docs/src/pages/docs/types/ios/renewal-info-ios.tsx Adds iOS-only mapping blurb + Apple reference link.
packages/docs/src/pages/docs/types/ios/payment-mode-ios.tsx Adds iOS-only mapping blurb + Apple reference link.
packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx Adds iOS-only mapping blurb + Apple reference link.
packages/docs/src/pages/docs/types/ios/discount-ios.tsx Adds iOS-only mapping blurb + Apple reference link.
packages/docs/src/pages/docs/types/ios/app-transaction-ios.tsx Adds iOS-only mapping blurb + Apple reference link.
packages/docs/src/pages/docs/types/external-purchase-link.tsx Adds iOS external purchase type/context + links; includes availability table.
packages/docs/src/pages/docs/types/discount-offer.tsx Adds cross-platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/types/billing-programs.tsx Adds Android-only mapping blurb + Google reference link.
packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx Adds Android-only mapping blurb + Google reference link.
packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx Adds Android-only mapping blurb + Google reference link.
packages/docs/src/pages/docs/types/android/one-time-purchase-offer-detail-android.tsx Adds Android-only mapping blurb + Google reference link.
packages/docs/src/pages/docs/types/alternative-billing-types.tsx Adds Android-only mapping blurb + Google reference link.
packages/docs/src/pages/docs/types/active-subscription.tsx Adds cross-platform mapping blurb + Apple/Google reference links.
packages/docs/src/pages/docs/apis/restore-purchases.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/request-purchase.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx Adds deprecation context + Apple legacy reference link.
packages/docs/src/pages/docs/apis/ios/sync-ios.tsx Adds wrapper behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx Adds wrapper behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx Adds deprecation context + Apple reference link.
packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx Adds StoreKit 1 vs 2 context + Apple reference link.
packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/is-eligible-for-external-purchase-custom-link-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx Adds behavior description + Apple reference link.
packages/docs/src/pages/docs/apis/init-connection.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/index.tsx Updates verifyPurchaseWithProvider index description to match current enum.
packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/get-storefront.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/get-available-purchases.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/finish-transaction.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/fetch-products.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/end-connection.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx Adds iOS/Android behavior blurb + native reference links.
packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx Adds wrapper behavior description + Google reference link.
packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx Adds wrapper behavior description + Google reference link.
packages/apple/Sources/Models/Types.swift Apple package generated types/protocol docs updated with canonical openiap.dev links.
libraries/react-native-iap/src/types.ts RN wrapper types: expanded JSDoc + canonical openiap.dev links.
libraries/react-native-iap/src/hooks/useIAP.ts RN hook API: adds detailed JSDoc for core functions + links.
libraries/flutter_inapp_purchase/lib/types.dart Flutter wrapper types: expanded doc comments + canonical openiap.dev links.
libraries/expo-iap/src/useIAP.ts Expo hook: adds detailed JSDoc for core functions + links.
libraries/expo-iap/src/types.ts Expo wrapper types: expanded JSDoc + canonical openiap.dev links.
libraries/expo-iap/src/modules/ios.ts Expo iOS module exports: adds @see links to openiap.dev API pages.
libraries/expo-iap/src/modules/android.ts Expo Android module exports: adds @see links to openiap.dev API pages.
libraries/expo-iap/src/index.ts Expo top-level API exports: expands JSDoc for core funcs + canonical openiap.dev links.
Comments suppressed due to low confidence (1)

packages/docs/src/pages/docs/types/external-purchase-link.tsx:109

  • This page says external purchase "custom links" (and presentExternalPurchaseLinkIOS in the table) are available from iOS 18.2+, but the Apple wrapper marks presentExternalPurchaseLinkIOS as iOS 16+. Please align the availability text/table with the actual API (or document what specifically requires 18.2+).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx
Comment thread libraries/react-native-iap/src/hooks/useIAP.ts
Comment thread packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx Outdated
- subscriptionStatusIOS API page (apis/ios/subscription-status-ios.tsx):
  the 'Wraps Product.SubscriptionInfo.status' paragraph was still
  claiming the wrapper exposes `transaction`, even after the type page
  was corrected last round. Updated to say only `renewalInfo` + `state`
  are surfaced and to point users at `latestTransactionIOS(sku)` if they
  need the underlying transaction.

- useIAP `getAvailablePurchases` JSDoc: the `@example` had a
  `const purchases = await getAvailablePurchases()` snippet that
  contradicts the `Promise<void>` signature (results land in the
  reactive `availablePurchases` array per the hook semantics in
  CLAUDE.md). Replaced with a hook-state pattern. Same fix applied
  preemptively to the `fetchProducts` example for consistency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

/gemini review

@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

@coderabbitai review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (4)
libraries/kmp-iap/library/src/androidMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseAndroid.kt (1)

580-687: Consider noting Android-stub status on iOS-only overrides.

These overrides (currentEntitlementIOS, getAppTransactionIOS, getPendingTransactionsIOS, subscriptionStatusIOS, getStorefrontIOS, presentCodeRedemptionSheetIOS, getPromotedProductIOS, showManageSubscriptionsIOS, syncIOS, etc.) all return harmless defaults (null/false/emptyList()) on Android, but the new KDocs only describe iOS behavior — readers viewing the Android implementation may miss that these are no-ops. A one-line Returns a no-op default on Android. would prevent surprise.

This is a stylistic refinement, not a correctness defect — the iOS-suffix naming already conveys platform scope.

Also applies to: 1020-1078

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@libraries/kmp-iap/library/src/androidMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseAndroid.kt`
around lines 580 - 687, Several iOS-only APIs in InAppPurchaseAndroid (e.g.,
currentEntitlementIOS, getAppTransactionIOS, getPendingTransactionsIOS,
getAllTransactionsIOS, getReceiptDataIOS, getTransactionJwsIOS,
isEligibleForIntroOfferIOS, isEligibleForExternalPurchaseCustomLinkIOS,
showExternalPurchaseCustomLinkNoticeIOS, getExternalPurchaseCustomLinkTokenIOS,
isTransactionVerifiedIOS, latestTransactionIOS, subscriptionStatusIOS and other
iOS-suffixed overrides) return harmless defaults on Android but their KDoc only
describes iOS behavior; update each method's KDoc to add a single clarifying
sentence such as "Returns a no-op default on Android." so readers of the Android
implementation understand these are intentional no-ops, leaving the
implementation unchanged.
libraries/react-native-iap/src/types.ts (1)

696-705: Duplicate @deprecated tags (pre-existing pattern, FYI).

requestPurchaseOnPromotedProductIOS carries two @deprecated annotations (lines 699 and 703) with different wording. Several other fields show the same pattern (subscriptionInfoIOS, oneTimePurchaseOfferDetailsAndroid, subscriptionOfferDetailsAndroid, discountsIOS). This appears to be a generator artifact emitting both the schema's @deprecated reason and a redundant doc-comment line. Not introduced by this PR, but worth cleaning up in the generator templates so downstream tooling (TypeDoc, IDEs) doesn't render the tag twice.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libraries/react-native-iap/src/types.ts` around lines 696 - 705, The doc
comments contain duplicate `@deprecated` tags for several exported types (e.g.,
requestPurchaseOnPromotedProductIOS, subscriptionInfoIOS,
oneTimePurchaseOfferDetailsAndroid, subscriptionOfferDetailsAndroid,
discountsIOS); locate the generator/template that emits both the schema's
deprecation reason and an extra doc line and change it to emit a single
`@deprecated` annotation (merge the messages if needed) so each field/type has
only one `@deprecated` tag in the generated types; update the template logic that
builds the JSDoc to skip adding an additional `@deprecated` when a schema-provided
deprecation string already exists.
libraries/react-native-iap/src/index.ts (2)

1501-1526: Tighten the "Synchronous rejection" wording for requestPurchase.

requestPurchase is async, so all errors surface as promise rejections — not literally "synchronous". The intent (these errors reach the caller via throw/rejection rather than the purchase event listener) is clearer with a small reword.

✏️ Suggested doc tweak
- * `@throws` Synchronous rejection from the store (e.g. `E_NOT_PREPARED`, validation failure).
+ * `@throws` Rejects when the store rejects the request before dispatch
+ *   (e.g. `E_NOT_PREPARED`, validation failure). Successful purchase outcomes are
+ *   delivered through `purchaseUpdatedListener`, not via this promise.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libraries/react-native-iap/src/index.ts` around lines 1501 - 1526, Update the
JSDoc for requestPurchase to clarify that errors are returned as promise
rejections rather than "synchronous" exceptions: reword the "@throws" line to
say that the function may reject its returned Promise with store errors (e.g.,
E_NOT_PREPARED, validation failure) and that these rejections are delivered to
the caller rather than via the purchase event listeners; adjust any surrounding
wording that refers to "synchronous rejection" to mention "immediate Promise
rejection" or similar. Reference: requestPurchase in the existing comment block
and the "@throws" tag.

1413-1431: initConnection JSDoc — clarify the preferred billing program setup approach.

The JSDoc example correctly shows passing enableBillingProgramAndroid via InitConnectionConfig, which is the modern, recommended approach. However, a standalone enableBillingProgramAndroid(program) function also exists in the same module that must be called BEFORE initConnection() (visible at line 2752). To prevent confusion, consider adding a remark that the config approach shown in the example is preferred, or add a cross-reference noting the two setup patterns and when each is appropriate.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@libraries/react-native-iap/src/index.ts` around lines 1413 - 1431, Update the
initConnection JSDoc to clarify billing-program setup: state that passing
enableBillingProgramAndroid via InitConnectionConfig (as shown in the example)
is the preferred modern approach and mention the alternative standalone function
enableBillingProgramAndroid(program) also exists and must be called before
initConnection() if used; add a short cross-reference to useIAP (which
auto-manages connection) and to the standalone enableBillingProgramAndroid to
avoid confusion about ordering and preferred usage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@libraries/kmp-iap/library/src/androidMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseAndroid.kt`:
- Around line 522-537: Update the KDoc on the requestPurchase override to use
the correct parameter name and clarify inner-field paths: change "@param props"
to "@param request" and rewrite references like "`request.apple.sku`" to
explicitly indicate the field on RequestPurchaseProps (e.g.,
"request.request.apple.sku" or better "RequestPurchaseProps.request.apple.sku")
so IDE/Dokka can resolve them; ensure the thrown/return tags and summary remain
intact and reference the requestPurchase function and RequestPurchaseProps type
where applicable.

In
`@libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt`:
- Around line 4991-4994: The doc for suspend fun verifyPurchase(options:
VerifyPurchaseProps): VerifyPurchaseResult is too strict by claiming the result
"returns isValid"; update the comment to say that VerifyPurchaseResult is a
union type and that an isValid field is present only on some variants (e.g.,
VerifyPurchaseResultAndroid, VerifyPurchaseResultHorizon), or otherwise describe
the possible variant shapes and advise callers to inspect the concrete variant
before reading isValid; reference verifyPurchase, VerifyPurchaseResult,
VerifyPurchaseResultAndroid, and VerifyPurchaseResultHorizon in the revised
wording.

---

Nitpick comments:
In
`@libraries/kmp-iap/library/src/androidMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseAndroid.kt`:
- Around line 580-687: Several iOS-only APIs in InAppPurchaseAndroid (e.g.,
currentEntitlementIOS, getAppTransactionIOS, getPendingTransactionsIOS,
getAllTransactionsIOS, getReceiptDataIOS, getTransactionJwsIOS,
isEligibleForIntroOfferIOS, isEligibleForExternalPurchaseCustomLinkIOS,
showExternalPurchaseCustomLinkNoticeIOS, getExternalPurchaseCustomLinkTokenIOS,
isTransactionVerifiedIOS, latestTransactionIOS, subscriptionStatusIOS and other
iOS-suffixed overrides) return harmless defaults on Android but their KDoc only
describes iOS behavior; update each method's KDoc to add a single clarifying
sentence such as "Returns a no-op default on Android." so readers of the Android
implementation understand these are intentional no-ops, leaving the
implementation unchanged.

In `@libraries/react-native-iap/src/index.ts`:
- Around line 1501-1526: Update the JSDoc for requestPurchase to clarify that
errors are returned as promise rejections rather than "synchronous" exceptions:
reword the "@throws" line to say that the function may reject its returned
Promise with store errors (e.g., E_NOT_PREPARED, validation failure) and that
these rejections are delivered to the caller rather than via the purchase event
listeners; adjust any surrounding wording that refers to "synchronous rejection"
to mention "immediate Promise rejection" or similar. Reference: requestPurchase
in the existing comment block and the "@throws" tag.
- Around line 1413-1431: Update the initConnection JSDoc to clarify
billing-program setup: state that passing enableBillingProgramAndroid via
InitConnectionConfig (as shown in the example) is the preferred modern approach
and mention the alternative standalone function
enableBillingProgramAndroid(program) also exists and must be called before
initConnection() if used; add a short cross-reference to useIAP (which
auto-manages connection) and to the standalone enableBillingProgramAndroid to
avoid confusion about ordering and preferred usage.

In `@libraries/react-native-iap/src/types.ts`:
- Around line 696-705: The doc comments contain duplicate `@deprecated` tags for
several exported types (e.g., requestPurchaseOnPromotedProductIOS,
subscriptionInfoIOS, oneTimePurchaseOfferDetailsAndroid,
subscriptionOfferDetailsAndroid, discountsIOS); locate the generator/template
that emits both the schema's deprecation reason and an extra doc line and change
it to emit a single `@deprecated` annotation (merge the messages if needed) so
each field/type has only one `@deprecated` tag in the generated types; update the
template logic that builds the JSDoc to skip adding an additional `@deprecated`
when a schema-provided deprecation string already exists.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32d58be1-9d67-4260-9b61-714c63884175

📥 Commits

Reviewing files that changed from the base of the PR and between d368391 and caf19d2.

⛔ Files ignored due to path filters (5)
  • packages/gql/src/generated/Types.kt is excluded by !**/generated/**
  • packages/gql/src/generated/Types.swift is excluded by !**/generated/**
  • packages/gql/src/generated/types.dart is excluded by !**/generated/**
  • packages/gql/src/generated/types.gd is excluded by !**/generated/**
  • packages/gql/src/generated/types.ts is excluded by !**/generated/**
📒 Files selected for processing (33)
  • libraries/expo-iap/src/types.ts
  • libraries/expo-iap/src/useIAP.ts
  • libraries/flutter_inapp_purchase/lib/flutter_inapp_purchase.dart
  • libraries/flutter_inapp_purchase/lib/types.dart
  • libraries/godot-iap/addons/godot-iap/godot_iap.gd
  • libraries/godot-iap/addons/godot-iap/types.gd
  • libraries/kmp-iap/library/src/androidMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseAndroid.kt
  • libraries/kmp-iap/library/src/commonMain/kotlin/io/github/hyochan/kmpiap/openiap/Types.kt
  • libraries/kmp-iap/library/src/iosMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseIOS.kt
  • libraries/react-native-iap/src/hooks/useIAP.ts
  • libraries/react-native-iap/src/index.ts
  • libraries/react-native-iap/src/types.ts
  • packages/apple/Sources/Models/Types.swift
  • packages/apple/Sources/OpenIapModule.swift
  • packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx
  • packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx
  • packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx
  • packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx
  • packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/finish-transaction.tsx
  • packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/index.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx
  • packages/docs/src/pages/docs/apis/restore-purchases.tsx
  • packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx
  • packages/docs/src/pages/docs/types/subscription-offer.tsx
  • packages/docs/src/pages/docs/types/verify-purchase-with-provider-props.tsx
  • packages/google/openiap/src/main/java/dev/hyo/openiap/Types.kt
  • packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt
  • packages/gql/src/api.graphql
✅ Files skipped from review due to trivial changes (27)
  • packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx
  • packages/docs/src/pages/docs/types/subscription-offer.tsx
  • packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx
  • packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx
  • packages/docs/src/pages/docs/apis/index.tsx
  • packages/docs/src/pages/docs/apis/restore-purchases.tsx
  • packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/finish-transaction.tsx
  • packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx
  • packages/docs/src/pages/docs/types/verify-purchase-with-provider-props.tsx
  • packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx
  • packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx
  • packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx
  • packages/apple/Sources/Models/Types.swift
  • packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx
  • packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx
  • packages/google/openiap/src/main/java/dev/hyo/openiap/Types.kt
  • libraries/expo-iap/src/useIAP.ts
  • libraries/flutter_inapp_purchase/lib/types.dart
  • libraries/react-native-iap/src/hooks/useIAP.ts
  • packages/google/openiap/src/main/java/dev/hyo/openiap/store/OpenIapStore.kt
  • libraries/godot-iap/addons/godot-iap/godot_iap.gd
  • libraries/kmp-iap/library/src/iosMain/kotlin/io/github/hyochan/kmpiap/InAppPurchaseIOS.kt
  • packages/apple/Sources/OpenIapModule.swift
  • libraries/godot-iap/addons/godot-iap/types.gd
  • libraries/flutter_inapp_purchase/lib/flutter_inapp_purchase.dart
🚧 Files skipped from review as they are similar to previous changes (1)
  • libraries/expo-iap/src/types.ts

- KMP requestPurchase KDoc parameter name mismatch — `@param props`
  but the actual method parameter is `request` (Android) / `params`
  (iOS). Renamed each `@param` to match its actual signature and
  clarified the OUTER vs INNER `request` field path
  (`<param>.request.apple.sku` etc.) so Dokka/IDE tooling stop
  warning about "missing parameter docs".

- `verifyPurchase` schema description was overly iOS-biased ("returns
  isValid + raw store metadata"), but `VerifyPurchaseResult` is a
  union — only `VerifyPurchaseResultIOS` exposes `isValid`,
  `VerifyPurchaseResultAndroid` carries Play Store fields with no
  isValid, and `VerifyPurchaseResultHorizon` uses `success`. Updated
  the GraphQL schema description to describe each variant; codegen
  re-flowed all generated Types files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

/gemini review

@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

@coderabbitai review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

User screenshot showed the External Purchase APIs table on
/docs/types/external-purchase-link with the "AVAILABILITY" column
header rendering one letter per row — a 3-column table where the
identifier and description columns refused to wrap was squeezing the
last column to per-character width.

Root cause: the rule "non-last columns: nowrap, width:1%" applied to
EVERY non-last column, including middle Description-style columns.
On 2-column tables this was fine; on 3+ column tables it forced the
last column to absorb impossible width.

Fix:
- Only the FIRST column (identifier name) keeps `width:1%; nowrap`.
- All other columns wrap normally with `overflow-wrap: anywhere` as a
  safety net.
- Added `display: block; overflow-x: auto` on the table itself so
  pathological cases (very narrow phones with many columns) scroll
  horizontally instead of squeezing.

How to prevent this class of bug in future:
1. Don't apply `nowrap` to any column other than the identifier.
2. Trust browser table layout — it handles 2/3/4 column cases when
   given normal `white-space`.
3. For mobile-first reads, an `overflow-x: auto` table fallback is
   cheap insurance.
4. When a table starts feeling cramped (like the parameters tables we
   just converted to `<ul>` lists), prefer the prose list pattern;
   tables are right for grid-of-fields data, not for narrative.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (5)
packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx (1)

139-143: ⚠️ Potential issue | 🟡 Minor

Stale prose: .acquisition / .services notice types don't exist either.

This trailing paragraph is outside the changed lines, but while you're correcting the examples above, the same fix applies here — ExternalPurchaseCustomLinkNoticeTypeIOS only defines browser, so the "e.g. .acquisition.services" guidance is inaccurate and will mislead readers. Consider rewriting it to describe what browser is for, or removing it until additional notice types are actually added to the schema.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx`
around lines 139 - 143, The paragraph references non-existent notice types
(.acquisition, .services); update the prose to reflect the actual enum in
ExternalPurchaseCustomLinkNoticeTypeIOS by removing the outdated examples and
either describe that noticeType currently supports only the browser option
(i.e., ExternalPurchaseCustomLinkNoticeTypeIOS.browser) and what it means, or
delete the sentence until other notice types are added; ensure the guidance
around the noticeType prop and its purpose is accurate and mentions
ExternalPurchaseCustomLinkNoticeTypeIOS and browser by name so readers aren’t
misled.
packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx (1)

63-65: ⚠️ Potential issue | 🟡 Minor

Swift signature (and example) is missing the options parameter.

The Apple module exposes public func deepLinkToSubscriptions(_ options: DeepLinkOptions?) async throws -> Void (see packages/apple/Sources/OpenIapModule.swift:1044-1060 referenced in the relevant snippet), but the doc renders the Swift signature as parameterless. This contradicts the implementation and the other language tabs (Kotlin/KMP/Dart/GDScript/TS), and is also inconsistent with the Parameters section which describes DeepLinkOptions. iOS does ignore the fields at runtime, but the parameter still exists on the API surface and consumers calling cross‑platform helpers will pass it.

The Swift example on line 167 has the same omission and should at least show that options is accepted (e.g. nil) for parity.

📝 Suggested fix
           swift: (
-            <CodeBlock language="swift">{`func deepLinkToSubscriptions() async throws`}</CodeBlock>
+            <CodeBlock language="swift">{`func deepLinkToSubscriptions(_ options: DeepLinkOptions? = nil) async throws`}</CodeBlock>
           ),
           swift: (
-            <CodeBlock language="swift">{`try await OpenIapModule.shared.deepLinkToSubscriptions()`}</CodeBlock>
+            <CodeBlock language="swift">{`// iOS ignores DeepLinkOptions; pass nil (or omit) for parity with other platforms.
+try await OpenIapModule.shared.deepLinkToSubscriptions(nil)`}</CodeBlock>
           ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx` around
lines 63 - 65, Update the Swift docs to match the actual API by adding the
options parameter to the Swift signature and example: change the displayed
signature for deepLinkToSubscriptions to include (_ options: DeepLinkOptions?)
and update the usage example (e.g., pass nil or a DeepLinkOptions instance) so
the docs align with the implementation of public func deepLinkToSubscriptions(_
options: DeepLinkOptions?) async throws -> Void and the Parameters section
describing DeepLinkOptions.
packages/docs/src/pages/docs/apis/get-available-purchases.tsx (1)

55-60: ⚠️ Potential issue | 🟡 Minor

Inline PurchaseOptions is missing includeSuspendedAndroid.

The TS signature block declares only the two iOS fields, but the Parameters section below (Lines 108–115) and the generated PurchaseOptions in packages/gql/src/generated/types.ts also expose includeSuspendedAndroid. Add it for consistency:

♻️ Proposed fix
 interface PurchaseOptions {
   alsoPublishToEventListenerIOS?: boolean;
+  includeSuspendedAndroid?: boolean;
   onlyIncludeActiveItemsIOS?: boolean;
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/get-available-purchases.tsx` around lines
55 - 60, Update the TypeScript signature shown for getAvailablePurchases to
include the missing includeSuspendedAndroid field on the inline PurchaseOptions
type so it matches the Parameters text and the generated PurchaseOptions in
packages/gql/src/generated/types.ts; modify the CodeBlock that declares
getAvailablePurchases(PurchaseOptions) to add includeSuspendedAndroid?: boolean
to the PurchaseOptions interface so consumers and docs are consistent with the
getAvailablePurchases function and generated types.
packages/docs/src/pages/docs/apis/request-purchase.tsx (1)

109-111: ⚠️ Potential issue | 🟡 Minor

GDScript signature should return Variant, not Purchase.

request_purchase() returns a platform-specific value (PurchaseAndroid? / PurchaseIOS?) or null, so per the project's GDScript convention it should be typed -> Variant. Other API pages in this PR follow this (e.g. get_receipt_data_ios() -> Variant).

📝 Suggested fix
           gdscript: (
-            <CodeBlock language="gdscript">{`func request_purchase(props: RequestPurchaseProps) -> Purchase`}</CodeBlock>
+            <CodeBlock language="gdscript">{`func request_purchase(props: RequestPurchaseProps) -> Variant`}</CodeBlock>
           ),

Based on learnings: "Applies to libraries/godot-iap/**/*.gd : Functions returning a single platform-specific item or null should use -> Variant return type (e.g., request_purchase() returning PurchaseAndroid?, PurchaseIOS?, or null)".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/request-purchase.tsx` around lines 109 -
111, The GDScript signature for request_purchase is incorrectly typed as
returning Purchase; update the signature shown in the CodeBlock for the
request_purchase function to use the project's convention and return Variant
(i.e., change the displayed return type from Purchase to Variant) so it matches
platform-specific nullable returns like PurchaseAndroid?/PurchaseIOS? and other
docs such as get_receipt_data_ios().
packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx (1)

49-129: ⚠️ Potential issue | 🟡 Minor

Fix Swift signature and correct example structures in validateReceiptIOS documentation.

The Signature and Examples sections have inconsistencies with the actual SDKs:

  1. Swift signature uses outdated type names. Line 54 declares ReceiptValidationProps and ReceiptValidationResultIOS, but the actual implementation (packages/apple/Sources/OpenIapModule.swift:717) uses VerifyPurchaseProps and VerifyPurchaseResultIOS — matching all other language tabs.

  2. All examples pass a flat {sku} structure, which does not match the actual VerifyPurchaseProps shape. The signature requires VerifyPurchaseProps which has nested fields: { apple?: { sku }, google?: {...}, horizon?: {...} }. Correct the examples:

    • Kotlin (line 112): Change VerifyPurchaseProps(sku = ...)VerifyPurchaseProps(apple = VerifyPurchaseAppleOptions(sku = ...))
    • TypeScript (line 116): Change { sku: ... }{ apple: { sku: ... } }
    • Dart (line 122): Change VerifyPurchaseProps(sku: ...) → pass named parameter apple: const VerifyPurchaseAppleOptions(sku: ...)
    • GDScript (line 128): Change {"sku": ...}{"apple": {"sku": ...}}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx` around lines
49 - 129, The Swift signature and examples for validateReceiptIOS are
inconsistent with the SDK types and the required VerifyPurchaseProps shape:
update the Swift signature to use VerifyPurchaseProps and
VerifyPurchaseResultIOS (matching OpenIapModule.shared.validateReceiptIOS and
other tabs), and change all examples to pass the nested apple object shape for
VerifyPurchaseProps (Kotlin: use VerifyPurchaseProps(apple =
VerifyPurchaseAppleOptions(sku = ...)), TypeScript: use { apple: { sku: ... } },
Dart: pass apple: const VerifyPurchaseAppleOptions(sku: ...) to
VerifyPurchaseProps, and GDScript: use {"apple": {"sku": ...}}) so the signature
and examples align with the actual verifyPurchase types and OpenIapModule
implementation.
🧹 Nitpick comments (9)
packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx (1)

83-93: Minor: Promise<boolean> in Returns is TS-only.

The Returns prose describes the type as Promise<boolean>, but the Signature tabs also expose Swift/Kotlin/Dart/GDScript which return a plain Bool/bool. Consider phrasing it generically (e.g., "resolves to true …" / "returns true …") to avoid implying a JS-only contract on this multi-language page. Non-blocking.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx` around lines
83 - 93, The "Returns" section currently names the type as `Promise<boolean>`,
which is JS/TS-specific; update the prose under the AnchorLink with id="returns"
in the has-active-subscriptions page to use language that is language-agnostic
(for example "resolves to true when at least one (matching) subscription is
active" or "returns true when…") instead of `Promise<boolean>`, keeping the
reference to `getActiveSubscriptions` and the existing explanation intact so
Swift/Kotlin/Dart/GDScript readers aren't misled.
packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx (2)

80-87: Optional: TypeScript example uses Platform without an import.

The snippet references Platform.OS but only imports getPromotedProductIOS. Readers copy‑pasting will hit a ReferenceError. Consider adding the react-native import (or dropping the platform guard, since this is already documented as iOS‑only).

✏️ Suggested tweak
           typescript: (
             <CodeBlock language="typescript">{`// expo-iap (also exported from react-native-iap)
 import { getPromotedProductIOS } from 'expo-iap';
+import { Platform } from 'react-native';
 
 if (Platform.OS === 'ios') {
   const product = await getPromotedProductIOS();
 }`}</CodeBlock>
           ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx` around
lines 80 - 87, The TypeScript example references Platform.OS but never imports
Platform; update the example around getPromotedProductIOS to either add the
react-native import for Platform (e.g., import { Platform } from 'react-native')
or remove the Platform.OS guard since this API is iOS-only—ensure the snippet
includes the Platform symbol or else drops the guard so copy-paste won't cause a
ReferenceError (look for the CodeBlock that contains getPromotedProductIOS).

62-68: Nit: link target only matches ProductIOS, not the full Promise<…> expression.

Wrapping the entire Promise<ProductIOS | null> in a <Link to="/docs/types/product"> makes the Promise<…> wrapper and null part of the type-page link, which is slightly misleading. Consider linking only the ProductIOS token, e.g.:

✏️ Suggested tweak
-      <p>
-        <Link to="/docs/types/product">
-          <code>Promise&lt;ProductIOS | null&gt;</code>
-        </Link>{' '}
-        — the App Store-promoted product, or <code>null</code> if no campaign is
-        currently queued.
-      </p>
+      <p>
+        <code>
+          Promise&lt;
+          <Link to="/docs/types/product">ProductIOS</Link>
+          {' | null>'}
+        </code>{' '}
+        — the App Store-promoted product, or <code>null</code> if no campaign
+        is currently queued.
+      </p>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx` around
lines 62 - 68, The Link currently wraps the entire code token
"Promise<ProductIOS | null>" which makes the Promise and null parts link to the
Product type page; update the JSX so the <Link to="/docs/types/product"> only
wraps the ProductIOS identifier inside the code expression (e.g., split the code
into surrounding plain/code fragments and wrap just ProductIOS with Link) and
preserve the surrounding "Promise<", " | null", and ">" text and spacing so the
displayed type remains identical but only ProductIOS is clickable.
packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx (2)

77-84: TypeScript example references Platform without an import.

The snippet uses Platform.OS === 'ios' but only imports canPresentExternalPurchaseNoticeIOS. Readers copy-pasting from docs will hit a Platform is not defined error. Either drop the platform guard (the function is already iOS-only and safe-callable elsewhere on this site’s examples) or add the react-native import.

♻️ Proposed fix
           typescript: (
             <CodeBlock language="typescript">{`// expo-iap (also exported from react-native-iap)
+import { Platform } from 'react-native';
 import { canPresentExternalPurchaseNoticeIOS } from 'expo-iap';

 if (Platform.OS === 'ios') {
   const can = await canPresentExternalPurchaseNoticeIOS();
 }`}</CodeBlock>
           ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx`
around lines 77 - 84, The TypeScript snippet uses Platform.OS but doesn't import
Platform, causing a runtime error when copy-pasted; fix by either removing the
platform guard or adding the Platform import from 'react-native' so the check
around canPresentExternalPurchaseNoticeIOS is valid—update the example to
include Platform (import { Platform } from 'react-native') or simply call
canPresentExternalPurchaseNoticeIOS() directly since it's iOS-only; ensure the
symbols Platform and canPresentExternalPurchaseNoticeIOS are the ones referenced
in the change.

67-67: Inconsistent anchoring: Example uses plain <h2> while Returns uses AnchorLink.

The PR makes the page anchor-friendly by introducing AnchorLink for the Returns section, but the Example heading right below remains a plain <h2>, so deep links like #example won't work and the heading lacks the same hover/anchor affordance other docs pages use. Consider switching it to AnchorLink for consistency.

♻️ Proposed fix
-      <h2>Example</h2>
+      <AnchorLink id="example" level="h2">
+        Example
+      </AnchorLink>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx`
at line 67, The "Example" heading is a plain <h2> while the "Returns" section
uses AnchorLink, causing inconsistent anchor behavior; replace the plain
<h2>Example</h2> with the AnchorLink component (use the same pattern as the
Returns heading, e.g., AnchorLink with id or slug "example") so the Example
heading gains the anchor/hover affordance and deep links work consistently;
update any imports if AnchorLink isn't already imported in this component.
packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx (1)

68-73: TypeScript Signature inlines an anonymous object instead of InitConnectionConfig.

The Kotlin/KMP/Dart/GDScript signatures all show the field on InitConnectionConfig, but the TS block introduces an inline config?: { enableBillingProgramAndroid?: ... } shape. Aligning with InitConnectionConfig keeps the page consistent and avoids implying a different TS surface than what packages/gql/src/generated/types.ts exposes.

♻️ Optional alignment
           typescript: (
-            <CodeBlock language="typescript">{`initConnection(config?: {
-  enableBillingProgramAndroid?: BillingProgramAndroid;
-  // ...other fields
-}): Promise<boolean>`}</CodeBlock>
+            <CodeBlock language="typescript">{`// Config field on InitConnectionConfig — wired via initConnection()
+interface InitConnectionConfig {
+  enableBillingProgramAndroid?: BillingProgramAndroid;
+  // ...other fields
+}
+
+function initConnection(config?: InitConnectionConfig): Promise<boolean>`}</CodeBlock>
           ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx`
around lines 68 - 73, The TypeScript example for initConnection should reference
the existing InitConnectionConfig type instead of an inline anonymous object;
update the CodeBlock for the initConnection signature so it shows
initConnection(config?: InitConnectionConfig): Promise<boolean> and ensure
BillingProgramAndroid remains the documented enum type used within
InitConnectionConfig (refer to InitConnectionConfig and initConnection to locate
the snippet and keep types consistent with the generated types file).
packages/docs/src/pages/docs/apis/get-available-purchases.tsx (1)

21-49: Minor: top-line description vs iOS default behavior.

The summary at Lines 21-23 says the result contains "owned non-consumables, active subscriptions, and any pending transactions not yet finished." However, the iOS paragraph below correctly notes that the default reads Transaction.all, which includes refunded/revoked entries — those aren't strictly "owned" anymore. Either qualify the summary (e.g., "On iOS, defaults to the full StoreKit history; pass onlyIncludeActiveItemsIOS to narrow to active entitlements.") or update the summary to match. Optional polish.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/get-available-purchases.tsx` around lines
21 - 49, Update the top-line summary so it accurately reflects iOS default
behavior: mention that on iOS the default reads Transaction.all (the full
StoreKit history which can include refunded/revoked entries) and that passing
onlyIncludeActiveItemsIOS = true switches to Transaction.currentEntitlements to
return only active non-consumables and live subscriptions; reference the symbols
Transaction.all, Transaction.currentEntitlements, and onlyIncludeActiveItemsIOS
in the updated sentence.
packages/docs/src/pages/docs/apis/restore-purchases.tsx (1)

71-79: Returns wording is slightly awkward.

purchaseUpdatedListener / surface as getAvailablePurchases results reads as two alternatives glued with a slash. Consider:

-      <p>
-        <code>Promise&lt;void&gt;</code> — Resolves once the platform finishes
-        the restore. The restored purchases are emitted via{' '}
-        <code>purchaseUpdatedListener</code> / surface as{' '}
-        <code>getAvailablePurchases</code> results, depending on platform.
-      </p>
+      <p>
+        <code>Promise&lt;void&gt;</code> — Resolves once the platform finishes
+        the restore. Restored purchases are not returned directly: on iOS they
+        surface via <code>purchaseUpdatedListener</code> and/or a follow-up
+        <code>getAvailablePurchases</code> call; on Android they are available
+        through <code>getAvailablePurchases</code>.
+      </p>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/restore-purchases.tsx` around lines 71 -
79, The Returns section wording is awkward; update the paragraph under the
AnchorLink with id "returns" to clarify that the Promise resolves when restore
completes and that restored purchases are delivered either via the
purchaseUpdatedListener callback or retrieved via getAvailablePurchases
(depending on platform). Rephrase the sentence to remove the slash and present
the two delivery mechanisms as alternatives, mentioning both
purchaseUpdatedListener and getAvailablePurchases by name for clarity.
packages/docs/src/pages/docs/apis/ios/sync-ios.tsx (1)

57-63: Minor: language-agnostic Returns wording.

The Returns section uses Promise<boolean> but this page presents Swift/Kotlin/Dart/GDScript signatures alongside TypeScript. Swift/Kotlin return Bool/Boolean directly (not a Promise), and the GDScript signature above declares -> Variant. Consider rewording to avoid implying every wrapper returns a JS Promise — e.g., "Resolves to true once the App Store sync completes." Not blocking.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/pages/docs/apis/ios/sync-ios.tsx` around lines 57 - 63, The
Returns block currently shows <code>Promise&lt;boolean&gt;</code>, which implies
a JS promise for all language variants; update the AnchorLink id="returns"
section to use language-agnostic wording such as "Resolves to `true` once the
App Store sync completes." Replace the <code>Promise&lt;boolean&gt;</code>
markup with a neutral phrase (or keep `<code>true</code>` in backticks) so
Swift/Kotlin/Dart/GDScript consumers aren't misled, ensuring the text still
conveys that the call results in true when the sync finishes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/components/CodeBlock.tsx`:
- Around line 116-133: linkifyTypesInTextSegments is re-wrapping text that sits
between an opening and closing tag (e.g. <span class="token">Future</span>); fix
it by tracking tag/stack depth and skipping replacements while inside upstream
token spans: in linkifyTypesInTextSegments iterate the HTML and build segments
by reading tags vs text, push when you see an opening tag whose class includes
"token" (or any upstream wrapper), pop on the matching closing tag, and only run
the /\b([A-Z][a-zA-Z0-9_]*)\b/g -> linkifyType replacement when the token-span
depth is zero; keep linkifyType unchanged and use this stack-based check to
avoid nested <span class="token"> wrappers.

In
`@packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx`:
- Around line 96-124: The Returns documentation is incorrect: update the
documented return shape for BillingProgramAvailabilityResultAndroid to match the
canonical type by replacing the listed fields (remove responseCode and
debugMessage) and instead document exactly two fields: billingProgram (type
BillingProgramAndroid) and isAvailable (type boolean); edit the JSX in the
component that renders the Returns section for
BillingProgramAvailabilityResultAndroid so the <code> and list items show
<code>billingProgram</code> — (<code>BillingProgramAndroid</code>) and
<code>isAvailable</code> — (<code>boolean</code>) and remove the obsolete
entries referencing responseCode and debugMessage.

In `@packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx`:
- Around line 85-177: Update the Parameters documentation and the
TypeScript/Dart/GDScript example snippets to match the actual
LaunchExternalLinkParamsAndroid shape: replace the non-existent keys program and
url with billingProgram and linkUri, and include the required launchMode and
linkType fields (use the same example values as the Kotlin/KMP tabs, e.g.
BillingProgramAndroid.ExternalOffer / "external-offer",
ExternalLinkLaunchModeAndroid.IN_APP_BROWSER, ExternalLinkTypeAndroid.OFFER, and
linkUri "https://example.com/offer"); ensure the Parameters list documents
billingProgram (BillingProgramAndroid), launchMode
(ExternalLinkLaunchModeAndroid), linkType (ExternalLinkTypeAndroid) and linkUri
(string) so copying the TypeScript/Dart/GDScript snippets type-checks with
LaunchExternalLinkParamsAndroid.

In `@packages/docs/src/pages/docs/apis/get-available-purchases.tsx`:
- Around line 108-115: Update the documentation text for includeSuspendedAndroid
to match the GraphQL schema: change the description to "Include suspended
subscriptions (Android 8.1+), which should not be granted entitlements" and
mention that suspended subscriptions have isSuspendedAndroid=true and users
should be directed to the subscription center to resolve payment issues; ensure
this updated wording replaces the existing "paused/grace state" phrasing in the
get-available-purchases page where includeSuspendedAndroid is documented.

In `@packages/docs/src/pages/docs/apis/get-storefront.tsx`:
- Around line 71-76: Update the Returns section for getStorefront() to include
the empty-string fallback so the anchored `#returns` entry fully describes the
contract: state that it returns Promise<string> — an ISO 3166-1 alpha-2
storefront code (e.g. "US", "KR") or an empty string when the storefront cannot
be determined; then remove the duplicate trailing paragraph (lines referencing
the same fallback) to avoid conflicting documentation. Ensure the wording
mentions the empty-string fallback and the distinction that this is the App
Store / Play Store account region, not device locale.

In `@packages/docs/src/pages/docs/apis/init-connection.tsx`:
- Around line 105-106: Update the docs text referencing Android billing programs
so the version claim is accurate: edit the sentence that currently says "a Play
Billing 8.2.0+ program (External Payments etc.)" to use one of the actual 8.2.0+
programs such as EXTERNAL_CONTENT_LINK or EXTERNAL_OFFER and, if mentioning
EXTERNAL_PAYMENTS, note it is gated to Play Billing 8.3.0+ per the
InitConnectionConfig JSDoc; locate references to enableBillingProgramAndroid and
the InitConnectionConfig examples and replace the example/program name or adjust
the version number accordingly.

In `@packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx`:
- Around line 92-99: The TypeScript example uses Platform.OS but never imports
Platform, causing a ReferenceError; update the example to import Platform (e.g.,
add "import { Platform } from 'react-native';") alongside the existing
beginRefundRequestIOS import so the conditional Platform.OS === 'ios' check
works when readers copy-paste the snippet.
- Around line 55-57: The GDScript examples incorrectly use await and the wrong
parameter name; update the examples for begin_refund_request_ios to call it
synchronously and pass product_id instead of sku (the real implementation in
godot_iap.gd returns a Types.RefundResultIOS immediately via _native_plugin.call
and is not awaitable). Locate the GDScript snippets (e.g., the gdscript
CodeBlock showing "func begin_refund_request_ios(...)" and other examples in
refund.tsx) and remove any leading await keywords and rename the parameter from
sku to product_id so the example matches the actual function signature and
return type.

In `@packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx`:
- Around line 49-72: The TypeScript doc signature for isEligibleForIntroOfferIOS
and its Parameters entry use the wrong parameter name `groupID`; update the
TypeScript CodeBlock and the Parameters bullet to use `groupId` (camelCase) to
match the actual implementation and IDE intellisense; locate the TypeScript
entry under LanguageTabs for isEligibleForIntroOfferIOS and replace
`isEligibleForIntroOfferIOS(groupID: string): Promise<boolean>` with the correct
`isEligibleForIntroOfferIOS(groupId: string): Promise<boolean>`, and change the
Parameters list item to show `<code>groupId</code>` and the descriptive text
accordingly.

In `@packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx`:
- Around line 54-66: The GDScript snippet currently declares the return type as
-> Variant but the JSDoc and implementation use Types.VoidResult; update the
gdscript code block for present_code_redemption_sheet_ios() to use ->
Types.VoidResult (and apply the same change for the other iOS functions like
sync_ios() and clear_transaction_ios()) so the declaration matches the JSDoc and
the implementation that returns Types.VoidResult.from_dict(); ensure you
reference Types.VoidResult in each affected LanguageTabs gdscript snippet.

In
`@packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx`:
- Around line 95-135: Update the docs for
showExternalPurchaseCustomLinkNoticeIOS and the
ExternalPurchaseCustomLinkNoticeResultIOS description: replace all bogus enum
literals in the LanguageTabs examples with the single valid value (use
Swift/Kotlin/Dart PascalCase/enum variant Browser or .browser as appropriate,
TypeScript/GDScript use the string 'browser'), and change the return description
text to state the result shape is { continued: boolean; error?: string | null }
(remove any mention of "continue / cancelled" or a disclosure-type field);
ensure examples across swift, kotlin, typescript, dart, and gdscript reference
ExternalPurchaseCustomLinkNoticeTypeIOS/Browser or the 'browser' literal and the
prose describes continued plus optional error only.

In `@packages/docs/src/pages/docs/apis/ios/sync-ios.tsx`:
- Around line 51-53: The GDScript snippet for function sync_ios currently shows
the return type as Variant; update the CodeBlock for gdscript so the function
signature reads "func sync_ios() -> Types.VoidResult" to match the docstring,
implementation, and tests (look for the CodeBlock containing `func sync_ios() ->
Variant` and change Variant to Types.VoidResult).

In `@packages/docs/src/pages/docs/apis/restore-purchases.tsx`:
- Around line 23-45: Update the iOS wording to accurately describe behavior:
state that restorePurchases() calls syncIOS()/AppStore.sync() to refresh
StoreKit's transaction state and that restored purchases are then read via
getAvailablePurchases() (or accessed via Transaction.currentEntitlements as a
read-only property) rather than "re-emits entitlements"; reference
restorePurchases(), syncIOS(), AppStore.sync(), getAvailablePurchases(), and
Transaction.currentEntitlements when making the change. Also verify and correct
the Android docs link anchor (the current "#fetch" may be invalid) to point to
the appropriate Google Play Billing section.

---

Outside diff comments:
In `@packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx`:
- Around line 63-65: Update the Swift docs to match the actual API by adding the
options parameter to the Swift signature and example: change the displayed
signature for deepLinkToSubscriptions to include (_ options: DeepLinkOptions?)
and update the usage example (e.g., pass nil or a DeepLinkOptions instance) so
the docs align with the implementation of public func deepLinkToSubscriptions(_
options: DeepLinkOptions?) async throws -> Void and the Parameters section
describing DeepLinkOptions.

In `@packages/docs/src/pages/docs/apis/get-available-purchases.tsx`:
- Around line 55-60: Update the TypeScript signature shown for
getAvailablePurchases to include the missing includeSuspendedAndroid field on
the inline PurchaseOptions type so it matches the Parameters text and the
generated PurchaseOptions in packages/gql/src/generated/types.ts; modify the
CodeBlock that declares getAvailablePurchases(PurchaseOptions) to add
includeSuspendedAndroid?: boolean to the PurchaseOptions interface so consumers
and docs are consistent with the getAvailablePurchases function and generated
types.

In
`@packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx`:
- Around line 139-143: The paragraph references non-existent notice types
(.acquisition, .services); update the prose to reflect the actual enum in
ExternalPurchaseCustomLinkNoticeTypeIOS by removing the outdated examples and
either describe that noticeType currently supports only the browser option
(i.e., ExternalPurchaseCustomLinkNoticeTypeIOS.browser) and what it means, or
delete the sentence until other notice types are added; ensure the guidance
around the noticeType prop and its purpose is accurate and mentions
ExternalPurchaseCustomLinkNoticeTypeIOS and browser by name so readers aren’t
misled.

In `@packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx`:
- Around line 49-129: The Swift signature and examples for validateReceiptIOS
are inconsistent with the SDK types and the required VerifyPurchaseProps shape:
update the Swift signature to use VerifyPurchaseProps and
VerifyPurchaseResultIOS (matching OpenIapModule.shared.validateReceiptIOS and
other tabs), and change all examples to pass the nested apple object shape for
VerifyPurchaseProps (Kotlin: use VerifyPurchaseProps(apple =
VerifyPurchaseAppleOptions(sku = ...)), TypeScript: use { apple: { sku: ... } },
Dart: pass apple: const VerifyPurchaseAppleOptions(sku: ...) to
VerifyPurchaseProps, and GDScript: use {"apple": {"sku": ...}}) so the signature
and examples align with the actual verifyPurchase types and OpenIapModule
implementation.

In `@packages/docs/src/pages/docs/apis/request-purchase.tsx`:
- Around line 109-111: The GDScript signature for request_purchase is
incorrectly typed as returning Purchase; update the signature shown in the
CodeBlock for the request_purchase function to use the project's convention and
return Variant (i.e., change the displayed return type from Purchase to Variant)
so it matches platform-specific nullable returns like
PurchaseAndroid?/PurchaseIOS? and other docs such as get_receipt_data_ios().

---

Nitpick comments:
In
`@packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx`:
- Around line 68-73: The TypeScript example for initConnection should reference
the existing InitConnectionConfig type instead of an inline anonymous object;
update the CodeBlock for the initConnection signature so it shows
initConnection(config?: InitConnectionConfig): Promise<boolean> and ensure
BillingProgramAndroid remains the documented enum type used within
InitConnectionConfig (refer to InitConnectionConfig and initConnection to locate
the snippet and keep types consistent with the generated types file).

In `@packages/docs/src/pages/docs/apis/get-available-purchases.tsx`:
- Around line 21-49: Update the top-line summary so it accurately reflects iOS
default behavior: mention that on iOS the default reads Transaction.all (the
full StoreKit history which can include refunded/revoked entries) and that
passing onlyIncludeActiveItemsIOS = true switches to
Transaction.currentEntitlements to return only active non-consumables and live
subscriptions; reference the symbols Transaction.all,
Transaction.currentEntitlements, and onlyIncludeActiveItemsIOS in the updated
sentence.

In `@packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx`:
- Around line 83-93: The "Returns" section currently names the type as
`Promise<boolean>`, which is JS/TS-specific; update the prose under the
AnchorLink with id="returns" in the has-active-subscriptions page to use
language that is language-agnostic (for example "resolves to true when at least
one (matching) subscription is active" or "returns true when…") instead of
`Promise<boolean>`, keeping the reference to `getActiveSubscriptions` and the
existing explanation intact so Swift/Kotlin/Dart/GDScript readers aren't misled.

In
`@packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx`:
- Around line 77-84: The TypeScript snippet uses Platform.OS but doesn't import
Platform, causing a runtime error when copy-pasted; fix by either removing the
platform guard or adding the Platform import from 'react-native' so the check
around canPresentExternalPurchaseNoticeIOS is valid—update the example to
include Platform (import { Platform } from 'react-native') or simply call
canPresentExternalPurchaseNoticeIOS() directly since it's iOS-only; ensure the
symbols Platform and canPresentExternalPurchaseNoticeIOS are the ones referenced
in the change.
- Line 67: The "Example" heading is a plain <h2> while the "Returns" section
uses AnchorLink, causing inconsistent anchor behavior; replace the plain
<h2>Example</h2> with the AnchorLink component (use the same pattern as the
Returns heading, e.g., AnchorLink with id or slug "example") so the Example
heading gains the anchor/hover affordance and deep links work consistently;
update any imports if AnchorLink isn't already imported in this component.

In `@packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx`:
- Around line 80-87: The TypeScript example references Platform.OS but never
imports Platform; update the example around getPromotedProductIOS to either add
the react-native import for Platform (e.g., import { Platform } from
'react-native') or remove the Platform.OS guard since this API is
iOS-only—ensure the snippet includes the Platform symbol or else drops the guard
so copy-paste won't cause a ReferenceError (look for the CodeBlock that contains
getPromotedProductIOS).
- Around line 62-68: The Link currently wraps the entire code token
"Promise<ProductIOS | null>" which makes the Promise and null parts link to the
Product type page; update the JSX so the <Link to="/docs/types/product"> only
wraps the ProductIOS identifier inside the code expression (e.g., split the code
into surrounding plain/code fragments and wrap just ProductIOS with Link) and
preserve the surrounding "Promise<", " | null", and ">" text and spacing so the
displayed type remains identical but only ProductIOS is clickable.

In `@packages/docs/src/pages/docs/apis/ios/sync-ios.tsx`:
- Around line 57-63: The Returns block currently shows
<code>Promise&lt;boolean&gt;</code>, which implies a JS promise for all language
variants; update the AnchorLink id="returns" section to use language-agnostic
wording such as "Resolves to `true` once the App Store sync completes." Replace
the <code>Promise&lt;boolean&gt;</code> markup with a neutral phrase (or keep
`<code>true</code>` in backticks) so Swift/Kotlin/Dart/GDScript consumers aren't
misled, ensuring the text still conveys that the call results in true when the
sync finishes.

In `@packages/docs/src/pages/docs/apis/restore-purchases.tsx`:
- Around line 71-79: The Returns section wording is awkward; update the
paragraph under the AnchorLink with id "returns" to clarify that the Promise
resolves when restore completes and that restored purchases are delivered either
via the purchaseUpdatedListener callback or retrieved via getAvailablePurchases
(depending on platform). Rephrase the sentence to remove the slash and present
the two delivery mechanisms as alternatives, mentioning both
purchaseUpdatedListener and getAvailablePurchases by name for clarity.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7095aab6-58c6-4ee9-aeb8-d0bd6022f2ca

📥 Commits

Reviewing files that changed from the base of the PR and between 0e6410c and 5c8ea3e.

📒 Files selected for processing (50)
  • libraries/expo-iap/src/useIAP.ts
  • libraries/react-native-iap/src/hooks/useIAP.ts
  • packages/docs/src/components/CodeBlock.tsx
  • packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx
  • packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx
  • packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx
  • packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx
  • packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx
  • packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx
  • packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx
  • packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx
  • packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx
  • packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/end-connection.tsx
  • packages/docs/src/pages/docs/apis/fetch-products.tsx
  • packages/docs/src/pages/docs/apis/finish-transaction.tsx
  • packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/get-available-purchases.tsx
  • packages/docs/src/pages/docs/apis/get-storefront.tsx
  • packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx
  • packages/docs/src/pages/docs/apis/init-connection.tsx
  • packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-external-purchase-custom-link-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/sync-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx
  • packages/docs/src/pages/docs/apis/request-purchase.tsx
  • packages/docs/src/pages/docs/apis/restore-purchases.tsx
  • packages/docs/src/pages/docs/types/external-purchase-link.tsx
  • packages/docs/src/styles/documentation.css
✅ Files skipped from review due to trivial changes (3)
  • packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx
  • libraries/expo-iap/src/useIAP.ts
  • libraries/react-native-iap/src/hooks/useIAP.ts
🚧 Files skipped from review as they are similar to previous changes (13)
  • packages/docs/src/pages/docs/apis/fetch-products.tsx
  • packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx
  • packages/docs/src/pages/docs/types/external-purchase-link.tsx
  • packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx
  • packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx
  • packages/docs/src/pages/docs/apis/finish-transaction.tsx
  • packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx

Comment thread packages/docs/src/components/CodeBlock.tsx
Comment thread packages/docs/src/pages/docs/apis/get-available-purchases.tsx
Comment thread packages/docs/src/pages/docs/apis/get-storefront.tsx
Comment thread packages/docs/src/pages/docs/apis/ios/sync-ios.tsx
Comment thread packages/docs/src/pages/docs/apis/restore-purchases.tsx
- CodeBlock.tsx: linkifyTypesInTextSegments was still wrapping text
  inside existing keyword/function spans because splitting on
  `<...>` boundaries doesn't tell you whether you're INSIDE a tag.
  Added a depth counter so capitals are only linkified at depth 0 —
  Dart `Future`, GDScript `String`, etc. now keep their keyword color
  instead of getting nested under a class-name span.

- is-billing-program-available-android.tsx: Returns table fields
  corrected to match the canonical `BillingProgramAvailabilityResultAndroid`
  type (`billingProgram` + `isAvailable`); removed the
  `responseCode`/`debugMessage` rows that were pure invention.

- launch-external-link-android.tsx: Parameters list and TS/Dart/GDScript
  examples used non-existent `program` and `url` fields. Replaced
  with the real `LaunchExternalLinkParamsAndroid` shape:
  `billingProgram` + `launchMode` + `linkType` + `linkUri`.

- get-available-purchases.tsx: aligned `includeSuspendedAndroid`
  description with schema wording — "suspended subscriptions
  (Android Billing 8.1+)" + warning that suspended entries must NOT
  grant entitlements.

- get-storefront.tsx: folded the orphan trailing
  "empty string when storefront can't be determined" paragraph into
  the Returns section so anchor-linkers see the full contract.

- init-connection.tsx: clarified that
  `enableBillingProgramAndroid: 'external-payments'` needs Play
  Billing 8.3.0+ (Japan only); the 8.2.0+ programs are
  `EXTERNAL_CONTENT_LINK` / `EXTERNAL_OFFER`.

- begin-refund-request-ios.tsx: GDScript signature corrected to
  `(product_id: String) -> Types.RefundResultIOS` (was `(sku) ->
  Variant`); GDScript example dropped the `await` because the impl
  is synchronous; TS example now imports `Platform` from
  `react-native`.

- is-eligible-for-intro-offer-ios.tsx: TypeScript signature uses
  `groupId` (camelCase wrapper) while keeping `groupID` (Swift
  convention) on the Swift / Kotlin tabs; Parameters note explains
  the discrepancy.

- present-code-redemption-sheet-ios.tsx + sync-ios.tsx: GDScript
  `-> Variant` corrected to `-> Types.VoidResult` (matches the
  godot-iap docstring + actual return).

- show-external-purchase-custom-link-notice-ios.tsx + the External
  Purchase Link type page: rewrote the Notice noticeType + result
  shape — the only valid `ExternalPurchaseCustomLinkNoticeTypeIOS`
  is `'browser'` (Apple's canonical name), and the result is
  `{ continued: boolean; error?: string }`, not the invented
  `result: 'continue' | 'cancelled'` + `noticeType` echo.

- restore-purchases.tsx: rewrote the iOS sentence — `restorePurchases`
  delegates to `syncIOS()` which calls `AppStore.sync()` to refresh
  StoreKit's transaction state; restored purchases are then read via
  `getAvailablePurchases`. Android docs anchor changed from `#fetch`
  (doesn't exist on the integration page) to the integration page
  itself.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

/gemini review

@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

…moval

The previous commit left a blank-line/whitespace artifact after deleting
the trailing 'empty string when storefront can't be determined' paragraph.
CI Format Check caught it; running `bunx prettier --write` cleans up.

Will tighten the per-file pre-commit checklist by running prettier
locally on every touched file before pushing — should have caught this
before the CI job ran.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request comprehensively updates API documentation across all supported platforms by adding detailed descriptions, examples, and deep links to the official documentation site. It also enhances the documentation site with automatic type-linkification in code blocks and various CSS layout fixes for mobile viewports. Feedback focuses on maintaining SDK parity by aligning the default product query type on iOS with other platforms, correcting parameter name mismatches in JSDoc signatures, and ensuring GDScript return types in the documentation accurately reflect the underlying implementation.

Comment thread packages/apple/Sources/OpenIapModule.swift Outdated
Comment thread libraries/expo-iap/src/index.ts Outdated
Comment thread libraries/expo-iap/src/index.ts Outdated
Comment thread libraries/react-native-iap/src/index.ts Outdated
Comment thread libraries/react-native-iap/src/index.ts Outdated
Comment thread packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx Outdated
Comment thread packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx
Comment thread packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx
…godot return types

- packages/apple OpenIapModule.swift: fetchProducts default `.all` →
  `.inApp` for SDK parity. Flutter, expo-iap, react-native-iap, and
  godot-iap all default to `'in-app'` already; Apple was the outlier
  per Gemini's audit. Updated both the doc comment and the
  `params.type ?? .all` fallback. swift build passes.

- expo-iap src/index.ts: JSDoc parameter names now match the actual
  destructured / forwarded names — `fetchProducts(@param request)`
  (was `params`), `requestPurchase(@param args)` (was `props`).

- react-native-iap src/index.ts: same fix —
  `fetchProducts(@param request)` and `requestPurchase(@param request)`.

- 4 iOS doc pages: GDScript signatures with sloppy `-> Variant` fixed
  to the real return type from `godot-iap/addons/godot-iap/godot_iap.gd`:
  - can-present-external-purchase-notice-ios → `bool`
  - is-transaction-verified-ios → `bool`
  - get-transaction-jws-ios → `String`
  - get-receipt-data-ios → `String`

Pre-commit checks now run cleanly: prettier --check passes, vite build
passes, expo-iap tsc passes, swift build passes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

/gemini review

@hyochan
Copy link
Copy Markdown
Member Author

hyochan commented Apr 26, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a monorepo-wide documentation update, adding direct links to the official documentation and improving JSDoc, KDoc, DartDoc, and GDScript comments across all SDKs and core platform packages. It also enhances the documentation site by adding automatic linkification of OpenIAP types in code blocks and fixing various CSS issues related to sidebar positioning and table responsiveness. Additionally, it aligns the Apple SDK's default product fetch type with other platforms by changing it to .inApp. I have no feedback to provide.

Two follow-ups to the user's PR #107 polish round:

1. Mobile drawer overlay was rgba(0,0,0,0.5) with a 2px blur. On long
   pages (especially with code blocks behind), readers could still
   make out the page content under the dimmed strip and misread it as
   a z-index bug. Pushed alpha to 0.78 and blur to 6px (with the
   `-webkit-backdrop-filter` fallback for iOS Safari) so the page
   content is effectively masked behind the open drawer.

2. SSOT consistency audit. Coderabbit's PR #107 review surfaced the
   same class of drift over and over — docs claiming a default,
   field, enum value, or version number that the SDK code didn't
   actually use. To prevent that recurring without manual policing:

   - knowledge/internal/07-docs-consistency.md (new) captures the
     rules: SSOT priority order (schema → generated types → wrapper
     SDK → docs page), the eight failure modes we encountered (R1–R8),
     and a pre-commit checklist that includes the audit script.
   - scripts/audit-docs.ts (new) parses every /docs/apis and
     /docs/types page and:
       - Resolves every internal `<Link to="/docs/...">` against the
         actual filesystem (R5 — hard failure).
       - Validates that field-name claims inside `<ul className=
         "api-params">` lists exist somewhere in the generated
         `libraries/expo-iap/src/types.ts` interfaces (R3 — advisory
         warning, since top-level scalar function params legitimately
         appear in those lists too).
   - `bun audit:docs` script wired in the root package.json; CLAUDE.md
     index updated to point at the new doc + script.

   Caught one real broken `<Link>` already:
   `/docs/types/ios/subscription-offer-ios` doesn't exist; retargeted
   to `/docs/types/ios/discount-offer-ios` (DiscountOfferIOS, the
   actual type covering iOS WinBack / promotional offers).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx (2)

132-147: TypeScript and Dart examples discard the result; other tabs keep it.

Swift/Kotlin/GDScript examples capture result = so readers can see how to inspect continued / error. The TypeScript and Dart snippets just await the call, which leaves the most important part (the return shape that the Returns section just documented) unused.

♻️ Suggested tweak
           typescript: (
             <CodeBlock language="typescript">{`// expo-iap (also exported from react-native-iap)
 import { Platform } from 'react-native';
 import { showExternalPurchaseCustomLinkNoticeIOS } from 'expo-iap';

 if (Platform.OS === 'ios') {
-  await showExternalPurchaseCustomLinkNoticeIOS('browser');
+  const result = await showExternalPurchaseCustomLinkNoticeIOS('browser');
+  if (result.continued) {
+    // route the user to your external purchase URL
+  }
 }`}</CodeBlock>
           ),
           dart: (
             <CodeBlock language="dart">{`if (Platform.isIOS) {
-  await FlutterInappPurchase.instance.showExternalPurchaseCustomLinkNoticeIOS(
-    ExternalPurchaseCustomLinkNoticeTypeIOS.Browser,
-  );
+  final result = await FlutterInappPurchase.instance
+      .showExternalPurchaseCustomLinkNoticeIOS(
+    ExternalPurchaseCustomLinkNoticeTypeIOS.Browser,
+  );
 }`}</CodeBlock>
           ),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx`
around lines 132 - 147, Update the TypeScript and Dart examples to capture and
surface the function result instead of discarding it: assign the awaited return
value from showExternalPurchaseCustomLinkNoticeIOS (TypeScript) and
FlutterInappPurchase.instance.showExternalPurchaseCustomLinkNoticeIOS (Dart) to
a variable like result so readers can inspect properties such as continued or
error consistent with the Swift/Kotlin/GDScript examples and the Returns
documentation.

155-159: Per-language casing mapping is ambiguous.

The trailing note lists three languages (Swift / Kotlin / Dart) but only two literals (.browser / .Browser). Readers can't tell which is which. Swift uses .browser (lowercase); Kotlin and Dart use .Browser (PascalCase, matching the examples above). Worth spelling that out explicitly.

✏️ Suggested wording
       <p>
         <code>ExternalPurchaseCustomLinkNoticeTypeIOS</code> currently has a
-        single value: <code>'browser'</code> (case-sensitive — Swift / Kotlin /
-        Dart spell it as <code>.browser</code> / <code>.Browser</code>).
+        single value: <code>'browser'</code> (case-sensitive — Swift uses
+        <code>.browser</code>, Kotlin and Dart use <code>.Browser</code>).
       </p>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx`
around lines 155 - 159, Update the per-language casing note for
ExternalPurchaseCustomLinkNoticeTypeIOS to explicitly map each language to its
literal: state that Swift uses `.browser` (lowercase), while Kotlin and Dart use
`.Browser` (PascalCase); replace the ambiguous "Swift / Kotlin / Dart spell it
as `.browser` / `.Browser`" with the clear three-way mapping so readers can
unambiguously see which casing applies to Swift, Kotlin, and Dart.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx`:
- Around line 142-197: Examples use incorrect enum members for
ExternalLinkLaunchModeAndroid and ExternalLinkTypeAndroid; update all language
examples (kotlin, kmp, typescript, dart, gdscript) to use the canonical enum
values. Replace IN_APP_BROWSER / in-app-browser / inAppBrowser / IN_APP_BROWSER
with LaunchInExternalBrowserOrApp (or CallerWillLaunchLink / Unspecified as
appropriate) for ExternalLinkLaunchModeAndroid, and replace OFFER / offer /
.offer / OFFER with LinkToDigitalContentOffer (or LinkToAppDownload /
Unspecified as appropriate) for ExternalLinkTypeAndroid; ensure the
LaunchExternalLinkParamsAndroid construction (LaunchExternalLinkParamsAndroid,
launchExternalLinkAndroid,
FlutterInappPurchase.instance.launchExternalLinkAndroid,
iap.launch_external_link_android) uses the corrected enum identifiers for each
language binding so examples compile/type-check.

In
`@packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx`:
- Around line 22-36: Update the incorrect JSDoc that states "iOS 18.2+" to the
correct "iOS 17.4+" so it matches Apple's docs; locate the JSDoc that documents
ExternalPurchase.canPresent (in the module exporting
presentExternalPurchaseNoticeSheetIOS / ExternalPurchase.canPresent) and change
the iOS version text to "iOS 17.4+".

In `@packages/docs/src/pages/docs/apis/restore-purchases.tsx`:
- Around line 76-84: Update the Returns text for restorePurchases to avoid
implying restored purchases are emitted to the purchaseUpdatedListener by
default; state that restorePurchases resolves when the platform completes
restore and that restored entitlements are returned via getAvailablePurchases
(and that on iOS the wrapper calls getAvailablePurchases with
alsoPublishToEventListenerIOS: false, so listeners are not re-emitted unless
platform/native behavior differs). Reference restorePurchases,
getAvailablePurchases, and purchaseUpdatedListener so readers can locate the
relevant behavior and mention the alsoPublishToEventListenerIOS flag to explain
the iOS-specific behavior.

In `@scripts/audit-docs.ts`:
- Line 494: The script currently calls main() directly which allows rejections
from walkTsxFiles/buildTypeIndex or file I/O to become unhandled; change the
invocation to call main().catch(err => { log the error (including err.stack or
err.message) to console or the existing logger and exit with a non-zero code })
so any promise rejection is logged clearly and the process exits
deterministically.

---

Nitpick comments:
In
`@packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx`:
- Around line 132-147: Update the TypeScript and Dart examples to capture and
surface the function result instead of discarding it: assign the awaited return
value from showExternalPurchaseCustomLinkNoticeIOS (TypeScript) and
FlutterInappPurchase.instance.showExternalPurchaseCustomLinkNoticeIOS (Dart) to
a variable like result so readers can inspect properties such as continued or
error consistent with the Swift/Kotlin/GDScript examples and the Returns
documentation.
- Around line 155-159: Update the per-language casing note for
ExternalPurchaseCustomLinkNoticeTypeIOS to explicitly map each language to its
literal: state that Swift uses `.browser` (lowercase), while Kotlin and Dart use
`.Browser` (PascalCase); replace the ambiguous "Swift / Kotlin / Dart spell it
as `.browser` / `.Browser`" with the clear three-way mapping so readers can
unambiguously see which casing applies to Swift, Kotlin, and Dart.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fa5c069e-ea29-4c9d-9bc6-03c2f9a926c7

📥 Commits

Reviewing files that changed from the base of the PR and between 5c8ea3e and ab49572.

📒 Files selected for processing (26)
  • CLAUDE.md
  • knowledge/internal/07-docs-consistency.md
  • libraries/expo-iap/src/index.ts
  • libraries/react-native-iap/src/index.ts
  • package.json
  • packages/apple/Sources/OpenIapModule.swift
  • packages/docs/src/components/CodeBlock.tsx
  • packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx
  • packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx
  • packages/docs/src/pages/docs/apis/get-available-purchases.tsx
  • packages/docs/src/pages/docs/apis/get-storefront.tsx
  • packages/docs/src/pages/docs/apis/init-connection.tsx
  • packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/sync-ios.tsx
  • packages/docs/src/pages/docs/apis/restore-purchases.tsx
  • packages/docs/src/pages/docs/types/discount-offer.tsx
  • packages/docs/src/pages/docs/types/external-purchase-link.tsx
  • packages/docs/src/styles/documentation.css
  • scripts/audit-docs.ts
✅ Files skipped from review due to trivial changes (5)
  • CLAUDE.md
  • package.json
  • knowledge/internal/07-docs-consistency.md
  • packages/docs/src/pages/docs/apis/init-connection.tsx
  • libraries/expo-iap/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (10)
  • packages/docs/src/pages/docs/apis/get-storefront.tsx
  • packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx
  • packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx
  • packages/docs/src/pages/docs/apis/get-available-purchases.tsx
  • packages/docs/src/pages/docs/types/discount-offer.tsx
  • packages/docs/src/pages/docs/types/external-purchase-link.tsx
  • packages/docs/src/components/CodeBlock.tsx
  • packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx
  • packages/docs/src/styles/documentation.css
  • packages/apple/Sources/OpenIapModule.swift

Comment thread packages/docs/src/pages/docs/apis/restore-purchases.tsx
Comment thread scripts/audit-docs.ts Outdated
@hyochan hyochan force-pushed the docs/openiap-dev-references-all-libs branch from 25bfc35 to 5b4f239 Compare April 26, 2026 13:10
Several rounds of "z-index 9001 should beat the top nav's 100" still
left the docs Menu button un-tappable, the top nav hamburger
overlapping the docs sidebar toggle, and (the final straw) a closed
drawer still absorbing taps on its child links because
`visibility: hidden; opacity: 0` alone doesn't stop iOS Safari from
delivering touches to a fixed subtree.

This squashes the iterative fixes into one coherent change:

- Hide the top nav hamburger on /docs routes so the docs sidebar
  toggle is the only "open menu" affordance there.
- Push the toggle below the sticky top nav (top: 70px, scrolled: 64px)
  and portal it to document.body so it sits outside any ancestor's
  stacking context.
- Unmount the toggle while the drawer is open — leaving it in the DOM
  with `.hidden { pointer-events: none }` still let iOS Safari swallow
  taps meant for the drawer's "APIs" / open child rows underneath.
- Slide the closed drawer off-screen (translateX(-100%)) and disable
  pointer-events on it so child links stop firing while it looks
  closed.
- Bump baseline-browser-mapping to ^2.10.22 to silence the
  "data is over two months old" warning from browserslist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan hyochan force-pushed the docs/openiap-dev-references-all-libs branch from 5b4f239 to 224b833 Compare April 26, 2026 13:10
hyochan and others added 2 commits April 26, 2026 22:14
- launch-external-link-android: replace fictional enum members
  (IN_APP_BROWSER, OFFER, in-app-browser, offer, .inAppBrowser, .offer)
  with the canonical values from each binding —
  ExternalLinkLaunchModeAndroid.LaunchInExternalBrowserOrApp /
  launch-in-external-browser-or-app /
  LAUNCH_IN_EXTERNAL_BROWSER_OR_APP, and ExternalLinkTypeAndroid
  .LinkToDigitalContentOffer / link-to-digital-content-offer /
  LINK_TO_DIGITAL_CONTENT_OFFER — so all 5 example tabs actually
  compile.
- canPresentExternalPurchaseNoticeIOS JSDoc in expo-iap and
  react-native-iap: was "iOS 18.2+", but ExternalPurchase.canPresent
  has been available since iOS 17.4. The notice sheet itself remains
  iOS 18.2+; clarified in the comment so callers don't conflate the
  two.
- scripts/audit-docs.ts: wrap main() in .catch so unhandled
  rejections from walkTsxFiles / buildTypeIndex / file I/O surface
  as a clear "audit-docs: fatal error" message and exit code 2,
  instead of bubbling up as a confusing trace.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The KMP example only showed the constructor approach, missing the
trailing-lambda DSL form that kmp-iap exposes via the
ProductsRequestBuilder extension. Updated the kmp tab to demonstrate
both:

  1) Builder (constructor) — pass ProductRequest, get
     FetchProductsResult to unwrap by variant.
  2) DSL — trailing-lambda builder, returns List<Product> directly.

requestPurchase already shows both Kotlin DSL and Dart
requestPurchaseWithBuilder; fetchProducts has no builder API in
Dart (no fetchProductsWithBuilder exists), so KMP is the only tab
that needed updating. The TypeScript tab already includes both
root-API and useIAP hook examples.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is a docs-focused cross-linking and consistency pass across OpenIAP’s GraphQL schema descriptions, docs site API/type pages, and wrapper SDK JSDoc/KDoc-style comments, plus some responsive UI fixes for the docs site navigation and code blocks.

Changes:

  • Added canonical openiap.dev links and richer descriptions to GraphQL schema docstrings (core + Android-specific APIs).
  • Updated docs-site pages with platform behavior blurbs, parameters/returns/throws sections, and improved responsive layout (sidebar drawer, overlays, code-block header/tab bar).
  • Added/expanded wrapper hook/API doc comments to link to the corresponding openiap.dev reference pages; introduced a docs consistency guide + audit script wiring.

Reviewed changes

Copilot reviewed 104 out of 110 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/gql/src/api.graphql Adds canonical doc URLs + clarified API descriptions for core GraphQL operations.
packages/gql/src/api-android.graphql Adds canonical doc URLs + clarified Android mutation docs (alt billing + billing programs).
packages/docs/src/styles/responsive.css Removes conflicting mobile sidebar rules (defers to documentation.css mobile drawer rules).
packages/docs/src/styles/documentation.css Fixes sidebar/table mobile behavior; improves overlay/toggle z-index and drawer hit-testing.
packages/docs/src/styles/code.css Reworks code-block header into an attached “tab bar”; styles linkified type refs.
packages/docs/src/pages/docs/** Adds platform behavior blurbs and stronger reference structure across many API/type pages.
packages/docs/src/pages/docs/index.tsx Portals docs sidebar toggle to document.body and unmounts it while open to avoid tap conflicts.
packages/docs/src/components/Navigation.tsx Hides the top-nav mobile hamburger/dropdown on /docs routes to avoid overlap with docs sidebar toggle.
packages/docs/src/components/CodeBlock.tsx Adds type-name linkification in highlighted code snippets via a TYPE_LINKS map.
packages/docs/package.json Adds baseline-browser-mapping dependency.
package.json Adds audit:docs script entrypoint.
libraries/react-native-iap/src/hooks/useIAP.ts Adds/expands JSDoc blocks linking to openiap.dev references for hook APIs.
libraries/expo-iap/src/useIAP.ts Adds/expands JSDoc blocks linking to openiap.dev references for hook APIs.
libraries/expo-iap/src/modules/android.ts Adds @see links for Android module-level APIs.
knowledge/internal/07-docs-consistency.md New SSOT consistency rules doc + audit workflow guidance.
bun.lock Locks dependency updates for docs package additions.
CLAUDE.md Links the new docs consistency guide and references running bun audit:docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread libraries/react-native-iap/src/hooks/useIAP.ts Outdated
Comment thread libraries/expo-iap/src/useIAP.ts Outdated
Comment thread packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx Outdated
Comment thread packages/docs/src/pages/docs/apis/fetch-products.tsx
Comment thread packages/docs/src/components/Navigation.tsx Outdated
- fetchProducts JSDoc (`@throws`) in expo-iap and react-native-iap
  (root + useIAP hook): the underlying StoreKit/Play call returns an
  empty array for unknown SKUs, so "unknown SKU" was misleading.
  Reworded to "empty `skus`, not connected, network/store error" and
  added a clarifying note that unknown SKUs are silently omitted.
- fetch-products docs page iOS blurb: same correction —
  `Product.products(for:)` does not validate SKUs; only transport
  failures throw.
- present-external-purchase-link-ios: the openiap-apple
  implementation calls `UIApplication.open` after a `canOpenURL`
  guard, not StoreKit's `ExternalPurchaseLink.open(url:)`. Updated
  the description and the reference link to match what the code
  actually does, while keeping the "production builds still need
  the StoreKit external-purchase entitlement" caveat.
- Navigation.tsx: stop hiding the top-nav hamburger and dropdown on
  /docs routes — that stranded Introduction / Languages / Tutorials /
  Sponsors behind only the logo link on mobile. The earlier
  tap-conflict between this menu and the docs sidebar toggle was
  fixed at the source (closed docs sidebar uses
  `pointer-events: none` + `translateX(-100%)`); the two affordances
  also don't overlap geometrically (top-right vs. left-below-nav).
  Auto-close the dropdown on every route change for safety.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyochan hyochan merged commit 9fe76da into main Apr 26, 2026
14 checks passed
@hyochan hyochan deleted the docs/openiap-dev-references-all-libs branch April 26, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cross-platform Cross-platform (both Android & iOS) 📖 documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants