Skip to content

Add JSDoc for API properties (2026-01)#4390

Merged
rennyG merged 3 commits into
2026-01from
cleanup-jsdoc-1-2026-01
Apr 30, 2026
Merged

Add JSDoc for API properties (2026-01)#4390
rennyG merged 3 commits into
2026-01from
cleanup-jsdoc-1-2026-01

Conversation

@rennyG
Copy link
Copy Markdown
Contributor

@rennyG rennyG commented Apr 29, 2026

Summary

Adds JSDoc to checkout and customer account API surfaces for properties whose documentation was moved out of ## Limitations sections 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.

This is the 2026-01 sibling of #4389 (2025-10). JSDoc text is byte-identical across all four version PRs.

Follow-up commit

Picks up content trimmed from the .mdx in review feedback on shopify/world#663262:

  • OrderStatusApi.requireLogin (order-status.ts) — dismissal-handling guidance
  • OrderStatusApi.authenticationState (order-status.ts) — read-only framing

Notes / deviations from the plan

  • A.3 buyer-identity (checkout): Reviewer trimmed the level-2 access note from the .mdx intro because it duplicated the <Requires> callout. Existing JSDoc on BuyerIdentity.email and BuyerIdentity.phone in standard.ts already includes "Requires level 2 access to protected customer data" plus the undefined behavior, so no JSDoc edit is needed here.
  • A.16 payment options superseded upstream: The availablePaymentOptions and selectedPaymentOptions JSDoc edits in this PR were superseded by upstream commit 2e27e8ea7 Add payment option limitations to availablePaymentOptions and selectedPaymentOptions (Stephanie). Same content, reviewer-improved phrasing. The merge resolution takes the upstream wording, so A.16 is no longer load-bearing here.
  • A.6, A.12, A.14, A.20 error message: The plan's text references "the error code" but these error result types only carry type: 'error' and message: string. Adapted the new sentence to "Render your own localized error text rather than displaying this message to the buyer."
  • A.21 SessionToken sub claim: There's no typed sub field — the token is a JWT string. Added the guidance to the SessionToken interface description.
  • B.14 storefront global fetch(): The fetch() approach uses standard JS fetch with shopify:storefront/... URLs and has no typed function in the customer account API source. Skipped JSDoc for this version. The .mdx cleanup already covers the guidance.
  • Style: Removed em dashes from the plan text (replaced with periods, semicolons, or commas). Kept "only" next to what it modifies.

Test plan

  • CI passes on this PR
  • Sibling PRs land for 2025-10, 2026-04, 2026-07-rc with byte-identical JSDoc

🤖 Generated with Claude Code

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>
@github-actions
Copy link
Copy Markdown
Contributor

🚨🚨🚨 Docs migration in progress 🚨🚨🚨

We are actively migrating UI extension reference docs to MDX in the areas/platforms/shopify-dev zone of the monorepo. This impacts docs for the following surfaces:

During this migration, please be aware of the following:

.doc.ts files are being deprecated. Changes to .doc.ts files in this repo will not be reflected in the new MDX-based docs. If you need to update docs for a reference that has already been migrated, make your changes directly in the areas/platforms/shopify-dev zone of the monorepo instead.

Doc comments in .ts source files (the comment blocks above types and functions) are also affected. Generating docs from these comments currently requires a newer version of the @shopify/generate-docs library that isn't yet available. Updates to doc comments may not produce the expected output until the migration is complete.

Examples that previously lived in this repo are being moved to the areas/platforms/shopify-dev zone of the monorepo and should be authored there going forward.

What should I do?

  • If your PR includes changes to .doc.ts files, doc comments, or examples, please reach out to us in #devtools-proj-templated-refs so we can help ensure your updates are captured correctly.
  • If your PR is limited to source code changes (non-docs), you can ignore this notice.

Thanks for your patience while we complete the migration! 🙏

@github-actions
Copy link
Copy Markdown
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset directory. If the changes are user-facing and should cause a version bump, run yarn changeset to track your changes and include them in the next release CHANGELOG. If you are making simple updates to repo configuration, examples, or documentation, you do not need to add a changeset.

@rennyG rennyG self-assigned this Apr 29, 2026
@rennyG rennyG added the #gsd:49303 Shopify Dev Docs: UI Extension Reference Docs: Quality & Completeness label Apr 29, 2026
@rennyG rennyG requested review from SteveSill and sordaz00 April 29, 2026 14:58
rennyG and others added 2 commits April 30, 2026 10:25
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>
…26-01

# Conflicts:
#	packages/ui-extensions/src/surfaces/checkout/api/standard/standard.ts
@rennyG rennyG merged commit 6908d54 into 2026-01 Apr 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:49303 Shopify Dev Docs: UI Extension Reference Docs: Quality & Completeness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants