Skip to content

chore(vtex): regenerate client from current upstream schemas - #524

Closed
guitavano wants to merge 1 commit into
mainfrom
guitavano/vtex-sync-client
Closed

chore(vtex): regenerate client from current upstream schemas#524
guitavano wants to merge 1 commit into
mainfrom
guitavano/vtex-sync-client

Conversation

@guitavano

@guitavano guitavano commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Regenerates the hey-api client from the current VTEX OpenAPI schemas. The committed client had drifted from upstream; regenerating surfaced 8 operations that VTEX renamed or removed. This reconciles the tool registry so no tool points at a now-undefined SDK export.

Why now

This is the prerequisite for enabling Zod metadata (param descriptions — the actual goal). Doing the metadata: true regen on top of an already-current client produces a clean, description-only diff instead of mixing in this schema drift. So: sync first (this PR), flip metadata second (follow-up PR).

Changes

Renamed operations (registry references updated, pure renames):

  • punchout: {get,post}ApiAuthenticatorPunchout**V1Punchout*
  • vtex-id: postApiAuthenticatorStorefrontUserspostApiAuthenticatorV1StorefrontUsers
  • delivery-promise-notification: {put,patch}DeliveryPromisesExternalSellers*{put,patch}ApiDeliveryPromisesExternalSellers*

Removed tools (endpoints no longer present upstream):

  • VTEX_GET_ROLES_BY_USER2 (getRolesbyUser2) — the alternate endpoint was dropped; VTEX_GET_ROLES_BY_USER (getRolesbyUser) stays.
  • VTEX_ORDER_CHANGES_POST_CHANGE (postOrderChanges) — removed from the pick-and-pack-order-changes schema.

Also pulls in new upstream modules (b2b-addresses, bulk-pricing, etc.) as generated code.

Verification

  • Build is warning-free (previously 16 "will always be undefined" warnings from the drift).
  • All 104 tests pass; no project typecheck errors.
  • metadata stays false here → bundle unchanged (~4.70 MB). The +301 KB gzip cost lands in the follow-up metadata PR.

🤖 Generated with Claude Code


Summary by cubic

Regenerated the VTEX SDK from the latest upstream OpenAPI schemas to remove drift, update renamed endpoints, and add new modules. This unblocks enabling Zod metadata next, removes old build warnings, keeps tests green, and leaves the bundle size unchanged.

  • Refactors

    • Renamed operations:
      • punchout: {get,post}ApiAuthenticatorPunchout**V1Punchout*
      • vtex-id: postApiAuthenticatorStorefrontUserspostApiAuthenticatorV1StorefrontUsers
      • delivery-promise-notification: {put,patch}DeliveryPromisesExternalSellers*{put,patch}ApiDeliveryPromisesExternalSellers*
    • Contracts restrictions now use assortmentIds (replaces collectionIds).
    • Added generated modules: b2b-addresses, bulk-pricing, delivery-promise-suggestions, external-promotions-protocol, b2b-password-migration-protocol.
  • Migration

    • Update any references to the renamed functions above.
    • Remove tools no longer in upstream: VTEX_GET_ROLES_BY_USER2, VTEX_ORDER_CHANGES_POST_CHANGE.
    • delivery-promise-notification: PUT request body is now an array of items; base URL no longer includes /api if using a custom client.
    • b2b-contracts: replace collectionIds with assortmentIds in request/response handling.

Written for commit c57c19b. Summary will update on new commits.

Review in cubic

Regenerates the hey-api client from the latest VTEX OpenAPI schemas.
Upstream renamed several operations and removed two; this reconciles the
tool registry so no tool references a now-undefined SDK export.

Renamed operations (registry references updated):
- punchout: {get,post}ApiAuthenticatorPunchout* -> *V1Punchout*
- vtex-id: postApiAuthenticatorStorefrontUsers -> *V1StorefrontUsers
- delivery-promise-notification: {put,patch}DeliveryPromisesExternalSellers*
  -> {put,patch}ApiDeliveryPromisesExternalSellers*

Removed tools (endpoints no longer in upstream schemas):
- VTEX_GET_ROLES_BY_USER2 (getRolesbyUser2) — alternate endpoint dropped;
  VTEX_GET_ROLES_BY_USER (getRolesbyUser) remains.
- VTEX_ORDER_CHANGES_POST_CHANGE (postOrderChanges) — removed from the
  pick-and-pack-order-changes schema.

Prereq for enabling zod metadata (param descriptions): doing that regen on
top of a current client yields a description-only diff. Build is warning-free;
all 104 tests pass. metadata stays false here (no bundle change).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@guitavano

Copy link
Copy Markdown
Contributor Author

Consolidado no #525 (PR único). O commit de sync do client está incluído lá.

@guitavano guitavano closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant