Add JSDoc for API properties (2025-10)#4389
Conversation
Adds JSDoc to checkout and customer account API surfaces for properties whose documentation was moved out of Limitations sections in shopify-dev. See shopify/issues-learn#1612. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🚨🚨🚨 Docs migration in progress 🚨🚨🚨We are actively migrating UI extension reference docs to MDX in the
During this migration, please be aware of the following:
Doc comments in Examples that previously lived in this repo are being moved to the What should I do?
Thanks for your patience while we complete the migration! 🙏 |
|
We detected some changes in |
Adds JSDoc to OrderStatusApi.authenticationState (read-only framing) and OrderStatusApi.requireLogin (dismissal-handling guidance) on the customer account API surface. Picks up content trimmed from the .mdx in shopify/world#663262 review feedback. References shopify/issues-learn#1612. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…25-10 # Conflicts: # packages/ui-extensions/src/surfaces/checkout/api/standard/standard.ts
Summary
Adds JSDoc to checkout and customer account API surfaces for properties whose documentation was moved out of
## Limitationssections in shopify-dev. Pairs with the .mdx cleanup in shopify/world#663262 and the multi-agent plan in shopify/world#660052.References shopify/issues-learn#1612.
Properties touched (Agent 1 scope, A.* and B.*)
Checkout API (
packages/ui-extensions/src/surfaces/checkout/api/)Attribute.value(shared.ts)InterceptorRequestAllow.performandInterceptorRequestBlock.perform(standard.ts)CartLineChangeResultError.message,CheckoutApi.applyCartLinesChange(checkout.ts)StandardApi.checkoutToken(standard.ts)CartCost.totalShippingAmount,CartCost.totalTaxAmount(standard.ts)TrackingConsentMetafieldChange.value,AllowedProcessing.{analytics,marketing,preferences,saleOfData}(standard.ts)StandardApi.deliveryGroups(standard.ts);targetandisTargetSelectedonCartLineItemApi,ShippingOptionItemApi,PickupLocationItemApiGiftCardChangeResultError.message,CheckoutApi.applyGiftCardChange(checkout.ts)useLocalizedField(preact/localized-fields.ts)NoteChangeResultError.message(checkout.ts)OrderConfirmation.number(order-confirmation.ts)Analytics.publish(standard.ts)Extension.version(standard.ts)Localization.country(standard.ts)MetafieldChangeResultError.message(checkout.ts)SessionTokeninterface description (standard.ts) — there's no typedsubclaim, so the JSDoc lives on the interface itselfStorage.read(standard.ts)Customer account API (
packages/ui-extensions/src/surfaces/customer-account/api/)OrderStatusApi.checkoutSettings(order-status.ts)CustomerPrivacy.region(shared.ts)OrderStatusApi.shippingAddress,OrderStatusApi.billingAddress(order-status.ts)Attribute.value(shared.ts)OrderStatusApi.buyerIdentity(order-status.ts)OrderStatusApi.discountAllocations(order-status.ts)AppliedGiftCard.balance(order-status.ts)Metafield.value(order-status.ts)OrderStatusLocalizationinterface description (order-status.ts)Follow-up commit (covers content trimmed from .mdx in review feedback on shopify/world#663262):
OrderStatusApi.requireLogin(order-status.ts) — dismissal-handling guidanceOrderStatusApi.authenticationState(order-status.ts) — read-only framingNotes / deviations from the plan
<Requires>callout. Existing JSDoc onBuyerIdentity.emailandBuyerIdentity.phoneinstandard.tsalready includes "Requires level 2 access to protected customer data" plus theundefinedbehavior, so no JSDoc edit is needed here.availablePaymentOptionsandselectedPaymentOptionsJSDoc edits in this PR were superseded by upstream commit2e27e8ea7 Add payment option limitations to availablePaymentOptions and selectedPaymentOptions(Stephanie). Same content, reviewer-improved phrasing. The merge resolution in this PR takes the upstream wording, so A.16 is no longer load-bearing here.message: The plan's text references "the error code" but these error result types only carrytype: 'error'andmessage: string— no error code field. Adapted the new sentence to "Render your own localized error text rather than displaying this message to the buyer."subclaim: There's no typedsubfield in the source — the token is a JWT string. Added the guidance to theSessionTokeninterface description.fetch(): Thefetch()approach uses the standard JSfetchwithshopify:storefront/...URLs and has no typed function in the customer account API source. Skipped JSDoc for this version. The.mdxcleanup already covers the guidance.Test plan
2026-01,2026-04,2026-07-rcwith byte-identical JSDoc🤖 Generated with Claude Code