docs: split apis & types into flat per-symbol pages with platform folders#106
Conversation
…ders Restructures the docs site so every API function and every type has its own dedicated page with field tables, deprecated markers, and References sections that link back to the canonical OpenIAP GraphQL schema. - Flatten /docs/apis and /docs/types: one page per symbol, platform- specific symbols moved under apis/ios, apis/android, types/ios, types/android - Move Validation, Refund, Debugging out of APIs into Features, drop the IAPKit explainer + provider-based verifyPurchase walkthrough - Add nested MenuDropdown groups so the sidebar surfaces every symbol while keeping iOS/Android subgroups collapsible - Audit every field cell against the GraphQL schema: backfill missing fields (subscriptionOffers, discountOffers, RenewalInfoIOS.json Representation, ActiveSubscription deferred/parent/receipt fields, BillingProgram availability, ExternalPurchase notice token, etc.) and link non-primitive type cells to their reference page - Mark deprecated fields and types with strikethrough + "Deprecated." hint and rename surfaced labels to canonical schema names (Product Subscription* and ProductAndroidOneTimePurchaseOfferDetail) - Sidebar UX: sticky positioning fix via overflow-x: clip, horizontal scroll for long identifiers, right padding so labels do not collide with the scrollbar, and remove the Types definition-zip downloader - Update routes, searchData, navigation, and every cross-page reference to the new URLs; legacy /docs/apis/<category>#anchor links redirect through the new flat paths Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
/gemini review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughRestructures the docs site into granular per-API and per-type pages, replaces legacy hash-anchor navigation with path-based routes and redirect helpers, refactors the sidebar/menu to support nested groups with ARIA/disclosure semantics, rewrites search/index data, and adds many new API, type, event, and feature pages (including Refund, Validation, Debugging, Getting Started, and Setup). Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Restructures the docs site to use one page per API/type symbol (with iOS/Android subfolders), while updating navigation/components and auditing docs content to match the canonical GraphQL schema.
Changes:
- Split previously grouped/anchor-based API & Types docs into flat per-symbol pages, including platform folders.
- Updated many internal links/routes to the new per-page structure and moved some sections from APIs to Features.
- Extended
MenuDropdownto support nested groups for sidebar navigation.
Reviewed changes
Copilot reviewed 95 out of 105 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs/src/pages/docs/types/subscription-product.tsx | New per-symbol page for ProductSubscription type with platform tabs. |
| packages/docs/src/pages/docs/types/storefront.tsx | New per-symbol page for Storefront type. |
| packages/docs/src/pages/docs/types/purchase.tsx | Refactors “Purchase Types” into a single Purchase type reference page; updates links and adds fields. |
| packages/docs/src/pages/docs/types/product.tsx | Refactors “Product Types” into a single Product page and moves subscription/storefront content out to new pages. |
| packages/docs/src/pages/docs/types/product-request.tsx | New per-symbol page for ProductRequest. |
| packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx | New iOS-specific type page under types/ios. |
| packages/docs/src/pages/docs/types/ios/subscription-period-ios.tsx | New iOS-specific type page under types/ios. |
| packages/docs/src/pages/docs/types/ios/payment-mode-ios.tsx | New iOS-specific type page under types/ios. |
| packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx | New (deprecated) iOS-specific type page under types/ios. |
| packages/docs/src/pages/docs/types/ios/discount-ios.tsx | New (deprecated) iOS-specific type page under types/ios. |
| packages/docs/src/pages/docs/types/ios/app-transaction-ios.tsx | New iOS-specific type page for AppTransaction with examples. |
| packages/docs/src/pages/docs/types/discount-offer.tsx | New cross-platform DiscountOffer type page. |
| packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx | New Android-specific (deprecated) subscription offer details page. |
| packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx | New Android-specific pricing phase type page. |
| packages/docs/src/pages/docs/types/android/one-time-purchase-offer-detail-android.tsx | New Android-specific (deprecated) one-time offer detail page. |
| packages/docs/src/pages/docs/types/active-subscription.tsx | New per-symbol page for ActiveSubscription (moved out of Purchase Types). |
| packages/docs/src/pages/docs/setup/react-native.tsx | Updates internal references to new API routes. |
| packages/docs/src/pages/docs/lifecycle/subscription.tsx | Updates many internal links to new per-page API/type routes. |
| packages/docs/src/pages/docs/lifecycle/index.tsx | Updates lifecycle links to new per-page API routes; points verification to Features/Validation. |
| packages/docs/src/pages/docs/ios-setup.tsx | Updates internal link to finishTransaction API page. |
| packages/docs/src/pages/docs/features/validation.tsx | Moves “Validation APIs” into “Validation” feature page and updates routing/links. |
| packages/docs/src/pages/docs/features/subscription/upgrade-downgrade.tsx | Updates links to new API routes. |
| packages/docs/src/pages/docs/features/subscription/index.tsx | Updates links to new API/type routes and Validation section. |
| packages/docs/src/pages/docs/features/subscription-billing-issue.tsx | Updates links to new API routes. |
| packages/docs/src/pages/docs/features/purchase.tsx | Updates internal links to new routes (APIs and type refs). |
| packages/docs/src/pages/docs/features/offer-code-redemption.tsx | Updates link to new iOS API route. |
| packages/docs/src/pages/docs/features/external-purchase.tsx | Adds an id to a heading and updates several links to new routes. |
| packages/docs/src/pages/docs/features/discount.tsx | Updates link to new DiscountOffer type page. |
| packages/docs/src/pages/docs/features/debugging.tsx | Moves “Debugging APIs” into “Debugging” feature page and updates references/links. |
| packages/docs/src/pages/docs/events.tsx | Updates links to new per-page API/type routes. |
| packages/docs/src/pages/docs/errors.tsx | Updates link target for PurchaseError reference (currently points to the same page). |
| packages/docs/src/pages/docs/apis/subscription.tsx | Removes grouped “Subscription APIs” page in favor of per-symbol API pages. |
| packages/docs/src/pages/docs/apis/restore-purchases.tsx | New per-symbol API page for restorePurchases. |
| packages/docs/src/pages/docs/apis/request-purchase.tsx | New per-symbol API page for requestPurchase. |
| packages/docs/src/pages/docs/apis/products.tsx | Removes grouped “Product APIs” page in favor of per-symbol API pages. |
| packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx | New iOS per-symbol API page for deprecated validateReceiptIOS. |
| packages/docs/src/pages/docs/apis/ios/sync-ios.tsx | New iOS per-symbol API page for syncIOS. |
| packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx | New iOS per-symbol API page for subscriptionStatusIOS. |
| packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx | New iOS per-symbol API page for showManageSubscriptionsIOS. |
| packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx | New iOS per-symbol API page for deprecated requestPurchaseOnPromotedProductIOS. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx | New iOS per-symbol API page for presentExternalPurchaseNoticeSheetIOS. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx | New iOS per-symbol API page for presentExternalPurchaseLinkIOS. |
| packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx | New iOS per-symbol API page for presentCodeRedemptionSheetIOS. |
| packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx | New iOS per-symbol API page for latestTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx | New iOS per-symbol API page for isTransactionVerifiedIOS. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx | New iOS per-symbol API page for isEligibleForIntroOfferIOS. |
| packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx | New iOS per-symbol API page for getTransactionJwsIOS. |
| packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx | New iOS per-symbol API page for deprecated getStorefrontIOS. |
| packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx | New iOS per-symbol API page for getReceiptDataIOS. |
| packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx | New iOS per-symbol API page for getPromotedProductIOS. |
| packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx | New iOS per-symbol API page for getPendingTransactionsIOS. |
| packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx | New iOS per-symbol API page for getAppTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx | New iOS per-symbol API page for getAllTransactionsIOS. |
| packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx | New iOS per-symbol API page for currentEntitlementIOS. |
| packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx | New iOS per-symbol API page for clearTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx | New iOS per-symbol API page for canPresentExternalPurchaseNoticeIOS. |
| packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx | New iOS per-symbol API page for beginRefundRequestIOS. |
| packages/docs/src/pages/docs/apis/ios.tsx | Removes the grouped iOS API index page in favor of per-symbol pages. |
| packages/docs/src/pages/docs/apis/init-connection.tsx | New per-symbol API page for initConnection. |
| packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx | New per-symbol API page for hasActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/get-storefront.tsx | New per-symbol API page for getStorefront. |
| packages/docs/src/pages/docs/apis/get-available-purchases.tsx | New per-symbol API page for getAvailablePurchases. |
| packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx | New per-symbol API page for getActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/finish-transaction.tsx | New per-symbol API page for finishTransaction. |
| packages/docs/src/pages/docs/apis/fetch-products.tsx | New per-symbol API page for fetchProducts. |
| packages/docs/src/pages/docs/apis/end-connection.tsx | New per-symbol API page for endConnection. |
| packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx | New per-symbol API page for deepLinkToSubscriptions. |
| packages/docs/src/pages/docs/apis/connection.tsx | Removes grouped “Connection APIs” page in favor of per-symbol API pages. |
| packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx | New Android per-symbol API page for showAlternativeBillingDialogAndroid. |
| packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx | New Android per-symbol API page for launchExternalLinkAndroid. |
| packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx | New Android per-symbol API page for isBillingProgramAvailableAndroid. |
| packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx | New Android per-symbol API page for enableBillingProgramAndroid. |
| packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx | New Android per-symbol API page for createBillingProgramReportingDetailsAndroid. |
| packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx | New Android per-symbol API page for createAlternativeBillingTokenAndroid. |
| packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx | New Android per-symbol API page for consumePurchaseAndroid. |
| packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx | New Android per-symbol API page for checkAlternativeBillingAvailabilityAndroid. |
| packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx | New Android per-symbol API page for acknowledgePurchaseAndroid. |
| packages/docs/src/components/MenuDropdown.tsx | Adds nested menu group support for sidebar nav. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 8
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
packages/docs/src/lib/searchData.ts (2)
564-571:⚠️ Potential issue | 🟡 Minor
discountsearch entry points at a removed anchor.
path: '/docs/types/ios#discount'(Line 570) targeted the old grouped iOS types page that no longer exists —index.tsxnow redirectstypes/iosto/docs/types, which will strip the anchor and dump the user on the Types index. The new home for this content appears to be/docs/types/ios/discount-ios.🔧 Proposed fix
- path: '/docs/types/ios#discount', + path: '/docs/types/ios/discount-ios',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/lib/searchData.ts` around lines 564 - 571, The search entry with id 'discount' currently points to a removed anchor at path '/docs/types/ios#discount'; update the path for the entry object whose id is 'discount' in searchData.ts (the entry with title 'Discount' and category 'Types (iOS)') to the new canonical URL '/docs/types/ios/discount-ios' so search results link directly to the correct page.
515-553:⚠️ Potential issue | 🟡 MinorStale legacy
types/*paths in search data now resolve to redirects.These entries still target the old grouped routes that
index.tsx(Lines 770-793) now redirects to/docs/types:
- Line 521
types-request→/docs/types/request(redirects)- Line 529
types-verification→/docs/types/verification(redirects)- Line 537
types-ios→/docs/types/ios(redirects)- Line 544
types-android→/docs/types/android(redirects)- Line 552
types-alternative→/docs/types/alternative(redirects)Selecting any of these from search will land users on the Types index page instead of the granular content the description advertises (e.g., "ProductRequest, RequestPurchaseProps, platform-specific request types"). Recommend either repointing each to a canonical new page (e.g.,
types-request→/docs/types/product-requestor/docs/types/request-purchase-props) or dropping the duplicates so search surfaces only the per-symbol entries already present elsewhere in this file.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/lib/searchData.ts` around lines 515 - 553, The search entries with ids types-request, types-verification, types-ios, types-android, and types-alternative point to legacy grouped routes that now redirect to /docs/types; fix by either repointing each entry's path to the new canonical per-symbol pages (e.g., change types-request.path from /docs/types/request to a specific page like /docs/types/product-request or /docs/types/request-purchase-props, update types-verification, types-ios, types-android, types-alternative similarly) and adjust their description to match the new target, or remove these duplicate entries so the search only surfaces the existing per-symbol entries already present in the data; ensure you modify the objects with id 'types-request', 'types-verification', 'types-ios', 'types-android', and 'types-alternative' in the search data.packages/docs/src/pages/docs/types/request-purchase-props.tsx (1)
195-203:⚠️ Potential issue | 🟡 MinorInconsistent enum reference in GDScript example (
ProductType.SUBSvsProductQueryType.IN_APP).Line 192 uses
ProductQueryType.IN_APPwhile line 202 usesProductType.SUBSfor the same discriminator. Per the OpenIAP terminology (and the Kotlin/Dart examples elsewhere on this page usingProductQueryType), both should useProductQueryType.-subs_props.type = ProductType.SUBS +subs_props.type = ProductQueryType.SUBS🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/request-purchase-props.tsx` around lines 195 - 203, The GDScript example uses two different enums for the product discriminator; replace the inconsistent ProductType.SUBS with the ProductQueryType variant used earlier so both lines use ProductQueryType (e.g., change ProductType.SUBS to ProductQueryType.SUBS) and verify other examples (RequestPurchaseProps / RequestSubscriptionPropsByPlatforms / RequestSubscriptionIosProps) use ProductQueryType consistently.
🟡 Minor comments (21)
packages/docs/src/pages/docs/apis/end-connection.tsx-51-60 (1)
51-60:⚠️ Potential issue | 🟡 MinorExample uses
initConnectionwithout importing it.The import line on Line 51 only brings in
endConnection, but the snippet callsinitConnectionon Line 55. Users copy/pasting will hit aReferenceError.🔧 Proposed fix
- <CodeBlock language="typescript">{`import { endConnection } from 'expo-iap'; + <CodeBlock language="typescript">{`import { initConnection, endConnection } from 'expo-iap';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/apis/end-connection.tsx` around lines 51 - 60, The code sample imports only endConnection but calls initConnection, causing a ReferenceError; update the example import to include initConnection (e.g., import { initConnection, endConnection } from 'expo-iap') or remove the initConnection call and adjust the useEffect accordingly so the symbols used (initConnection, endConnection) match the import in the CodeBlock in end-connection.tsx.packages/docs/src/pages/docs/types/ios/payment-mode-ios.tsx-11-20 (1)
11-20:⚠️ Potential issue | 🟡 MinorRename title and heading from
PaymentModetoPaymentModeIOS.The canonical iOS type is
PaymentModeIOS(defined intype-ios.graphql), distinct from the cross-platformPaymentMode. The documentation page correctly lives intypes/ios/payment-mode-ios.tsx, but the SEO title,<h1>, anchor id, and description all incorrectly omit theIOSsuffix. Update toPaymentModeIOSto align with the schema and comply with the naming convention that iOS types must use theIOSsuffix.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/payment-mode-ios.tsx` around lines 11 - 20, Rename the page title, heading and anchor to use the iOS-specific name: change the SEO title prop value from "PaymentMode" to "PaymentModeIOS", update the description string to mention PaymentModeIOS, change the <h1> content from "PaymentMode" to "PaymentModeIOS", and update the AnchorLink id and its visible label from "payment-mode" to "payment-mode-ios" so the page, title prop, <h1>, and AnchorLink (id/label) consistently use PaymentModeIOS.packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx-22-25 (1)
22-25:⚠️ Potential issue | 🟡 MinorFix incorrect deprecation target and use Link component for client-side routing.
The deprecation message points to
SubscriptionOffer, butDiscountOfferIOS(an iOS-specific promotional offer payload) should deprecate to the cross-platformDiscountOffertype, notSubscriptionOffer(which describes subscription offer metadata). Additionally, use theLinkcomponent for consistency with other type documentation pages.🔧 Proposed fix
+import { Link } from 'react-router-dom'; import AnchorLink from '../../../../components/AnchorLink';<strong>Deprecated:</strong> Use{' '} - <a href="/docs/types/subscription-offer">SubscriptionOffer</a>{' '} + <Link to="/docs/types/discount-offer">DiscountOffer</Link> instead. - instead.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx` around lines 22 - 25, The deprecation text in the DiscountOfferIOS doc is pointing to the wrong target and uses a raw anchor; update the message to deprecate to the cross-platform DiscountOffer (not SubscriptionOffer) and replace the <a href="/docs/types/subscription-offer">...</a> with the Link component pointing to the cross-platform path (e.g., /docs/types/discount-offer) so client-side routing is used; locate the deprecation block in the DiscountOfferIOS component (symbol: DiscountOfferIOS) and swap the target text and link component accordingly, ensuring the visible link text reads "DiscountOffer".packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx-41-49 (1)
41-49:⚠️ Potential issue | 🟡 Minor
renewalInfofield list is incomplete vs. content below.The summary lists only
willAutoRenewandautoRenewPreference, but the “iOS Expiration Reasons” section at lines 107–154 documentsrenewalInfo.expirationReason. That field should appear in the field table for schema parity (one of the explicit goals of this PR).♻️ Proposed addition
<td> - Renewal details. Contains: <code>willAutoRenew</code>,{' '} - <code>autoRenewPreference</code> + Renewal details. Contains: <code>willAutoRenew</code>,{' '} + <code>autoRenewPreference</code>,{' '} + <code>expirationReason</code> </td>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx` around lines 41 - 49, The table row for renewalInfo is missing the renewalInfo.expirationReason field; update the schema table entry for <code>renewalInfo</code> to include renewalInfo.expirationReason alongside willAutoRenew and autoRenewPreference so it matches the “iOS Expiration Reasons” section (renewalInfo.expirationReason) documented later in the file; ensure the table text lists all three fields exactly as referenced.packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx-27-27 (1)
27-27:⚠️ Potential issue | 🟡 MinorUpdate the return type to match the canonical schema.
The signature shows
[SubscriptionStatus], but the GraphQL schema and all generated code (Swift, TypeScript, Kotlin, Dart, GDScript) define the return type as[SubscriptionStatusIOS]. Change the return type annotation to[SubscriptionStatusIOS]for consistency.Current code
func subscriptionStatusIOS(sku: String) async throws -> [SubscriptionStatus]🤖 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/subscription-status-ios.tsx` at line 27, The Swift function signature shown in the CodeBlock for subscriptionStatusIOS is returning the wrong type; update the return type in the CodeBlock from [SubscriptionStatus] to [SubscriptionStatusIOS] so it matches the canonical GraphQL/schema-generated types (change the snippet for func subscriptionStatusIOS(sku: String) async throws -> [SubscriptionStatus] to use -> [SubscriptionStatusIOS]).packages/docs/src/pages/docs/features/external-purchase.tsx-2806-2810 (1)
2806-2810:⚠️ Potential issue | 🟡 MinorFix typo in related-doc description text.
Line 2809 likely has a typo: “Onside & alternative billing flows”. Please correct to a standard term (for example, “On-site” or “Onside” if intentional and defined elsewhere) for clarity.
✏️ Suggested text fix
- - Onside & alternative billing flows + - On-site & alternative billing flows🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/features/external-purchase.tsx` around lines 2806 - 2810, The related-doc description contains a typo: the phrase "Onside & alternative billing flows" inside the Link JSX should be corrected to a standard term—replace "Onside" with "On-site" (i.e., update the text node following the <Link> element to "On-site & alternative billing flows") to improve clarity while keeping the rest of the JSX unchanged.packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx-13-24 (1)
13-24:⚠️ Potential issue | 🟡 MinorMinimum iOS version mismatch.
The description says "iOS 12.2+", but the signature uses StoreKit 2's
async throwsform, which requires iOS 15+ (StoreKit 2). Intro-offer eligibility was originally available since iOS 12.2 via StoreKit 1, but with this async API the effective minimum should be iOS 15+. Please align the SEO description, body copy, and any availability annotation with the StoreKit 2 baseline used elsewhere in the docs.🤖 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/is-eligible-for-intro-offer-ios.tsx` around lines 13 - 24, The page currently claims "iOS 12.2+" but the implementation/signature uses StoreKit 2 (async/throws) which requires iOS 15+, so update the SEO description, page body copy, and any availability annotation to state "iOS 15+" (or the StoreKit 2 baseline used elsewhere) to match the async API; locate references to isEligibleForIntroOfferIOS, the page description string and the paragraph content and replace "iOS 12.2+" with "iOS 15+" (and adjust any `@availability` or platform-badge annotations to the same baseline).packages/docs/src/pages/docs/apis/finish-transaction.tsx-29-31 (1)
29-31:⚠️ Potential issue | 🟡 MinorSwift signature is inconsistent with the Swift example and other languages.
The Swift signature on Line 30 is declared as
func finishTransaction(_ purchase: Purchase) async throws(noisConsumable), but the Swift example on Line 64 callsfinishTransaction(purchase, isConsumable: false). TypeScript, Kotlin, KMP, Dart, and GDScript signatures all includeisConsumable. Either the signature is missing the parameter, or the example is using one that doesn't exist.📝 Likely fix (align Swift signature with other languages and the example)
swift: ( - <CodeBlock language="swift">{`func finishTransaction(_ purchase: Purchase) async throws`}</CodeBlock> + <CodeBlock language="swift">{`func finishTransaction(_ purchase: Purchase, isConsumable: Bool = false) async throws`}</CodeBlock> ),Also applies to: 62-65
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/apis/finish-transaction.tsx` around lines 29 - 31, The Swift API signature for finishTransaction is missing the isConsumable parameter; update the declaration(s) of func finishTransaction(_ purchase: Purchase) async throws to include isConsumable: Bool (matching the example call finishTransaction(purchase, isConsumable: false) and other language signatures), and make the same change for the other Swift occurrences around the example lines so the docs and sample callsites are consistent with the TypeScript/Kotlin/Dart/GDScript signatures.packages/docs/src/pages/docs/types/subscription-offer.tsx-249-261 (1)
249-261:⚠️ Potential issue | 🟡 MinorConfirm
installmentPlanDetailsAndroidlink target.The type
InstallmentPlanDetailsAndroidis referenced in a table on/docs/types/android/subscription-offer-androidat line 93, but has no dedicated heading or section. The link will load the page but won't navigate to a specific section about this type. Consider either adding a dedicated heading and anchor (e.g.,#installment-plan-details-android) for this type documentation, or creating a separate page if its definition warrants fuller documentation. Currently, readers will need to scroll to find the type in the table.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/subscription-offer.tsx` around lines 249 - 261, The table entry for installmentPlanDetailsAndroid links to the page "subscription-offer-android" but there is no dedicated heading/anchor for InstallmentPlanDetailsAndroid, so update the target page by adding a clear section heading and anchor (for example "#installment-plan-details-android" or "## InstallmentPlanDetailsAndroid") that documents the InstallmentPlanDetailsAndroid type, or if the type needs fuller docs, create a new page for InstallmentPlanDetailsAndroid and update the table link to point to that new page; ensure the link text InstallmentPlanDetailsAndroid and the anchor match exactly so the link navigates directly to the type documentation.packages/docs/src/pages/docs/types/subscription-offer.tsx-93-123 (1)
93-123:⚠️ Potential issue | 🟡 Minor"Common" fields link to iOS-specific documentation pages.
The fields
periodandpaymentModeare listed under Common Fields (with noIOSsuffix, matching cross-platform conventions), yet their type links reference iOS-only documentation paths:
SubscriptionPeriod→/docs/types/ios/subscription-period-iosPaymentMode→/docs/types/ios/payment-mode-iosThe SubscriptionOffer page explicitly states support for "both iOS and Android," so these should link to platform-agnostic reference pages. Either create common documentation pages for these types, or move the fields to the iOS-Specific Fields section and rename them with the
IOSsuffix per project conventions.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/subscription-offer.tsx` around lines 93 - 123, The SubscriptionOffer doc lists the fields period and paymentMode as common but links them to iOS-only pages; update the references so common fields point to platform-agnostic types or move them to the iOS-specific section with IOS suffixes. Specifically, either create/point to cross-platform pages for SubscriptionPeriod and PaymentMode (replace Link targets from /docs/types/ios/subscription-period-ios and /docs/types/ios/payment-mode-ios to their common equivalents) or relocate the period and paymentMode rows into the iOS-specific block and rename them to periodIOS/paymentModeIOS (and link to the existing iOS pages) so the documentation matches the stated platform support.packages/docs/src/pages/docs/apis/fetch-products.tsx-101-104 (1)
101-104:⚠️ Potential issue | 🟡 MinorLink label "SubscriptionProduct" doesn't match the destination page title.
The destination at
/docs/types/subscription-productrenders<h1>ProductSubscription</h1>and SEOtitle="ProductSubscription". Using a different label here ("SubscriptionProduct") is confusing — readers see one name in the link and a different one when they land. Pick one canonical name (the schema/sibling pages all use ProductSubscription) and align both this label and any other call sites.📝 Proposed fix
<p className="type-link"> See: <Link to="/docs/types/product">Product</Link>,{' '} - <Link to="/docs/types/subscription-product">SubscriptionProduct</Link> + <Link to="/docs/types/subscription-product">ProductSubscription</Link> </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/fetch-products.tsx` around lines 101 - 104, The link label "SubscriptionProduct" is inconsistent with the canonical page title "ProductSubscription"; update the Link whose to="/docs/types/subscription-product" to use the label "ProductSubscription" (and audit other call sites that reference "/docs/types/subscription-product" to ensure they use the same "ProductSubscription" label), keeping the destination path unchanged so clicking still navigates to the existing page.packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx-78-87 (1)
78-87:⚠️ Potential issue | 🟡 MinorLink label "PricingPhasesAndroid" disagrees with the destination page title.
The destination at
/docs/types/android/pricing-phase-androidrenders<h1>PricingPhaseAndroid</h1>(singular). Either the destination page should be plural (the field on Google Play Billing ispricingPhases, plural), or this label should match the destination's canonical name. As-is, readers click "PricingPhasesAndroid" and land on a page titled "PricingPhaseAndroid".📝 Quick fix (label-only)
<Link to="/docs/types/android/pricing-phase-android"> - <code>PricingPhasesAndroid</code> + <code>PricingPhaseAndroid</code> </Link>Or rename the destination page/route to
pricing-phases-androidfor the plural form.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx` around lines 78 - 87, The link label for the field pricingPhases currently reads "PricingPhasesAndroid" but points to the page whose canonical title is "PricingPhaseAndroid" (destination route pricing-phase-android); update them to match: either change the link label to "PricingPhaseAndroid" in the component that renders the <Link> to pricing-phase-android (so the label and target title agree), or rename the destination page/route and its <h1> from PricingPhaseAndroid to PricingPhasesAndroid (and the file/route to pricing-phases-android) so the plural label correctly reflects the canonical page name.packages/docs/src/pages/docs/types/subscription-product.tsx-251-317 (1)
251-317:⚠️ Potential issue | 🟡 Minor
subscriptionOffers/discountOffersare described as cross-platform but live in platform-specific tables.Both rows are labeled "Cross-platform array of …" yet
subscriptionOffersis duplicated under both iOS and Android, anddiscountOffersonly appears under Android. If they truly are cross-platform per the canonical schema (the PR description calls them out as backfilled cross-platform fields), they belong in the Common Fields table — not duplicated platform-side. Otherwise, drop the "Cross-platform" phrasing.📝 Suggested change
Move both
subscriptionOffersanddiscountOffersrows up into the Common Fields table (lines 40–144) and remove them from the iOS (251–261) and Android (296–317) tables.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/subscription-product.tsx` around lines 251 - 317, The docs mark subscriptionOffers and discountOffers as "Cross-platform" but they are duplicated in platform-specific tables; move the <code>subscriptionOffers</code> and <code>discountOffers</code> rows from the ProductSubscriptionAndroid and ProductSubscriptionIOS sections into the Common Fields table (the shared fields block) so they appear once as cross-platform, and remove their platform-specific duplicates under the ProductSubscriptionAndroid and ProductSubscriptionIOS anchor sections (ProductSubscriptionAndroid / ProductSubscriptionIOS identifiers) — alternatively, if they are not truly shared, keep them per-platform but remove the "Cross-platform" phrasing from those rows.packages/docs/src/pages/docs/apis/request-purchase.tsx-27-48 (1)
27-48:⚠️ Potential issue | 🟡 MinorUpdate Kotlin/KMP return type in docs — currently shows
List<Purchase>but should beRequestPurchaseResult?The documented signature
suspend fun requestPurchase(props: RequestPurchaseProps): List<Purchase>is incorrect. The actual return type isRequestPurchaseResult?, a sealed interface that wraps either a singlePurchase?(viaRequestPurchaseResultPurchase) orList<Purchase>?(viaRequestPurchaseResultPurchases). This design intentionally handles platform-specific behavior where Android may return multiple purchases per invocation while iOS returns one. Update the Kotlin/KMP docs snippet to reflect the correct sealed type.🤖 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 27 - 48, The Kotlin/KMP docs show an incorrect return type for requestPurchase — update the kotlin and kmp CodeBlock entries so the signature matches the actual API: use suspend fun requestPurchase(props: RequestPurchaseProps): RequestPurchaseResult? instead of List<Purchase>; reference the sealed interface types RequestPurchaseResult and its variants RequestPurchaseResultPurchase / RequestPurchaseResultPurchases to clarify the possible wrapped results (single Purchase? or List<Purchase>?) in the docs snippet for requestPurchase(RequestPurchaseProps).packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx-88-99 (1)
88-99:⚠️ Potential issue | 🟡 MinorLink
InstallmentPlanDetailsAndroid?or document the gap in linking non-primitive types.The field uses a non-primitive type but lacks a link, while
PricingPhasesAndroidon the same page is properly linked to its reference. Per the PR description, non-primitive type cells should link to reference pages. Either create aninstallment-plan-details-android.tsxpage and link it, or document why this type is an exception to the linking pattern.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx` around lines 88 - 99, The table row for the field using the non-primitive type InstallmentPlanDetailsAndroid is missing a link to its reference page; either create a new reference page component named installment-plan-details-android.tsx that documents the InstallmentPlanDetailsAndroid shape (mirroring how PricingPhasesAndroid is documented) and update the table cell to link to that page, or if this type is intentionally undocumented, add a short note in the table cell explaining the exception; locate the usage in the subscription-offer-android.tsx row for <code>installmentPlanDetails</code> and ensure the cell points to the new installment-plan-details-android reference or contains the documented exception.packages/docs/src/pages/docs/apis/request-purchase.tsx-109-111 (1)
109-111:⚠️ Potential issue | 🟡 MinorDart example contradicts the documented signature.
The Dart signature on line 44 shows
Future<Purchase?> requestPurchase(RequestPurchaseProps props), but the example on line 110 callsFlutterInappPurchase.instance.requestPurchase('com.app.premium')with a plain string. The actual Dart library requiresRequestPurchaseProps; the example must be updated to match.📝 Suggested fix
dart: ( - <CodeBlock language="dart">{`await FlutterInappPurchase.instance.requestPurchase('com.app.premium');`}</CodeBlock> + <CodeBlock language="dart">{`await FlutterInappPurchase.instance.requestPurchase( + RequestPurchaseProps.inApp(( + apple: RequestPurchaseIosProps(sku: 'com.app.premium'), + google: RequestPurchaseAndroidProps(skus: ['com.app.premium']), + )), +);`}</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/request-purchase.tsx` around lines 109 - 111, The Dart example currently calls requestPurchase with a plain string which contradicts the documented signature Future<Purchase?> requestPurchase(RequestPurchaseProps props); update the example to pass a RequestPurchaseProps object (e.g., construct a RequestPurchaseProps with the product id and any required fields) when calling FlutterInappPurchase.instance.requestPurchase so the example matches the RequestPurchaseProps-based signature and the requestPurchase method usage.packages/docs/src/pages/docs/types/external-purchase-link.tsx-244-262 (1)
244-262:⚠️ Potential issue | 🟡 MinorGDScript snippet: two
class_namedeclarations in one file is invalid.GDScript only allows a single
class_nameper file (it registers the script as a global class), so the snippet at Lines 246 and 251 declaring bothExternalPurchaseLinkResultIOSandExternalPurchaseNoticeResultIOScannot compile as-is. Since this is a code-as-documentation example, consider splitting into two fenced blocks (one per file) or rewriting using innerclassdeclarations to avoid leading users astray.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/external-purchase-link.tsx` around lines 244 - 262, The GDScript snippet uses two top-level class_name declarations (ExternalPurchaseLinkResultIOS and ExternalPurchaseNoticeResultIOS) which is invalid; update the docs by either splitting into two separate fenced code blocks (one file per class) or keep a single code block but remove the second top-level class_name and make ExternalPurchaseNoticeResultIOS a non-global inner class (or plain class) and keep the enum ExternalPurchaseNoticeAction as-is; ensure the symbols ExternalPurchaseLinkResultIOS, ExternalPurchaseNoticeResultIOS, and ExternalPurchaseNoticeAction are clearly shown but only one class_name appears per code block/file.packages/docs/src/pages/docs/types/external-purchase-link.tsx-13-19 (1)
13-19:⚠️ Potential issue | 🟡 MinorTighten SEO copy: stray double spaces and awkward "Types type definition" phrasing.
keywords="External Purchase Link Types, OpenIAP types, External Purchase Link Types"repeats the same phrase, and the second copy contains double spaces between every word. The description ("External Purchase Link Types type definition and field reference.") reads awkwardly because the title already ends in "Types". The page actually documents both APIs and result types, so a cleaner title without the trailingTypesmay also fit better.✏️ Proposed tweak
<SEO - title="External Purchase Link Types" - description="External Purchase Link Types type definition and field reference." + title="External Purchase Link" + description="iOS External Purchase Link APIs and result types (iOS 17.4+ / 18.2+)." path="/docs/types/external-purchase-link" - keywords="External Purchase Link Types, OpenIAP types, External Purchase Link Types" + keywords="External Purchase Link, OpenIAP types, ExternalPurchaseNoticeResultIOS, ExternalPurchaseLinkResultIOS, iOS 17.4, iOS 18.2" /> - <h1>External Purchase Link Types</h1> + <h1>External Purchase Link</h1>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/external-purchase-link.tsx` around lines 13 - 19, The SEO props and heading are awkward and contain duplicate/double-spaced keywords: update the SEO component props and the page H1 to be concise and accurate—change the title prop and the <h1> text from "External Purchase Link Types" to e.g. "External Purchase Links", replace description with something like "Definitions and field reference for external purchase links and related API results.", and clean the keywords prop to a single, comma-separated list without duplicates or double spaces (modify the SEO component usage and the h1 in this file: the SEO component props title, description, keywords and the page's <h1>).packages/docs/src/pages/docs/types/alternative-billing-types.tsx-165-170 (1)
165-170:⚠️ Potential issue | 🟡 MinorSwift example calls
initConnection()twice with a misleading comment.The second call labelled "Check connection status" just invokes
initConnection()again, which doesn't represent a connection-status check. Either remove the second call or replace it with the actual status API.📝 Suggested cleanup
<CodeBlock language="swift">{`// iOS uses standard StoreKit billing // Alternative billing is Android-only -try await OpenIapModule.shared.initConnection() - -// Check connection status -let isConnected = try await OpenIapModule.shared.initConnection()`}</CodeBlock> +try await OpenIapModule.shared.initConnection()`}</CodeBlock>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/alternative-billing-types.tsx` around lines 165 - 170, The Swift example incorrectly calls OpenIapModule.shared.initConnection() twice; remove the duplicate "Check connection status" call or replace it with the real connection-status API instead of calling initConnection() again. Locate the sample using OpenIapModule.shared.initConnection() in the CodeBlock and either drop the second invocation and reuse the first returned value (e.g., let isConnected = try await OpenIapModule.shared.initConnection()), or replace the second line with the actual status-check method (e.g., OpenIapModule.shared.isConnected() or the project’s equivalent) so the example accurately reflects checking connection status.packages/docs/src/pages/docs/types/billing-programs.tsx-446-461 (1)
446-461:⚠️ Potential issue | 🟡 MinorDart
requestPurchaseexample uses an outdated/positional signature.The TypeScript and Kotlin examples on this page use the
RequestPurchaseProps/RequestPurchasePropsByPlatforms/google: { skus, developerBillingOption }shape. The Dart variant callsFlutterInappPurchase.instance.requestPurchase('product_id', developerBillingOption: ...), which doesn't match the DartrequestPurchasesignature shown elsewhere in the docs (request-purchase-props.tsxlines 162–171 usesRequestPurchaseProps(request: RequestPurchasePropsByPlatforms(google: RequestPurchaseAndroidProps(...)))). Please harmonize.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/billing-programs.tsx` around lines 446 - 461, Update the Dart example to use the structured RequestPurchaseProps payload instead of the old positional signature: call FlutterInappPurchase.instance.requestPurchase with a named RequestPurchaseProps(request: RequestPurchasePropsByPlatforms(google: RequestPurchaseAndroidProps(...))) containing skus (list) and the developerBillingOption set to DeveloperBillingOptionParamsAndroid(...) with billingProgram set to BillingProgramAndroid.externalPayments and linkUri/launchMode as shown; ensure you reference FlutterInappPurchase.instance.requestPurchase, RequestPurchaseProps, RequestPurchasePropsByPlatforms, RequestPurchaseAndroidProps, and DeveloperBillingOptionParamsAndroid so the Dart example matches the TypeScript/Kotlin shapes.packages/docs/src/pages/docs/types/billing-programs.tsx-258-289 (1)
258-289:⚠️ Potential issue | 🟡 MinorInconsistent type cell formatting in
DeveloperBillingOptionParamsAndroidtable.Two issues in this table compared to the rest of the file:
BillingProgramAndroid(line 264) is not wrapped in a<Link>, while every other occurrence on this page links to#billing-program-android(e.g., lines 126–128, 159–161, 204–206).linkUriis documented as<code>String</code>(capitalized) on line 275 and again on line 340 (DeveloperProvidedBillingDetailsAndroid), butstringlowercase is used on line 170 / 236 andbooleanlowercase on line 117. Pick one casing for primitive type cells.📝 Suggested fix
<tr> <td> <code>billingProgram</code> </td> <td> - <code>BillingProgramAndroid</code> + <Link to="/docs/types/billing-programs#billing-program-android"> + <code>BillingProgramAndroid</code> + </Link> </td> <td> The billing program (usually <code>EXTERNAL_PAYMENTS</code>) </td> </tr> <tr> <td> <code>linkUri</code> </td> <td> - <code>String</code> + <code>string</code> </td>(Apply the same
String→stringfix in theDeveloperProvidedBillingDetailsAndroidtable at line 340.)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/billing-programs.tsx` around lines 258 - 289, In the DeveloperBillingOptionParamsAndroid table fix two inconsistencies: wrap the BillingProgramAndroid type cell in a <Link> pointing to "#billing-program-android" (matching other occurrences) and normalize primitive type casing by changing the type for linkUri from capitalized String to lowercase string; also apply the same String → string change in the DeveloperProvidedBillingDetailsAndroid table for its linkUri entry so primitive types are consistent across the page.
🧹 Nitpick comments (16)
packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx (1)
23-23: Use<Link>for in-app navigation instead of raw<a>.A plain
<a href="/docs/...">triggers a full page reload and bypasses the SPA router, breaking scroll/state preservation. Other docs pages in this PR usereact-router-dom'sLinkfor internal routes; mirror that here.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx` at line 23, Replace the raw anchor element used for internal navigation with the SPA router Link: in the JSX where the anchor <a href="/docs/types/subscription-offer">SubscriptionOffer</a> appears, change it to use react-router-dom's Link with to="/docs/types/subscription-offer" and preserve surrounding spacing; also add or ensure the import { Link } from 'react-router-dom' is present at the top of discount-offer-ios.tsx.packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx (1)
26-35: Minor: signature name diverges from page title / canonical surface name.The displayed Kotlin signature shows
createAlternativeBillingToken(noAndroidsuffix), while the page title, route, andsearchDataentry all use the canonicalcreateAlternativeBillingTokenAndroid. This is consistent with the other Android alternative-billing pages in this PR, so likely intentional (native Kotlin module symbol vs. cross-platform surface name) — but iOS pages in the same PR display the suffixed Swift name (e.g.,func isTransactionVerifiedIOS(...)), so readers landing here may notice the asymmetry. Consider either:
- Keeping the bare Kotlin name and adding a one-line note that the cross-platform surface is
createAlternativeBillingTokenAndroid, or- Showing the suffixed name to match the iOS pages.
🤖 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/create-alternative-billing-token-android.tsx` around lines 26 - 35, The Kotlin signature currently shows createAlternativeBillingToken but the page’s canonical surface is createAlternativeBillingTokenAndroid; update the Signature section to either (a) change the displayed Kotlin function name to createAlternativeBillingTokenAndroid to match the page and other Android pages, or (b) keep the Kotlin name createAlternativeBillingToken and add a one-line clarifying note stating that the cross-platform / page surface name is createAlternativeBillingTokenAndroid; locate the CodeBlock containing the kotlin signature and adjust the text accordingly.packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx (1)
5-5: Component name casing inconsistent with sibling page.The component is named
SubscriptionStatusIos(lowercaseos), while the sibling API page atpackages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsxdeclaresSubscriptionStatusIOS(uppercase). For consistency with the rest of the iOS-suffixed identifiers used throughout the codebase, prefer the uppercase form.♻️ Proposed rename
-function SubscriptionStatusIos() { +function SubscriptionStatusIOS() { useScrollToHash(); ... -export default SubscriptionStatusIos; +export default SubscriptionStatusIOS;The corresponding import in
packages/docs/src/pages/docs/index.tsxwill also need updating.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx` at line 5, The component is declared as SubscriptionStatusIos but should be renamed to SubscriptionStatusIOS to match the sibling API page and project casing conventions; rename the function/component identifier from SubscriptionStatusIos to SubscriptionStatusIOS and update any exports and the corresponding import in the docs index (the import that currently references SubscriptionStatusIos) so all references use SubscriptionStatusIOS consistently.packages/docs/src/pages/docs/types/ios/subscription-period-ios.tsx (1)
5-6: PreferIOScapitalization in the component name for consistency.
SubscriptionPeriodIosis inconsistent with the documented symbolSubscriptionPeriodIOSand neighboring iOS page naming patterns.Suggested rename
-function SubscriptionPeriodIos() { +function SubscriptionPeriodIOS() { @@ -export default SubscriptionPeriodIos; +export default SubscriptionPeriodIOS;As per coding guidelines: “
**/*.{ts,tsx,swift,kt,dart,gd}: iOS functions must end withIOSsuffix (e.g.,syncIOS,getStorefrontIOS)”.Also applies to: 44-44
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/subscription-period-ios.tsx` around lines 5 - 6, Rename the React component SubscriptionPeriodIos to use IOS capitalization: SubscriptionPeriodIOS; update the function declaration, the default export (if present), and any local references inside this file (the other occurrence around line 44) to match the new symbol name, and adjust any imports/exports elsewhere that reference SubscriptionPeriodIos so they import SubscriptionPeriodIOS instead.packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx (1)
17-21: Section heading does not match the page/type name.The page is titled
PricingPhaseAndroidbut the first H2 anchor readsPricingPhase. Suggest renaming the anchor and heading text toPricingPhaseAndroidto match the canonical schema name and to keep the deep-link slug aligned (e.g.,id="pricing-phase-android"). Otherwise external links/anchor audits referring to the type name will mismatch.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx` around lines 17 - 21, The H2 AnchorLink currently uses id="pricing-phase" and displays "PricingPhase", which mismatches the page/type name PricingPhaseAndroid; update the AnchorLink element (the AnchorLink with id="pricing-phase" and level="h2") so its id becomes "pricing-phase-android" and its displayed text becomes "PricingPhaseAndroid" to align the deep-link slug and canonical schema name.packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx (1)
26-37: Consider adding a "See" link to theBillingProgramAndroidtype page.Other per-symbol API pages in this PR (e.g.,
consume-purchase-android.tsx,get-active-subscriptions.tsx) include a trailing<p className="type-link">See: …</p>that points to relevant reference pages. Since the signature here referencesBillingProgramAndroid, a link to/docs/types/billing-programswould aid navigation and keep this page consistent with the rest of the restructure.📝 Suggested addition
</LanguageTabs> + + <p className="type-link"> + See: <Link to="/docs/types/billing-programs">BillingProgramAndroid</Link> + </p> </div>(Would also need
import { Link } from 'react-router-dom';at the top.)🤖 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 26 - 37, Add a trailing "See" type link pointing to the BillingProgramAndroid type page by rendering a paragraph with className "type-link" that uses <Link> to "/docs/types/billing-programs" and mentions BillingProgramAndroid; update the component in enable-billing-program-android.tsx where the signature and LanguageTabs are returned (referencing BillingProgramAndroid in the CodeBlock) and ensure you import { Link } from 'react-router-dom' at the top of the file so the link component is available.packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx (1)
19-22: Anchor idsubscription-offeris too generic for an Android-specific page.Using
id="subscription-offer"on a page titledProductSubscriptionAndroidOfferDetailsmakes deep-links from sibling pages ambiguous (the cross-platformSubscriptionOfferpage likely uses the same id). Prefersubscription-offer-androidorproduct-subscription-android-offer-detailsto keep anchors unique across the docs and to survive future re-anchoring.📝 Proposed change
- <AnchorLink id="subscription-offer" level="h2"> + <AnchorLink id="subscription-offer-android" level="h2"> ProductSubscriptionAndroidOfferDetails{' '} <span className="deprecated-badge">Deprecated</span> </AnchorLink>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx` around lines 19 - 22, The anchor id "subscription-offer" in the AnchorLink for the ProductSubscriptionAndroidOfferDetails heading is too generic; change the id attribute on the AnchorLink component (the instance rendering ProductSubscriptionAndroidOfferDetails) to a unique Android-specific value such as "subscription-offer-android" or "product-subscription-android-offer-details" so deep-links from sibling pages won't collide; update any internal links pointing to "subscription-offer" to the new id as well.packages/docs/src/pages/docs/types/subscription-product.tsx (1)
157-163: Platform-specific tables drop theTypecolumn, breaking parity with peers.The Common Fields table on this page uses
Name | Type | Summary, and sibling pages (e.g.,active-subscription.tsxlines 38–44 / 139–144) keep all three columns including for iOS/Android tables. Here the iOS and Android tables collapse toName | Summary, so readers can't see field types and the link-to-reference convention from the PR description ("non-primitive type cells link to reference pages") cannot apply.📝 Add a `Type` column with linked references where applicable
<table className="doc-table"> <thead> <tr> <th>Name</th> + <th>Type</th> <th>Summary</th> </tr> </thead>Apply to both the iOS (line 158) and Android (line 273) tables, then populate
Typecells (e.g.,string,boolean,SubscriptionOffer[]linked to/docs/types/subscription-offer, etc.).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/subscription-product.tsx` around lines 157 - 163, Add the missing "Type" column to the platform-specific Common Fields tables in subscription-product.tsx by adding a third header cell ("Type") to both the iOS and Android table heads and then populate each row's Type cell with the correct type strings (e.g., string, boolean, SubscriptionOffer[]) — for non-primitive types render them as links to their reference pages (for example link SubscriptionOffer to /docs/types/subscription-offer) so the platform tables match the Name | Type | Summary structure used by sibling pages like active-subscription.tsx.packages/docs/src/pages/docs/apis/index.tsx (1)
128-135: Cross-platformgetStorefrontlisted under "Purchase" — confirm grouping intent.Grouping
getStorefrontwith Purchase APIs is unusual; most readers expect storefront/locale APIs under Connection or a dedicated Store/Locale section. iOS-onlygetStorefrontIOS(line 202) sitting under iOS Functions is fine, but the cross-platform sibling reads as out-of-place here. Consider moving to Connection or a new Store Info section.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/apis/index.tsx` around lines 128 - 135, The API table currently lists getStorefront (Link to "/docs/apis/get-storefront") under the Purchase section which is misleading; move the getStorefront entry out of the Purchase table and into the Connection section (or create a new "Store Info"/"Storefront" section) so it groups semantically with getStorefrontIOS and other connection/locale APIs; update the table rows and any surrounding headings to reflect the new grouping and ensure the Link and <code>getStorefront</code> label remain unchanged.packages/docs/src/pages/docs/features/debugging.tsx (1)
247-257: Stale "Multiple offers found" log message in the table.The actual log emitted (shown in the code block at lines 115–118) is
Multiple offers (3) found for premium_subscription, using first basePlanId (may be inaccurate). The Common Warnings row shows justMultiple offers found, which won't match agrepagainst console output. Consider matching the wording (with a wildcard hint) so users can correlate.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/features/debugging.tsx` around lines 247 - 257, Update the table row text to match the actual log string so users can grep it: replace the <code>Multiple offers found</code> cell with the fuller message pattern shown in the code block (e.g. "Multiple offers (3) found for premium_subscription, using first basePlanId (may be inaccurate)") or a grep-friendly wildcard hint like "Multiple offers (*) found for <product>, using first basePlanId (may be inaccurate)"; locate the JSX node rendering the <code>Multiple offers found</code> cell and update its contents to the exact log wording or a wildcard-friendly variant so it correlates with the emitted console message.packages/docs/src/pages/docs/types/ios/app-transaction-ios.tsx (1)
13-18: Minor: SEO keywords contain duplicates and stray double space.
keywords="AppTransaction, OpenIAP types, App Transaction"listsAppTransactionandApp Transactionas separate keywords (the latter is just a spaced variant). Other new pages exhibit similar patterns (e.g.,External Purchase Link Typespage hasExternal Purchase Link Typeswith double spaces). Consider tightening these strings.✏️ Proposed tweak
- keywords="AppTransaction, OpenIAP types, App Transaction" + keywords="AppTransaction, OpenIAP types, StoreKit, iOS 18.4"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/app-transaction-ios.tsx` around lines 13 - 18, The SEO component's keywords prop contains duplicates and stray spaces; update the keywords string passed to the SEO component (the keywords prop in the SEO JSX in app-transaction-ios.tsx) to remove duplicate tokens and fix spacing (e.g., consolidate "AppTransaction" and "App Transaction" into a single normalized keyword and collapse any double spaces), and audit other pages using the SEO component for similar double-spacing or duplicate keyword entries and normalize them consistently.packages/docs/src/pages/docs/types/alternative-billing-types.tsx (2)
246-294: UnusedcreateAlternativeBillingTokenimport in the User Choice example.The TS imports include
createAlternativeBillingToken, but the User Choice flow only usesuserChoiceBillingListenerAndroidand the standard request APIs — token creation appears in the next ("Alternative Only") example. Remove it here to avoid implying it's part of the user-choice flow.import { initConnection, userChoiceBillingListenerAndroid, fetchProducts, requestPurchase, - createAlternativeBillingToken, } from 'expo-iap';🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/alternative-billing-types.tsx` around lines 246 - 294, Remove the unused createAlternativeBillingToken import from the TypeScript import list at the top of the User Choice example; keep only the actual symbols used (e.g., initConnection, userChoiceBillingListenerAndroid, fetchProducts, requestPurchase) so the import reflects the code path shown and does not imply token creation is part of the user-choice flow.
17-17: Nit: duplicate phrase with double spaces in SEO keywords.
"Alternative Billing Types, OpenIAP types, Alternative Billing Types"repeats the page title with double spaces. Either drop the duplicate or fix the spacing.- keywords="Alternative Billing Types, OpenIAP types, Alternative Billing Types" + keywords="Alternative Billing Types, OpenIAP types, Android billing"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/alternative-billing-types.tsx` at line 17, The SEO keywords string contains a duplicate with a double space ("Alternative Billing Types"); update the keywords value used in the page metadata to remove the duplicate or correct the spacing so it reads once (e.g., "Alternative Billing Types, OpenIAP types")—locate the keywords attribute in the metadata block where keywords="Alternative Billing Types, OpenIAP types, Alternative Billing Types" and edit that string accordingly.packages/docs/src/components/MenuDropdown.tsx (2)
14-18: Type guard via property presence is fragile — consider a discriminator.
isGroupchecks(entry as MenuGroup).items !== undefined. It works today, but ifMenuItemever gains an unrelateditemsproperty (or vice versa) the guard silently misclassifies entries. Adding an explicit discriminator (kind: 'item' | 'group') makes this future-proof and self-documenting:♻️ Optional refactor
-export interface MenuItem { +export interface MenuItem { + kind?: 'item'; to: string; label: string; } -export interface MenuGroup { +export interface MenuGroup { + kind: 'group'; label: string; items: MenuItem[]; } export type MenuEntry = MenuItem | MenuGroup; function isGroup(entry: MenuEntry): entry is MenuGroup { - return (entry as MenuGroup).items !== undefined; + return entry.kind === 'group'; }Not blocking — the current check is correct given the present shapes.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/components/MenuDropdown.tsx` around lines 14 - 18, The type guard isGroup relying on items presence is fragile; add an explicit discriminator property (e.g., kind: 'item' | 'group') to MenuItem and MenuGroup types, update the union MenuEntry to use that discriminator, change isGroup to check entry.kind === 'group' (and narrow types accordingly), and update any code that constructs MenuItem/MenuGroup to set the appropriate kind value.
80-86:SubMenumay clip its content ifscrollHeightchanges after first measure.The parent
MenuDropdownfalls back tomaxHeight: 'none'when expanded (line 183), which is what allows nested submenu expansion to push the parent's height. TheSubMenuitself, however, always uses the measured${height}pxeven when expanded. If anything changes the rendered child heights after the initialuseLayoutEffect(font load, route-driven className change, viewport resize), the submenu can clip. Consider mirroring the parent's pattern:style={{ - maxHeight: `${height}px`, + maxHeight: isExpanded ? 'none' : `${height}px`, + overflow: isExpanded ? 'visible' : 'hidden', }}This also keeps the expand/collapse animation behavior identical to the parent dropdown.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/components/MenuDropdown.tsx` around lines 80 - 86, SubMenu can clip when children change after initial measurement; modify the style logic in MenuDropdown/SubMenu (the element referenced by contentRef and the height state set in useLayoutEffect) to mirror the parent: use maxHeight: expanded ? 'none' : `${height}px` instead of always `${height}px`, and trigger re-measurements by including expanded/children/viewport changes (or a ResizeObserver) as dependencies for the measurement effect so height updates whenever content size changes.packages/docs/src/pages/docs/types/billing-programs.tsx (1)
213-230: Add reference sections forExternalLinkLaunchModeAndroidandExternalLinkTypeAndroid.Per the file's pattern, types referenced in parameter tables should have corresponding reference sections with enum value definitions.
DeveloperBillingLaunchModeAndroidhas a complete section (id="developer-billing-launch-mode") with values, butExternalLinkLaunchModeAndroid(line 218) andExternalLinkTypeAndroid(line 227) lack reference sections. Add anchor-linked sections documenting the enum values for these types, mirroring the structure ofDeveloperBillingLaunchModeAndroid, or link to them if reference documentation exists elsewhere.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/billing-programs.tsx` around lines 213 - 230, Add reference sections for the two missing enums referenced in the parameter table: create anchor-linked sections mirroring the structure of the existing DeveloperBillingLaunchModeAndroid reference (id pattern and enum value list) for ExternalLinkLaunchModeAndroid and ExternalLinkTypeAndroid so readers can click the id anchors from the table; ensure each section includes an id attribute (e.g., id="external-link-launch-mode-android" and id="external-link-type-android"), a short description, and a bulletized list of the enum values and their meanings matching the style used by DeveloperBillingLaunchModeAndroid.
- errors.tsx: drop self-referential PurchaseError link, anchor the section
- product-request.tsx + fetch-products.tsx: align "type" literal with the
generated TS union ("in-app" instead of "inapp")
- fetch-products.tsx: refresh Dart signature/example to the named-parameter
v7 API returning FetchProductsResult
- discount-offer-ios.tsx, discount-ios.tsx, purchase.tsx, product.tsx: swap
remaining raw <a href> internal links for <Link> from react-router-dom
- MenuDropdown.tsx: tighten isGroup type guard ('items' in entry +
Array.isArray) and use a stable composite React key for nested groups
- billing-programs.tsx + apis/android/enable-billing-program-android.tsx:
align all language examples with the canonical InitConnectionConfig
shape (enableBillingProgramAndroid is a config field, not a top-level fn)
- types/android/one-time-purchase-offer-detail-android.tsx: document
PreorderDetailsAndroid + RentalDetailsAndroid with anchors so
discount-offer.tsx links resolve to real content
- features/refund.tsx: correct Android RTDN payload names
(voidedPurchaseNotification + subscriptionNotification.SUBSCRIPTION_REVOKED)
- apis/restore-purchases.tsx: tighten the example to verify purchases
before granting and finish each transaction afterwards
- apis/ios/present-external-purchase-notice-sheet-ios.tsx: surface the
externalPurchaseToken field in the result struct
- types/storefront.tsx: clarify Storefront is the String returned by
getStorefront() rather than a phantom struct, drop fake StorefrontCode field
- setup/react-native.tsx: drop the misleading "also returns the value
directly" claim for getActiveSubscriptions() under useIAP
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/gemini review |
|
@coderabbitai review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Restructures the docs site into per-symbol API/type pages (including platform folders) and updates navigation and internal links to match the new routing and schema parity goals.
Changes:
- Added many new per-symbol docs pages under
/docs/apis/**and/docs/types/**(includingios/andandroid/subfolders). - Updated existing docs pages to point to the new flat routes and moved “Validation/Debugging/Refund” content into Features.
- Extended
MenuDropdownto support nested groups for sidebar/navigation organization.
Reviewed changes
Copilot reviewed 94 out of 105 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs/src/pages/docs/types/subscription-product.tsx | New per-symbol type page for subscription products (common + platform-specific fields). |
| packages/docs/src/pages/docs/types/storefront.tsx | New conceptual “Storefront” type page (doc-only). |
| packages/docs/src/pages/docs/types/purchase.tsx | Refocused Purchase docs into a single-symbol page and updated links/fields. |
| packages/docs/src/pages/docs/types/product.tsx | Refocused Product docs into a single-symbol page; moved related content to new pages. |
| packages/docs/src/pages/docs/types/product-request.tsx | New per-symbol type page for ProductRequest. |
| packages/docs/src/pages/docs/types/ios/subscription-status-ios.tsx | New iOS-specific type page for SubscriptionStatusIOS. |
| packages/docs/src/pages/docs/types/ios/subscription-period-ios.tsx | New iOS-specific type page for SubscriptionPeriodIOS. |
| packages/docs/src/pages/docs/types/ios/payment-mode-ios.tsx | New iOS-specific type page for PaymentMode. |
| packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx | New deprecated iOS type page pointing users to cross-platform replacements. |
| packages/docs/src/pages/docs/types/ios/discount-ios.tsx | New deprecated iOS type page pointing users to cross-platform replacements. |
| packages/docs/src/pages/docs/types/ios/app-transaction-ios.tsx | New iOS-specific type page for AppTransaction with examples. |
| packages/docs/src/pages/docs/types/discount-offer.tsx | New cross-platform type page for DiscountOffer. |
| packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx | New deprecated Android type page pointing users to cross-platform replacements. |
| packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx | New Android type page for pricing phases. |
| packages/docs/src/pages/docs/types/android/one-time-purchase-offer-detail-android.tsx | New deprecated Android type page pointing users to cross-platform replacements. |
| packages/docs/src/pages/docs/types/active-subscription.tsx | New per-symbol type page for ActiveSubscription with examples. |
| packages/docs/src/pages/docs/setup/react-native.tsx | Updated setup docs to link to per-symbol API pages. |
| packages/docs/src/pages/docs/lifecycle/subscription.tsx | Updated lifecycle docs links to new per-symbol API/type routes. |
| packages/docs/src/pages/docs/lifecycle/index.tsx | Updated lifecycle overview links to new per-symbol API routes. |
| packages/docs/src/pages/docs/ios-setup.tsx | Updated iOS setup docs to link to per-symbol API pages. |
| packages/docs/src/pages/docs/features/validation.tsx | Moved/renamed validation content under Features and updated references. |
| packages/docs/src/pages/docs/features/subscription/upgrade-downgrade.tsx | Updated links to per-symbol API pages. |
| packages/docs/src/pages/docs/features/subscription/index.tsx | Updated subscription feature guide to link to per-symbol pages; clarified limitations. |
| packages/docs/src/pages/docs/features/subscription-billing-issue.tsx | Updated links to per-symbol pages for deep links and endConnection. |
| packages/docs/src/pages/docs/features/purchase.tsx | Updated links to match new routing. |
| packages/docs/src/pages/docs/features/offer-code-redemption.tsx | Updated link to iOS per-symbol API page. |
| packages/docs/src/pages/docs/features/external-purchase.tsx | Updated links to per-symbol pages; added missing heading id for deep-linking. |
| packages/docs/src/pages/docs/features/discount.tsx | Updated standardized type link to new location. |
| packages/docs/src/pages/docs/features/debugging.tsx | Moved/renamed debugging content under Features and updated references. |
| packages/docs/src/pages/docs/events.tsx | Updated type/API links to new per-symbol pages. |
| packages/docs/src/pages/docs/errors.tsx | Adjusted anchoring and references around error structure. |
| packages/docs/src/pages/docs/apis/subscription.tsx | Removed consolidated subscription APIs page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/restore-purchases.tsx | New per-symbol API page for restorePurchases. |
| packages/docs/src/pages/docs/apis/request-purchase.tsx | New per-symbol API page for requestPurchase. |
| packages/docs/src/pages/docs/apis/products.tsx | Removed consolidated product APIs page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx | New per-symbol iOS API page (deprecated) for validateReceiptIOS. |
| packages/docs/src/pages/docs/apis/ios/sync-ios.tsx | New per-symbol iOS API page for syncIOS. |
| packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx | New per-symbol iOS API page for subscriptionStatusIOS. |
| packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx | New per-symbol iOS API page for showManageSubscriptionsIOS. |
| packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx | New per-symbol iOS API page (deprecated) for requestPurchaseOnPromotedProductIOS. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx | New per-symbol iOS API page for presentExternalPurchaseNoticeSheetIOS. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx | New per-symbol iOS API page for presentExternalPurchaseLinkIOS. |
| packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx | New per-symbol iOS API page for presentCodeRedemptionSheetIOS. |
| packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx | New per-symbol iOS API page for latestTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx | New per-symbol iOS API page for isTransactionVerifiedIOS. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx | New per-symbol iOS API page for isEligibleForIntroOfferIOS. |
| packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx | New per-symbol iOS API page for getTransactionJwsIOS. |
| packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx | New per-symbol iOS API page (deprecated) for getStorefrontIOS. |
| packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx | New per-symbol iOS API page for getReceiptDataIOS. |
| packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx | New per-symbol iOS API page for getPromotedProductIOS. |
| packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx | New per-symbol iOS API page for getPendingTransactionsIOS. |
| packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx | New per-symbol iOS API page for getAppTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx | New per-symbol iOS API page for getAllTransactionsIOS. |
| packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx | New per-symbol iOS API page for currentEntitlementIOS. |
| packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx | New per-symbol iOS API page for clearTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx | New per-symbol iOS API page for canPresentExternalPurchaseNoticeIOS. |
| packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx | New per-symbol iOS API page for beginRefundRequestIOS. |
| packages/docs/src/pages/docs/apis/ios.tsx | Removed consolidated iOS APIs page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/init-connection.tsx | New per-symbol API page for initConnection. |
| packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx | New per-symbol API page for hasActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/get-storefront.tsx | New per-symbol API page for getStorefront. |
| packages/docs/src/pages/docs/apis/get-available-purchases.tsx | New per-symbol API page for getAvailablePurchases. |
| packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx | New per-symbol API page for getActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/finish-transaction.tsx | New per-symbol API page for finishTransaction. |
| packages/docs/src/pages/docs/apis/fetch-products.tsx | New per-symbol API page for fetchProducts. |
| packages/docs/src/pages/docs/apis/end-connection.tsx | New per-symbol API page for endConnection. |
| packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx | New per-symbol API page for deepLinkToSubscriptions. |
| packages/docs/src/pages/docs/apis/connection.tsx | Removed consolidated connection APIs page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx | New per-symbol Android API page for alternative billing dialog. |
| packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx | New per-symbol Android API page for launching external link flows. |
| packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx | New per-symbol Android API page for billing program availability checks. |
| packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx | New per-symbol Android API page documenting enablement via initConnection. |
| packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx | New per-symbol Android API page for reporting details creation. |
| packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx | New per-symbol Android API page for alternative billing token creation. |
| packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx | New per-symbol Android API page for consuming purchases. |
| packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx | New per-symbol Android API page for alternative billing availability. |
| packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx | New per-symbol Android API page for acknowledging purchases. |
| packages/docs/src/components/MenuDropdown.tsx | Added nested menu group support for the sidebar. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- apis/init-connection.tsx: stop redefining InitConnectionConfig inline
with a stale shape; link to the canonical type page and use the
enableBillingProgramAndroid example so the page is no longer the source
of truth for InitConnectionConfig fields
- apis/fetch-products.tsx + features/purchase.tsx + features/discount.tsx
+ setup/{expo,react-native}.tsx + apis/request-purchase.tsx +
types/request-purchase-props.tsx: align all 'inapp' literals on the
generated TS union ('in-app') so copy/paste examples don't fail
- types/subscription-product.tsx: drop the duplicated Product common
fields table — link to the Product page for inherited fields and only
document the 'subs' override on this page (avoids schema drift)
- components/MenuDropdown.tsx: replace maxHeight: 'none' with a numeric
cap (9999px) so CSS open/close transitions interpolate cleanly even
with nested submenus, and add aria-expanded / aria-controls / type=
"button" to both the parent and SubMenu toggle buttons
- features/discount.tsx: convert remaining raw <a href> internal link to
<Link> from react-router-dom for SPA-consistent navigation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/gemini review |
|
@coderabbitai review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
packages/docs/src/pages/docs/types/ios/discount-ios.tsx (1)
29-86: Link non-primitive type fields to their reference pages.The table should link the non-primitive fields
type,paymentMode, andsubscriptionPeriodto their corresponding reference pages (PaymentModeIOS,SubscriptionPeriodIOS). TheLinkcomponent is already imported but unused; these fields should be wrapped as links (e.g.,<Link to="/docs/types/ios/payment-mode-ios">PaymentMode</Link>) to improve navigability and consistency with the PR's type linking objective.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/ios/discount-ios.tsx` around lines 29 - 86, Wrap the non-primitive table cells for the fields "type", "paymentMode", and "subscriptionPeriod" with the existing Link component so they point to their reference pages; specifically, replace the plain text in the <td> for <code>type</code> and <code>paymentMode</code> with <Link to="/docs/types/ios/payment-mode-ios">PaymentModeIOS</Link> (or the correct label) and replace the <td> for <code>subscriptionPeriod</code> with <Link to="/docs/types/ios/subscription-period-ios">SubscriptionPeriodIOS</Link>, using the imported Link component to improve navigability while keeping other table rows unchanged.packages/docs/src/pages/docs/types/purchase.tsx (1)
16-16: Nit:keywordsrepeats "Purchase".
keywords="Purchase, OpenIAP types, Purchase"lists the same term twice. The sibling page (active-subscription.tsx) avoids this by spacing the third keyword ("ActiveSubscription, OpenIAP types, Active Subscription"). Consider mirroring that — e.g., adding "Purchase Transaction" or "Purchase Type" — so the meta tag isn't redundant.✏️ Suggested change
- keywords="Purchase, OpenIAP types, Purchase" + keywords="Purchase, OpenIAP types, Purchase Transaction"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/types/purchase.tsx` at line 16, The page meta keywords prop currently duplicates "Purchase" in the string assigned to keywords; update the keywords value in the JSX (keywords="Purchase, OpenIAP types, Purchase") to remove the duplicate and use a distinct third term such as "Purchase Transaction" or "Purchase Type" so the meta tag is not redundant (e.g., change the keywords prop on the Purchase page component to "Purchase, OpenIAP types, Purchase Transaction").
🤖 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/fetch-products.tsx`:
- Around line 41-95: The Dart example incorrectly types the awaited result as
List<Product> even though fetchProducts returns Future<FetchProductsResult>;
update the FlutterInappPurchase.instance.fetchProducts example to unwrap the
FetchProductsResult (e.g., via pattern matching on FetchProductsResult or
accessing its .value/contents) and then assign the inner List<Product> to
products so the types align (keep references to FetchProductsResult,
fetchProducts, FlutterInappPurchase.instance.fetchProducts, and
ProductQueryType.InApp).
In `@packages/docs/src/pages/docs/apis/request-purchase.tsx`:
- Around line 109-111: The Dart example incorrectly passes a raw SKU string to
FlutterInappPurchase.instance.requestPurchase which expects a
RequestPurchaseProps object; update the example to call requestPurchase with a
RequestPurchaseProps instance containing the sku (e.g., construct
RequestPurchaseProps with sku: 'com.app.premium') so the example matches the
documented signature and the Swift/Kotlin samples.
- Around line 80-87: The Swift example uses the wrong enum case `.inapp`; update
the enum case to the canonical camelCase `.inApp` in the example call to
OpenIapModule.shared.requestPurchase so it matches the ProductQueryType
definition; specifically modify the RequestPurchaseProps snippet (the
RequestPurchaseProps / RequestPurchasePropsByPlatforms / RequestPurchaseIosProps
example) to use type: .inApp instead of .inapp.
In `@packages/docs/src/pages/docs/index.tsx`:
- Around line 244-255: The sidebar entries for the iOS types use labels without
the required IOS suffix: update the label values for the entries pointing to
'/docs/types/ios/payment-mode-ios' and '/docs/types/ios/app-transaction-ios' so
they read "PaymentModeIOS" and "AppTransactionIOS" (matching the imported
component names like TypesPaymentModeIOS and TypesAppTransactionIOS and the
canonical type identifiers such as SubscriptionStatusIOS).
In `@packages/docs/src/pages/docs/types/billing-programs.tsx`:
- Around line 13-19: Update the SEO component props to use a concise,
non-redundant title and clean keywords: change the title prop passed to <SEO>
from "Billing Programs Types" to something like "Billing Programs" (or "Billing
Programs — Types" if you want to keep types explicit), update the description to
remain accurate, and fix the keywords string to remove duplication and extra
spaces (e.g., "Billing Programs, OpenIAP types"). Ensure the path and other
props remain unchanged.
- Around line 363-388: The docs example uses inconsistent casing for
BillingProgramAndroid: replace the SCREAMING_SNAKE_CASE occurrences with the
kebab-case literal expected by the type. Update the initConnection and
developerBillingOption.billingProgram usages so the string values passed to
initConnection({... enableBillingProgramAndroid }) and to requestPurchase({...
developerBillingOption: { billingProgram }}) and the check via
isBillingProgramAvailableAndroid(...) all use 'external-payments' (kebab-case)
to match the BillingProgramAndroid type.
In `@packages/docs/src/pages/docs/types/ios/discount-ios.tsx`:
- Line 15: Update the SEO keywords string to remove the awkward split token
"Discount I O S" and replace it with canonical and natural variants (e.g.,
"DiscountiOS" or "Discount iOS" and "DiscountIOS") by editing the keywords value
in the component where keywords="DiscountIOS, OpenIAP types, Discount I O S" is
defined; ensure the final keywords list contains the canonical "DiscountIOS"
plus one or two natural variants (like "Discount iOS", "DiscountiOS") and remove
the spaced "Discount I O S" token.
In `@packages/docs/src/pages/docs/types/subscription-product.tsx`:
- Around line 147-155: The documentation for the typeIOS example uses kebab-case
("auto-renewable-subscription") which doesn't match the canonical GraphQL enum
and the product docs; update the example in subscription-product.tsx so the
<code>typeIOS</code> value is PascalCase "AutoRenewableSubscription" (and ensure
any other enum examples follow PascalCase like Consumable, NonConsumable,
NonRenewingSubscription) to match the schema and product.tsx.
---
Nitpick comments:
In `@packages/docs/src/pages/docs/types/ios/discount-ios.tsx`:
- Around line 29-86: Wrap the non-primitive table cells for the fields "type",
"paymentMode", and "subscriptionPeriod" with the existing Link component so they
point to their reference pages; specifically, replace the plain text in the <td>
for <code>type</code> and <code>paymentMode</code> with <Link
to="/docs/types/ios/payment-mode-ios">PaymentModeIOS</Link> (or the correct
label) and replace the <td> for <code>subscriptionPeriod</code> with <Link
to="/docs/types/ios/subscription-period-ios">SubscriptionPeriodIOS</Link>, using
the imported Link component to improve navigability while keeping other table
rows unchanged.
In `@packages/docs/src/pages/docs/types/purchase.tsx`:
- Line 16: The page meta keywords prop currently duplicates "Purchase" in the
string assigned to keywords; update the keywords value in the JSX
(keywords="Purchase, OpenIAP types, Purchase") to remove the duplicate and use a
distinct third term such as "Purchase Transaction" or "Purchase Type" so the
meta tag is not redundant (e.g., change the keywords prop on the Purchase page
component to "Purchase, OpenIAP types, Purchase Transaction").
🪄 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: d40cc830-e74e-467f-804d-c36a036f2662
📒 Files selected for processing (24)
packages/docs/src/components/MenuDropdown.tsxpackages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsxpackages/docs/src/pages/docs/apis/fetch-products.tsxpackages/docs/src/pages/docs/apis/init-connection.tsxpackages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsxpackages/docs/src/pages/docs/apis/request-purchase.tsxpackages/docs/src/pages/docs/apis/restore-purchases.tsxpackages/docs/src/pages/docs/errors.tsxpackages/docs/src/pages/docs/features/discount.tsxpackages/docs/src/pages/docs/features/purchase.tsxpackages/docs/src/pages/docs/features/refund.tsxpackages/docs/src/pages/docs/index.tsxpackages/docs/src/pages/docs/setup/expo.tsxpackages/docs/src/pages/docs/setup/react-native.tsxpackages/docs/src/pages/docs/types/android/one-time-purchase-offer-detail-android.tsxpackages/docs/src/pages/docs/types/billing-programs.tsxpackages/docs/src/pages/docs/types/discount-offer.tsxpackages/docs/src/pages/docs/types/ios/discount-ios.tsxpackages/docs/src/pages/docs/types/ios/discount-offer-ios.tsxpackages/docs/src/pages/docs/types/product.tsxpackages/docs/src/pages/docs/types/purchase.tsxpackages/docs/src/pages/docs/types/storefront.tsxpackages/docs/src/pages/docs/types/subscription-product.tsxpackages/docs/src/pages/introduction.tsx
✅ Files skipped from review due to trivial changes (3)
- packages/docs/src/pages/docs/setup/expo.tsx
- packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx
- packages/docs/src/pages/docs/features/purchase.tsx
🚧 Files skipped from review as they are similar to previous changes (8)
- packages/docs/src/pages/docs/errors.tsx
- packages/docs/src/pages/docs/features/discount.tsx
- packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx
- packages/docs/src/pages/docs/types/storefront.tsx
- packages/docs/src/pages/docs/apis/init-connection.tsx
- packages/docs/src/pages/docs/types/ios/discount-offer-ios.tsx
- packages/docs/src/pages/docs/types/android/one-time-purchase-offer-detail-android.tsx
- packages/docs/src/pages/docs/features/refund.tsx
- apis/fetch-products.tsx: Dart example now awaits FetchProductsResult and
unwraps via switch pattern on FetchProductsResultProducts (matches the
sealed-class signature)
- apis/request-purchase.tsx: Swift type uses canonical .inApp camelCase
enum case; Dart example replaces the legacy positional-string call with
the proper RequestPurchaseProps shape so it matches the documented
signature and the Swift/Kotlin samples
- pages/docs/index.tsx: sidebar labels for the iOS group now carry the
IOS suffix (PaymentModeIOS, AppTransactionIOS) so they line up with
every other entry and the canonical type identifiers
- types/billing-programs.tsx:
* SEO title/description/keywords cleaned up — "Billing Programs" with
a real keyword set, no double-space duplication
* TypeScript example uses the kebab-case BillingProgramAndroid /
DeveloperBillingLaunchModeAndroid string literals exposed by the
generated TS types ('external-payments',
'launch-in-external-browser-or-app') instead of SCREAMING_SNAKE_CASE
- types/ios/discount-ios.tsx: SEO keywords no longer ship the awkward
"Discount I O S" PascalCase-splitter artifact
- types/subscription-product.tsx: typeIOS example uses canonical
PascalCase (AutoRenewableSubscription / NonRenewingSubscription) so it
matches the GraphQL enum and product.tsx
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/gemini review |
|
@coderabbitai review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
✅ Actions performedReview triggered.
|
|
/gemini review |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Restructures the docs site into flat, per-symbol API/type pages with platform subfolders (ios/android), while aligning docs content with the canonical GraphQL schema and upgrading sidebar navigation to support nested groups and better sticky/overflow behavior.
Changes:
- Added many new per-symbol docs pages (APIs, Types, Events) including platform-specific folders and deprecation/redirect handling.
- Updated existing docs pages to point to the new per-symbol routes (removing anchor-grouped links).
- Extended
MenuDropdownto support nested menu groups and improved keyboard/accessibility behavior for collapsed menus.
Reviewed changes
Copilot reviewed 92 out of 121 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx | New Android type reference page for deprecated subscription offer details. |
| packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx | New Android pricing phase and pricing phases container type reference. |
| packages/docs/src/pages/docs/types/active-subscription.tsx | New per-type page documenting ActiveSubscription with platform tabs and examples. |
| packages/docs/src/pages/docs/setup/react-native.tsx | Updates setup docs to new route structure and type: 'in-app' usage + deep links. |
| packages/docs/src/pages/docs/setup/index.tsx | Adds framework setup index page with links to platform setup and reference sections. |
| packages/docs/src/pages/docs/setup/expo.tsx | Updates Expo setup docs to new route structure and type: 'in-app' usage + deep links. |
| packages/docs/src/pages/docs/lifecycle/subscription.tsx | Updates lifecycle subscription guide links to new per-symbol routes and adds deep links. |
| packages/docs/src/pages/docs/lifecycle/index.tsx | Updates lifecycle overview links to new per-symbol API/event routes. |
| packages/docs/src/pages/docs/ios-setup.tsx | Updates iOS setup guide to link to the new finishTransaction API page. |
| packages/docs/src/pages/docs/features/validation.tsx | Moves “Validation APIs” into “Validation” feature page and expands content + links. |
| packages/docs/src/pages/docs/features/subscription/upgrade-downgrade.tsx | Adds native references and updates links to new API routes. |
| packages/docs/src/pages/docs/features/subscription/index.tsx | Updates subscription feature guide to new API/type routes and adds native references. |
| packages/docs/src/pages/docs/features/subscription-billing-issue.tsx | Improves billing issue feature guide with new links and adds native references. |
| packages/docs/src/pages/docs/features/offer-code-redemption.tsx | Updates event/API links and adds native references section. |
| packages/docs/src/pages/docs/features/external-purchase.tsx | Updates deep links, adds anchors/ids for sections, and adds native references. |
| packages/docs/src/pages/docs/features/discount.tsx | Updates standardized-type link and adds native references. |
| packages/docs/src/pages/docs/features/debugging.tsx | Moves “Debugging APIs” into “Debugging” feature page, updates links, adds references. |
| packages/docs/src/pages/docs/features/alternative-marketplace/onside.tsx | Adds native references section. |
| packages/docs/src/pages/docs/features/alternative-marketplace/index.tsx | Adds native references section. |
| packages/docs/src/pages/docs/events/subscription-billing-issue-listener.tsx | New event page documenting subscriptionBillingIssueListener. |
| packages/docs/src/pages/docs/events/purchase-updated-listener.tsx | New event page documenting purchaseUpdatedListener. |
| packages/docs/src/pages/docs/events/purchase-error-listener.tsx | New event page documenting purchaseErrorListener. |
| packages/docs/src/pages/docs/events/ios/promoted-product-listener-ios.tsx | New iOS-specific event page for promoted product listener. |
| packages/docs/src/pages/docs/events/android/user-choice-billing-listener-android.tsx | New Android-specific event page for user choice billing. |
| packages/docs/src/pages/docs/events/android/developer-provided-billing-listener-android.tsx | New Android-specific event page for developer-provided billing. |
| packages/docs/src/pages/docs/errors.tsx | Adjusts error section heading ids and wording to match new structure. |
| packages/docs/src/pages/docs/apis/validate-receipt.tsx | Adds redirect page from deprecated validateReceipt to Validation feature section. |
| packages/docs/src/pages/docs/apis/subscription.tsx | Removes legacy grouped “Subscription APIs” page. |
| packages/docs/src/pages/docs/apis/restore-purchases.tsx | New per-symbol API page for restorePurchases. |
| packages/docs/src/pages/docs/apis/request-purchase.tsx | New per-symbol API page for requestPurchase with listener guidance. |
| packages/docs/src/pages/docs/apis/products.tsx | Removes legacy grouped “Product APIs” page. |
| packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx | New iOS deprecated API page pointing to verifyPurchase. |
| packages/docs/src/pages/docs/apis/ios/sync-ios.tsx | New iOS API page for syncIOS. |
| packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx | New iOS API page for subscriptionStatusIOS. |
| packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx | New iOS API page for in-app manage subscriptions UI. |
| packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx | New iOS API page documenting external purchase notice. |
| packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx | New deprecated iOS API page pointing to listener + requestPurchase. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx | New iOS API page for external purchase notice sheet. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx | New iOS API page for opening external purchase links. |
| packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx | New iOS API page for code redemption sheet. |
| packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx | New iOS API page for latestTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx | New iOS API page for local transaction verification. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx | New iOS API page for intro offer eligibility. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-external-purchase-custom-link-ios.tsx | New iOS API page for external purchase custom link eligibility. |
| packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx | New iOS API page for fetching transaction JWS. |
| packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx | New deprecated iOS API page pointing to cross-platform getStorefront. |
| packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx | New iOS API page for legacy receipt data access. |
| packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx | New iOS API page for getting currently promoted product. |
| packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx | New iOS API page for pending transactions. |
| packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx | New iOS API page for external purchase token retrieval. |
| packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx | New iOS API page for app transaction retrieval. |
| packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx | New iOS API page for full transaction history. |
| packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx | New iOS API page for current entitlement lookup. |
| packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx | New iOS API page for clearing StoreKit queue transactions. |
| packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx | New iOS API page for notice sheet availability check. |
| packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx | New iOS API page for beginning refund request. |
| packages/docs/src/pages/docs/apis/init-connection.tsx | New per-symbol API page for initConnection. |
| packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx | New per-symbol API page for hasActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/get-storefront.tsx | New per-symbol API page for getStorefront. |
| packages/docs/src/pages/docs/apis/get-available-purchases.tsx | New per-symbol API page for getAvailablePurchases. |
| packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx | New per-symbol API page for getActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/finish-transaction.tsx | New per-symbol API page for finishTransaction. |
| packages/docs/src/pages/docs/apis/fetch-products.tsx | New per-symbol API page for fetchProducts (and note about request* APIs). |
| packages/docs/src/pages/docs/apis/end-connection.tsx | New per-symbol API page for endConnection. |
| packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx | New per-symbol API page for deepLinkToSubscriptions. |
| packages/docs/src/pages/docs/apis/connection.tsx | Removes legacy grouped “Connection APIs” page. |
| packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx | New Android API page for alternative billing dialog. |
| packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx | New Android API page for launching external link flow. |
| packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx | New Android API page for billing program availability check. |
| packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx | New Android API page documenting billing program enable via initConnection. |
| packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx | New Android API page for reporting details creation. |
| packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx | New Android API page for alternative billing token creation. |
| packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx | New Android (deprecated) API page recommending finishTransaction. |
| packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx | New Android API page for alternative billing availability check. |
| packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx | New Android (deprecated) API page recommending finishTransaction. |
| packages/docs/src/components/MenuDropdown.tsx | Adds nested menu groups + accessibility improvements for sidebar navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request implements a major restructuring of the documentation, transitioning from large, anchor-heavy pages to a flat routing architecture with dedicated pages for each API and type. Key changes include a refactored MenuDropdown component with improved accessibility, the addition of a Getting Started guide, and updated feature pages for validation, refunds, and debugging. Reviewers identified several improvement opportunities regarding the new routing system, including the need to remove redundant content from the API index page that has been migrated elsewhere and verifying that all legacy redirect anchors have valid targets. There was also a suggestion to refine the loop prevention logic in the redirect effect to better handle same-page anchor navigation.
apis/index Terminology section:
- Remove the duplicate Request APIs explanation now that the canonical
copy lives on /docs/apis/fetch-products#request-apis (and the
legacy hash redirect already routes there).
- Drop the no-op /docs/apis#transaction-vs-purchase entry from
LEGACY_ANCHOR_REDIRECTS — same source and target, would never fire
meaningfully.
MenuDropdown:
- Apply `tabIndex={parentExpanded ? 0 : -1}` to the SubMenu toggle
button so the entire collapsed-submenu UI (including the toggle
button) is removed from the keyboard tab order, not just its child
NavLinks.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/gemini review |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR restructures the docs site into flat per-symbol API/type pages, resolves GraphQL ↔ docs schema drift, and updates navigation to support platform-specific grouping (iOS/Android) with nested sidebar menus.
Changes:
- Split API/type documentation into dedicated pages under
/docs/apis/**and/docs/types/**, including platform subfolders. - Updated internal links/routing to match the new per-symbol structure and moved Validation/Debugging content into Features.
- Extended
MenuDropdownto support nested grouped entries and improved sidebar interaction/accessibility.
Reviewed changes
Copilot reviewed 92 out of 121 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx | Adds per-symbol Android type reference page for deprecated subscription offer details. |
| packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx | Adds per-symbol Android type reference page for pricing phases + recurrence values. |
| packages/docs/src/pages/docs/types/active-subscription.tsx | Adds per-symbol cross-platform type page with platform tabs + examples. |
| packages/docs/src/pages/docs/setup/react-native.tsx | Updates setup docs links and aligns product type string to new schema naming. |
| packages/docs/src/pages/docs/setup/index.tsx | Adds a framework setup index page linking to per-framework install guides. |
| packages/docs/src/pages/docs/setup/expo.tsx | Updates setup docs links and aligns product type string to new schema naming. |
| packages/docs/src/pages/docs/lifecycle/subscription.tsx | Updates internal links to new per-symbol API/type pages and adds more precise references. |
| packages/docs/src/pages/docs/lifecycle/index.tsx | Updates lifecycle guide links from anchor-based routes to per-symbol routes. |
| packages/docs/src/pages/docs/ios-setup.tsx | Updates finishTransaction reference to new per-symbol API page. |
| packages/docs/src/pages/docs/features/validation.tsx | Renames/moves Validation docs under Features, expands content, updates per-symbol type links. |
| packages/docs/src/pages/docs/features/subscription/upgrade-downgrade.tsx | Adds references and updates internal links to new per-symbol docs pages. |
| packages/docs/src/pages/docs/features/subscription/index.tsx | Updates subscription feature guide links to new per-symbol API/type pages and adds references. |
| packages/docs/src/pages/docs/features/subscription-billing-issue.tsx | Improves platform/version presentation, updates links to per-symbol pages, adds references section. |
| packages/docs/src/pages/docs/features/offer-code-redemption.tsx | Updates listener links to per-symbol event pages and adds native references. |
| packages/docs/src/pages/docs/features/external-purchase.tsx | Improves version formatting, fixes anchors, updates related links to new per-symbol pages, adds references. |
| packages/docs/src/pages/docs/features/discount.tsx | Updates type link to new per-symbol page and adds native references. |
| packages/docs/src/pages/docs/features/debugging.tsx | Renames/moves Debugging docs under Features, updates type/API links, adds references section. |
| packages/docs/src/pages/docs/features/alternative-marketplace/onside.tsx | Adds native references section. |
| packages/docs/src/pages/docs/features/alternative-marketplace/index.tsx | Adds native references section. |
| packages/docs/src/pages/docs/events/subscription-billing-issue-listener.tsx | Adds per-symbol event listener doc page for subscription billing issues. |
| packages/docs/src/pages/docs/events/purchase-updated-listener.tsx | Adds per-symbol event listener doc page for purchase updates. |
| packages/docs/src/pages/docs/events/purchase-error-listener.tsx | Adds per-symbol event listener doc page for purchase errors. |
| packages/docs/src/pages/docs/events/ios/promoted-product-listener-ios.tsx | Adds per-symbol iOS-specific event listener doc page. |
| packages/docs/src/pages/docs/events/android/user-choice-billing-listener-android.tsx | Adds per-symbol Android-specific event listener doc page for user choice billing. |
| packages/docs/src/pages/docs/events/android/developer-provided-billing-listener-android.tsx | Adds per-symbol Android-specific event listener doc page for developer-provided billing. |
| packages/docs/src/pages/docs/errors.tsx | Adjusts error structure section anchoring and updates wording for new doc organization. |
| packages/docs/src/pages/docs/apis/validate-receipt.tsx | Adds redirect page from deprecated validateReceipt route to Validation feature section. |
| packages/docs/src/pages/docs/apis/subscription.tsx | Removes legacy grouped “Subscription APIs” page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/restore-purchases.tsx | Adds per-symbol API reference page for restorePurchases. |
| packages/docs/src/pages/docs/apis/request-purchase.tsx | Adds per-symbol API reference page for requestPurchase with listener-driven guidance. |
| packages/docs/src/pages/docs/apis/products.tsx | Removes legacy grouped “Products APIs” page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx | Adds per-symbol deprecated iOS validateReceiptIOS API reference page. |
| packages/docs/src/pages/docs/apis/ios/sync-ios.tsx | Adds per-symbol iOS API reference page for syncIOS. |
| packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx | Adds per-symbol iOS API reference page for subscriptionStatusIOS. |
| packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx | Adds per-symbol iOS API reference page for showManageSubscriptionsIOS. |
| packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx | Adds per-symbol iOS API reference page for external purchase custom link notice. |
| packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx | Adds per-symbol deprecated iOS API reference page for promoted-product purchase request. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx | Adds per-symbol iOS API reference page for external purchase notice sheet. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx | Adds per-symbol iOS API reference page for external purchase link. |
| packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx | Adds per-symbol iOS API reference page for code redemption sheet. |
| packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx | Adds per-symbol iOS API reference page for latestTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx | Adds per-symbol iOS API reference page for isTransactionVerifiedIOS with example + related links. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx | Adds per-symbol iOS API reference page for intro-offer eligibility check. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-external-purchase-custom-link-ios.tsx | Adds per-symbol iOS API reference page for custom-link eligibility check. |
| packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx | Adds per-symbol iOS API reference page for fetching transaction JWS for server validation. |
| packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx | Adds per-symbol deprecated iOS storefront API reference page pointing to cross-platform API. |
| packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx | Adds per-symbol iOS API reference page for legacy receipt data access. |
| packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx | Adds per-symbol iOS API reference page for getting promoted product. |
| packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx | Adds per-symbol iOS API reference page for pending transactions. |
| packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx | Adds per-symbol iOS API reference page for external purchase custom-link token fetch. |
| packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx | Adds per-symbol iOS API reference page for app transaction. |
| packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx | Adds per-symbol iOS API reference page for full SK2 transaction history. |
| packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx | Adds per-symbol iOS API reference page for current entitlement. |
| packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx | Adds per-symbol iOS API reference page for clearing transactions. |
| packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx | Adds per-symbol iOS API reference page for notice-sheet eligibility. |
| packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx | Adds per-symbol iOS API reference page for refund request. |
| packages/docs/src/pages/docs/apis/init-connection.tsx | Adds per-symbol API reference page for initConnection with billing program config references. |
| packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx | Adds per-symbol API reference page for hasActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/get-storefront.tsx | Adds per-symbol API reference page for cross-platform storefront. |
| packages/docs/src/pages/docs/apis/get-available-purchases.tsx | Adds per-symbol API reference page for getAvailablePurchases. |
| packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx | Adds per-symbol API reference page for getActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/finish-transaction.tsx | Adds per-symbol API reference page for finishTransaction including platform-critical notes. |
| packages/docs/src/pages/docs/apis/fetch-products.tsx | Adds per-symbol API reference page for fetchProducts including schema return unions and guidance. |
| packages/docs/src/pages/docs/apis/end-connection.tsx | Adds per-symbol API reference page for endConnection with hook lifecycle notes. |
| packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx | Adds per-symbol API reference page for deepLinkToSubscriptions with iOS manage-subscriptions link. |
| packages/docs/src/pages/docs/apis/connection.tsx | Removes legacy grouped “Connection APIs” page (replaced by per-symbol pages). |
| packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx | Adds per-symbol Android API reference page for alternative billing dialog step. |
| packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx | Adds per-symbol Android API reference page for external link launch step. |
| packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx | Adds per-symbol Android API reference page for billing program availability check. |
| packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx | Adds per-symbol Android billing program enablement doc via initConnection config. |
| packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx | Adds per-symbol Android API reference page for reporting details creation. |
| packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx | Adds per-symbol Android API reference page for alternative billing token creation. |
| packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx | Adds per-symbol Android API reference page for deprecated consumePurchase flow. |
| packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx | Adds per-symbol Android API reference page for alternative billing availability check. |
| packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx | Adds per-symbol Android API reference page for deprecated acknowledgePurchase flow. |
| packages/docs/src/components/MenuDropdown.tsx | Extends sidebar dropdown to support nested grouped menu entries and improves ARIA + keyboard behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request refactors the documentation structure by flattening large API and Type reference pages into individual, symbol-specific routes. It introduces a new "Getting Started" guide, updates the sidebar with nested menu support for better navigation, and migrates several topics (Validation, Refund, Debugging) into dedicated feature guides. Feedback from the review highlights the need to ensure all legacy section-level anchors are included in the redirect maps and to implement hash-preserving redirect logic on the Types index page to prevent breaking existing external links.
There was a problem hiding this comment.
Actionable comments posted: 6
♻️ Duplicate comments (2)
packages/docs/src/pages/docs/features/purchase.tsx (1)
1029-1035:⚠️ Potential issue | 🟡 MinorFix the IAPKit type link label/target mismatch.
This points to
verify-purchase-with-provider-props, but the label saysPurchaseVerificationProviderand the sentence calls it the response shape. Those are different types, so readers land on the wrong concept.Suggested doc fix
- <Link to="/docs/types/verify-purchase-with-provider-props"> - PurchaseVerificationProvider + <Link to="/docs/types/verify-purchase-with-provider-props"> + VerifyPurchaseWithProviderProps </Link>{' '} - type reference for the full response shape. + type reference for the request shape.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/pages/docs/features/purchase.tsx` around lines 1029 - 1035, The link label "PurchaseVerificationProvider" does not match the current target "/docs/types/verify-purchase-with-provider-props"; update the Link in purchase.tsx so the label and target refer to the same type: either change the Link target to the PurchaseVerificationProvider type (e.g., "/docs/types/purchase-verification-provider") or change the link label/text to match "VerifyPurchaseWithProviderProps" (or the exact type name at "/docs/types/verify-purchase-with-provider-props") so readers land on the correct type definition; the Link component and its label text are the unique symbols to update.packages/docs/src/lib/searchData.ts (1)
668-736:⚠️ Potential issue | 🟡 MinorKeep the iOS type names canonical in the search index.
These entries still publish unsuffixed names (
DiscountOffer,Discount,PaymentMode,AppTransaction) even though the docs routes/sidebar now use the canonical...IOSidentifiers. That makes exact-name searches inconsistent with the pages users land on.🧭 Suggested cleanup
{ id: 'types-ios', title: 'iOS Types', category: 'Types', description: - 'DiscountOffer, SubscriptionStatusIOS, PaymentMode, AppTransaction', + 'DiscountOfferIOS, SubscriptionStatusIOS, PaymentModeIOS, AppTransactionIOS', path: '/docs/types#ios-types', }, @@ { id: 'discount-offer', - title: 'DiscountOffer', + title: 'DiscountOfferIOS', @@ { id: 'discount', - title: 'Discount', + title: 'DiscountIOS', @@ { id: 'payment-mode', - title: 'PaymentMode', + title: 'PaymentModeIOS', @@ { id: 'app-transaction', - title: 'AppTransaction', + title: 'AppTransactionIOS',As per coding guidelines, "iOS types must use
IOSsuffix (e.g.,PurchaseIOS,ProductIOS)".🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/lib/searchData.ts` around lines 668 - 736, The iOS-specific search entries use unsuffixed titles (e.g., title: 'DiscountOffer', 'Discount', 'PaymentMode', 'AppTransaction') which conflicts with the canonical `...IOS` names; update those title values to the canonical forms (e.g., 'DiscountOfferIOS', 'DiscountIOS', 'PaymentModeIOS', 'AppTransactionIOS') in the same objects (look for the objects with id 'discount-offer', 'discount', 'payment-mode', 'app-transaction') so search results match the docs/sidebar naming; keep paths and other fields unchanged.
🧹 Nitpick comments (1)
packages/docs/src/components/MenuDropdown.tsx (1)
58-128: LGTM — disclosure semantics and tab order are correctly wired.
useId+aria-expanded/aria-controls/aria-hidden, thetabIndexon both the toggle button and childNavLinks gated onparentExpanded && isExpanded, and the auto-expand effect on active route all line up. The single combined disclosure button (instead of two stops per group) is a nice keyboard-UX win.One small thought (optional): the visible group label is already the button's accessible name, so the extra
aria-label="Toggle ${group.label} submenu"shadows it for AT users. If you'd rather have screen readers announce the visible label plus the disclosure state, you can droparia-labeland let the inner text +aria-expandedspeak for themselves. Non-blocking.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/docs/src/components/MenuDropdown.tsx` around lines 58 - 128, The SubMenu disclosure button currently sets an explicit aria-label (`aria-label={`Toggle ${group.label} submenu`}`) which overrides the visible button text as the accessible name; remove the aria-label attribute from the button in the SubMenu component so the inner text (span.menu-dropdown-title) plus aria-expanded provides the accessible name and state to AT users, leaving aria-expanded, aria-controls and aria-hidden as-is; if you want an explicit reference instead, replace aria-label with aria-labelledby pointing to the title element's id.
🤖 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/deep-link-to-subscriptions.tsx`:
- Around line 38-42: Update the Kotlin and KMP doc signatures for
deepLinkToSubscriptions to reflect the actual implementation by making the
DeepLinkOptions parameter optional with a null default; locate the CodeBlock
entries that render `suspend fun deepLinkToSubscriptions(options:
DeepLinkOptions)` and change them to the optional form `suspend fun
deepLinkToSubscriptions(options: DeepLinkOptions? = null)` so the docs match the
generated types and the Swift example.
In `@packages/docs/src/pages/docs/events/subscription-billing-issue-listener.tsx`:
- Around line 120-128: The Kotlin example should show creating an OpenIapStore
instance and the corresponding cleanup call: instantiate OpenIapStore (e.g., val
openIapStore = OpenIapStore(...)) and use that instance when calling
addSubscriptionBillingIssueListener { purchase -> ...
showBillingIssueBanner(purchase) }, then capture the returned listener/token (or
keep a reference) and call removeSubscriptionBillingIssueListener(listener)
during cleanup (e.g., onDestroy or appropriate lifecycle teardown) to mirror the
TS/Swift/Dart/GDScript patterns; update the import to be used by the instance
and include both addSubscriptionBillingIssueListener and
removeSubscriptionBillingIssueListener references (and showBillingIssueBanner)
in the snippet.
In `@packages/docs/src/pages/docs/features/refund.tsx`:
- Around line 147-159: The Swift example uses switch directly on an optional
String returned by OpenIapModule.shared.beginRefundRequestIOS(sku:), which
prevents the "success" and "userCancelled" cases from matching; unwrap the
optional first (e.g., guard/if let status = ... or optional pattern matching)
before switching on status, then handle the nil branch separately (print "Refund
request status: nil") and keep the existing cases ("success", "userCancelled",
default) inside the non-nil switch.
In `@packages/docs/src/pages/docs/types/active-subscription.tsx`:
- Around line 107-115: The docs table currently shows purchaseToken and
environmentIOS as always-present strings; update the ActiveSubscription docs to
reflect the runtime schema by marking both purchaseToken and environmentIOS as
nullable (e.g., display their type as "string | null" or otherwise indicate they
may be null/optional) and adjust their description to mention they can be null;
apply this change for the purchaseToken and environmentIOS rows (both
occurrences) so the rendered reference matches the ActiveSubscription shape.
In `@packages/docs/src/pages/docs/types/alternative-billing-types.tsx`:
- Around line 275-281: The import list includes an unused, unsuffixed symbol
createAlternativeBillingToken; remove createAlternativeBillingToken from the
import statement so the snippet only imports actual used functions (e.g.,
initConnection, userChoiceBillingListenerAndroid, fetchProducts,
requestPurchase) and keep the Android-suffixed alternative billing helper
(userChoiceBillingListenerAndroid) as the canonical example.
- Line 17: The keywords prop contains a stray double space in the third entry;
update the keywords string used in the component (keywords="Alternative Billing
Types, OpenIAP types, Alternative Billing Types") to remove the extra space so
it reads "Alternative Billing Types, OpenIAP types, Alternative Billing Types"
(ensure you edit the keywords prop value where it is defined).
---
Duplicate comments:
In `@packages/docs/src/lib/searchData.ts`:
- Around line 668-736: The iOS-specific search entries use unsuffixed titles
(e.g., title: 'DiscountOffer', 'Discount', 'PaymentMode', 'AppTransaction')
which conflicts with the canonical `...IOS` names; update those title values to
the canonical forms (e.g., 'DiscountOfferIOS', 'DiscountIOS', 'PaymentModeIOS',
'AppTransactionIOS') in the same objects (look for the objects with id
'discount-offer', 'discount', 'payment-mode', 'app-transaction') so search
results match the docs/sidebar naming; keep paths and other fields unchanged.
In `@packages/docs/src/pages/docs/features/purchase.tsx`:
- Around line 1029-1035: The link label "PurchaseVerificationProvider" does not
match the current target "/docs/types/verify-purchase-with-provider-props";
update the Link in purchase.tsx so the label and target refer to the same type:
either change the Link target to the PurchaseVerificationProvider type (e.g.,
"/docs/types/purchase-verification-provider") or change the link label/text to
match "VerifyPurchaseWithProviderProps" (or the exact type name at
"/docs/types/verify-purchase-with-provider-props") so readers land on the
correct type definition; the Link component and its label text are the unique
symbols to update.
---
Nitpick comments:
In `@packages/docs/src/components/MenuDropdown.tsx`:
- Around line 58-128: The SubMenu disclosure button currently sets an explicit
aria-label (`aria-label={`Toggle ${group.label} submenu`}`) which overrides the
visible button text as the accessible name; remove the aria-label attribute from
the button in the SubMenu component so the inner text (span.menu-dropdown-title)
plus aria-expanded provides the accessible name and state to AT users, leaving
aria-expanded, aria-controls and aria-hidden as-is; if you want an explicit
reference instead, replace aria-label with aria-labelledby pointing to the title
element's id.
🪄 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: ed827aed-0dc0-4329-abb0-d52480342b42
📒 Files selected for processing (19)
packages/docs/src/components/MenuDropdown.tsxpackages/docs/src/lib/searchData.tspackages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsxpackages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsxpackages/docs/src/pages/docs/apis/index.tsxpackages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsxpackages/docs/src/pages/docs/apis/restore-purchases.tsxpackages/docs/src/pages/docs/apis/validate-receipt.tsxpackages/docs/src/pages/docs/events/purchase-error-listener.tsxpackages/docs/src/pages/docs/events/subscription-billing-issue-listener.tsxpackages/docs/src/pages/docs/features/purchase.tsxpackages/docs/src/pages/docs/features/refund.tsxpackages/docs/src/pages/docs/index.tsxpackages/docs/src/pages/docs/types/active-subscription.tsxpackages/docs/src/pages/docs/types/alternative-billing-types.tsxpackages/docs/src/pages/docs/types/android/subscription-offer-android.tsxpackages/docs/src/pages/docs/types/billing-programs.tsxpackages/docs/src/pages/docs/types/discount-offer.tsxpackages/docs/src/pages/docs/types/index.tsx
✅ Files skipped from review due to trivial changes (1)
- packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
- packages/docs/src/pages/docs/apis/validate-receipt.tsx
- packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx
- packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx
- packages/docs/src/pages/docs/events/purchase-error-listener.tsx
|
/gemini review |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
- apis/deep-link-to-subscriptions: Kotlin/KMP signatures now show
`options: DeepLinkOptions? = null` to match the canonical
`Types.kt` declaration.
- features/refund Swift sample: `beginRefundRequestIOS` returns
`String?`, so the switch must unwrap first — wrapped in
`if let status { switch status { … } } else { … }`.
- types/active-subscription: drop the misleading required-string
rendering — `purchaseToken` and `environmentIOS` are
`string?` / `("Sandbox"|"Production")?` per the generated
schema.
- types/alternative-billing-types: trim "Alternative Billing Types"
double-space typo in SEO keywords; remove unused
`createAlternativeBillingToken` import from the User Choice flow
TS sample (also drops the unsuffixed name that the Alternative-
Only example below already standardised on).
- events/subscription-billing-issue-listener: Kotlin sample now
declares `val openIapStore = OpenIapStore(context)` (instead of
using a phantom lowercase variable) and shows the
`removeSubscriptionBillingIssueListener` cleanup, matching the TS
/ Swift / Dart / GDScript variants.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
/gemini review |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Code Review
This pull request restructures the documentation into a flat, per-symbol architecture, creating individual pages for every API function and type definition. It introduces a new "Getting Started" guide, refactors the MenuDropdown component to support nested navigation groups, and updates the routing system to maintain compatibility with legacy anchor links. Feedback was provided regarding a confusing deprecation notice in the Android acknowledgment documentation that incorrectly references the "unified Billing Programs API," which may lead to architectural misunderstandings between core transaction methods and specific feature sets.
…mini) Drop the misleading "unified Billing Programs API" framing — acknowledge / consume are core transaction APIs, not part of the Billing Programs (external offers / external payments) feature set. Point readers to the cross-platform finishTransaction directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Restructures the docs site into flat per-symbol pages for APIs and types, aligns documentation with the canonical GraphQL schema, and updates navigation/sidebar behavior to support nested platform grouping.
Changes:
- Added many new per-symbol docs pages under
/docs/apis/**,/docs/types/**,/docs/events/**, and/docs/features/**; removed legacy grouped API pages. - Updated internal links/routing to point to new per-symbol routes and platform folders (iOS/Android).
- Extended
MenuDropdownto support nested grouped entries and improved keyboard/ARIA behavior.
Reviewed changes
Copilot reviewed 92 out of 121 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs/src/pages/docs/types/android/subscription-offer-android.tsx | New Android type reference page for subscription offer details (deprecated). |
| packages/docs/src/pages/docs/types/android/pricing-phase-android.tsx | New Android type reference page for pricing phases + recurrence values. |
| packages/docs/src/pages/docs/types/active-subscription.tsx | New cross-platform ActiveSubscription type page with platform tabs and examples. |
| packages/docs/src/pages/docs/setup/react-native.tsx | Updates examples + adds internal links to new per-symbol API/error pages. |
| packages/docs/src/pages/docs/setup/index.tsx | New setup landing page listing framework guides and cross-cutting references. |
| packages/docs/src/pages/docs/setup/expo.tsx | Updates examples + adds internal links to new per-symbol error page. |
| packages/docs/src/pages/docs/lifecycle/subscription.tsx | Updates links to new per-symbol API/type routes and adds internal cross-links. |
| packages/docs/src/pages/docs/lifecycle/index.tsx | Updates lifecycle steps to link to per-symbol APIs/events/features. |
| packages/docs/src/pages/docs/ios-setup.tsx | Adds internal link to finishTransaction per-symbol API page. |
| packages/docs/src/pages/docs/features/validation.tsx | Moves “Validation APIs” into Features, expands content + updates routes/SEO. |
| packages/docs/src/pages/docs/features/subscription/upgrade-downgrade.tsx | Adds native reference links + updates internal links to per-symbol pages. |
| packages/docs/src/pages/docs/features/subscription/index.tsx | Updates internal links (APIs/types/features) and adds native references section. |
| packages/docs/src/pages/docs/features/subscription-billing-issue.tsx | Updates table layout + adds internal links and new “Native References” section. |
| packages/docs/src/pages/docs/features/offer-code-redemption.tsx | Updates internal links + adds native references section. |
| packages/docs/src/pages/docs/features/external-purchase.tsx | Updates internal links, adds anchors, and adds “Native References” section. |
| packages/docs/src/pages/docs/features/discount.tsx | Updates internal type link + adds native references section. |
| packages/docs/src/pages/docs/features/debugging.tsx | Moves “Debugging APIs” into Features, updates links + adds native references. |
| packages/docs/src/pages/docs/features/alternative-marketplace/onside.tsx | Adds “Native References” section. |
| packages/docs/src/pages/docs/features/alternative-marketplace/index.tsx | Adds “Native References” section. |
| packages/docs/src/pages/docs/events/subscription-billing-issue-listener.tsx | New event docs page for subscriptionBillingIssueListener. |
| packages/docs/src/pages/docs/events/purchase-updated-listener.tsx | New event docs page for purchaseUpdatedListener. |
| packages/docs/src/pages/docs/events/purchase-error-listener.tsx | New event docs page for purchaseErrorListener. |
| packages/docs/src/pages/docs/events/ios/promoted-product-listener-ios.tsx | New iOS event docs page for promoted product listener. |
| packages/docs/src/pages/docs/events/android/user-choice-billing-listener-android.tsx | New Android event docs page for user-choice billing events. |
| packages/docs/src/pages/docs/events/android/developer-provided-billing-listener-android.tsx | New Android event docs page for external payments developer billing. |
| packages/docs/src/pages/docs/errors.tsx | Adds explicit anchor id and adjusts copy around PurchaseError shape. |
| packages/docs/src/pages/docs/apis/validate-receipt.tsx | Adds redirect page from deprecated validateReceipt to Validation feature anchor. |
| packages/docs/src/pages/docs/apis/subscription.tsx | Removes legacy grouped “Subscription APIs” page. |
| packages/docs/src/pages/docs/apis/restore-purchases.tsx | New per-symbol API doc page for restorePurchases. |
| packages/docs/src/pages/docs/apis/request-purchase.tsx | New per-symbol API doc page for requestPurchase. |
| packages/docs/src/pages/docs/apis/products.tsx | Removes legacy grouped “Product APIs” page. |
| packages/docs/src/pages/docs/apis/ios/validate-receipt-ios.tsx | New per-symbol iOS API page for deprecated validateReceiptIOS. |
| packages/docs/src/pages/docs/apis/ios/sync-ios.tsx | New per-symbol iOS API page for syncIOS. |
| packages/docs/src/pages/docs/apis/ios/subscription-status-ios.tsx | New per-symbol iOS API page for subscriptionStatusIOS. |
| packages/docs/src/pages/docs/apis/ios/show-manage-subscriptions-ios.tsx | New per-symbol iOS API page for showManageSubscriptionsIOS. |
| packages/docs/src/pages/docs/apis/ios/show-external-purchase-custom-link-notice-ios.tsx | New per-symbol iOS API page for external purchase custom link notice sheet. |
| packages/docs/src/pages/docs/apis/ios/request-purchase-on-promoted-product-ios.tsx | New per-symbol iOS API page for deprecated promoted purchase API. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-notice-sheet-ios.tsx | New per-symbol iOS API page for external purchase notice sheet. |
| packages/docs/src/pages/docs/apis/ios/present-external-purchase-link-ios.tsx | New per-symbol iOS API page for presenting an external purchase link. |
| packages/docs/src/pages/docs/apis/ios/present-code-redemption-sheet-ios.tsx | New per-symbol iOS API page for promo code redemption sheet. |
| packages/docs/src/pages/docs/apis/ios/latest-transaction-ios.tsx | New per-symbol iOS API page for latestTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/is-transaction-verified-ios.tsx | New per-symbol iOS API page for local StoreKit 2 verification helper. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-intro-offer-ios.tsx | New per-symbol iOS API page for intro offer eligibility. |
| packages/docs/src/pages/docs/apis/ios/is-eligible-for-external-purchase-custom-link-ios.tsx | New per-symbol iOS API page for external purchase custom link eligibility. |
| packages/docs/src/pages/docs/apis/ios/get-transaction-jws-ios.tsx | New per-symbol iOS API page for fetching transaction JWS. |
| packages/docs/src/pages/docs/apis/ios/get-storefront-ios.tsx | New per-symbol iOS API page for deprecated getStorefrontIOS. |
| packages/docs/src/pages/docs/apis/ios/get-receipt-data-ios.tsx | New per-symbol iOS API page for legacy receipt data access. |
| packages/docs/src/pages/docs/apis/ios/get-promoted-product-ios.tsx | New per-symbol iOS API page for getPromotedProductIOS. |
| packages/docs/src/pages/docs/apis/ios/get-pending-transactions-ios.tsx | New per-symbol iOS API page for getPendingTransactionsIOS. |
| packages/docs/src/pages/docs/apis/ios/get-external-purchase-custom-link-token-ios.tsx | New per-symbol iOS API page for external purchase custom link token retrieval. |
| packages/docs/src/pages/docs/apis/ios/get-app-transaction-ios.tsx | New per-symbol iOS API page for getAppTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/get-all-transactions-ios.tsx | New per-symbol iOS API page for full transaction history. |
| packages/docs/src/pages/docs/apis/ios/current-entitlement-ios.tsx | New per-symbol iOS API page for currentEntitlementIOS. |
| packages/docs/src/pages/docs/apis/ios/clear-transaction-ios.tsx | New per-symbol iOS API page for clearTransactionIOS. |
| packages/docs/src/pages/docs/apis/ios/can-present-external-purchase-notice-ios.tsx | New per-symbol iOS API page for notice sheet availability check. |
| packages/docs/src/pages/docs/apis/ios/begin-refund-request-ios.tsx | New per-symbol iOS API page for initiating refund requests. |
| packages/docs/src/pages/docs/apis/init-connection.tsx | New per-symbol API doc page for initConnection. |
| packages/docs/src/pages/docs/apis/has-active-subscriptions.tsx | New per-symbol API doc page for hasActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/get-storefront.tsx | New per-symbol API doc page for getStorefront. |
| packages/docs/src/pages/docs/apis/get-available-purchases.tsx | New per-symbol API doc page for getAvailablePurchases. |
| packages/docs/src/pages/docs/apis/get-active-subscriptions.tsx | New per-symbol API doc page for getActiveSubscriptions. |
| packages/docs/src/pages/docs/apis/finish-transaction.tsx | New per-symbol API doc page for finishTransaction. |
| packages/docs/src/pages/docs/apis/fetch-products.tsx | New per-symbol API doc page for fetchProducts. |
| packages/docs/src/pages/docs/apis/end-connection.tsx | New per-symbol API doc page for endConnection. |
| packages/docs/src/pages/docs/apis/deep-link-to-subscriptions.tsx | New per-symbol API doc page for deep-linking to native subscription management. |
| packages/docs/src/pages/docs/apis/connection.tsx | Removes legacy grouped “Connection APIs” page. |
| packages/docs/src/pages/docs/apis/android/show-alternative-billing-dialog-android.tsx | New per-symbol Android API page for alternative billing dialog. |
| packages/docs/src/pages/docs/apis/android/launch-external-link-android.tsx | New per-symbol Android API page for launching external link flows. |
| packages/docs/src/pages/docs/apis/android/is-billing-program-available-android.tsx | New per-symbol Android API page for billing program availability. |
| packages/docs/src/pages/docs/apis/android/enable-billing-program-android.tsx | New per-symbol Android API page documenting billing program enablement via init. |
| packages/docs/src/pages/docs/apis/android/create-billing-program-reporting-details-android.tsx | New per-symbol Android API page for reporting details creation. |
| packages/docs/src/pages/docs/apis/android/create-alternative-billing-token-android.tsx | New per-symbol Android API page for alternative billing token creation. |
| packages/docs/src/pages/docs/apis/android/consume-purchase-android.tsx | New per-symbol Android API page for deprecated consume flow and guidance. |
| packages/docs/src/pages/docs/apis/android/check-alternative-billing-availability-android.tsx | New per-symbol Android API page for availability checks. |
| packages/docs/src/pages/docs/apis/android/acknowledge-purchase-android.tsx | New per-symbol Android API page for deprecated acknowledge flow and guidance. |
| packages/docs/src/components/MenuDropdown.tsx | Adds nested menu groups + refines keyboard focus management and ARIA attributes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… page (Copilot) The "Error Handling" / `PurchaseError` line linked the same URL twice. Send the `PurchaseError` link to the `#error-structure` anchor where the type's shape is documented, and clarify the prose to "shape and error codes". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the documentation site, transitioning from monolithic reference pages to a granular, per-symbol routing structure. It introduces new feature guides for Refund, Validation, and Debugging, adds a "Getting Started" walkthrough, and enhances the navigation menu's accessibility. Feedback focuses on maintaining naming consistency for platform-specific Kotlin signatures within the documentation, specifically requesting the inclusion of "IOS" and "Android" suffixes to match the cross-platform SDK's public API surface.
Summary
Restructures the docs site so every API function and every type has its own page, fixes the long-standing GraphQL ↔ docs schema drift, and reorganizes platform-specific content into
apis/ios,apis/android,types/ios,types/androidfolders.Routing & content
/docs/apis/...and/docs/types/...(no more anchor-grouped pages)ios//android/subfolders for both apis and typesValidation,Refund, andDebugginggraduated from APIs to FeaturesbeginRefundRequestIOS, Android auto-refund, App Store Server Notifications, and RTDNSchema parity
packages/gql/src— backfilled missing fields (subscriptionOffers,discountOffers,RenewalInfoIOS.jsonRepresentation,ActiveSubscriptionAndroid.deferredDate/deferredSku/parentProductId/receiptId/termSku,BillingProgramAvailabilityResultAndroid.isAvailable,LaunchExternalLinkParamsAndroid.linkType,ExternalPurchaseNoticeResultIOS.externalPurchaseToken, …)ProductSubscriptionIOS,ProductAndroidOneTimePurchaseOfferDetail,ProductSubscriptionAndroidOfferDetails)Sidebar / nav
MenuDropdownextended to support nestedMenuGroupentries (Common / iOS Specific / Android Specific groups)overflow-x: hidden→overflow-x: clipso position-sticky stays attachedmin-width: max-content, horizontal scroll, andnowrapVerification
bun run typecheck✓bunx vite build✓Storefrontis a doc-only concept page,RequestPurchasePropsuses TS-SDK discriminated union shape)Test plan
/docs/apis/ios/sync-ios,/docs/apis/android/acknowledge-purchase-android,/docs/types/ios/subscription-status-iosetc. loadcreateBillingProgramReportingDetailsAndroid) — sidebar scrolls horizontally without overlapping the scrollbar🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation