Skip to content

fix(vtex): add searchField companion query params to List Orders#454

Merged
guitavano merged 1 commit into
mainfrom
fix/vtex-orders-search-field-params
Jun 18, 2026
Merged

fix(vtex): add searchField companion query params to List Orders#454
guitavano merged 1 commit into
mainfrom
fix/vtex-orders-search-field-params

Conversation

@guitavano

@guitavano guitavano commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Uses schema override in download-schemas.ts to pull the Orders API schema from a fork with the fix, while waiting for vtex/openapi-schemas#1728 to be merged upstream
  • Regenerates the Orders API SDK/types/zod with the corrected schema, adding:
    • searchField as an enum (sku_Ids, listId, tid, pci_tid, paymentId, nsu) instead of free-form string
    • 6 companion query parameters required for order filtering

Test plan

  • bun test passes (77 tests, 0 failures)
  • Server loads without errors
  • Verify VTEX_LIST_ORDERS tool exposes the new parameters

Note: Remove the SCHEMA_OVERRIDES entry once vtex/openapi-schemas#1728 is merged.

🤖 Generated with Claude Code


Summary by cubic

Fixes VTEX Orders “List Orders” filtering by making searchField a strict enum and adding the required companion query params. Regenerates the SDK/types/zod using a temporary schema override until the upstream schema fix is merged.

  • Bug Fixes

    • List Orders: searchField is now an enum (sku_Ids, listId, tid, pci_tid, paymentId, nsu) with matching query params added (sku_Ids, listId, tid, pci_tid, paymentId, nsu).
    • Adds a schema override in vtex/scripts/download-schemas.ts to pull the corrected Orders schema from a fork while the upstream PR is pending.
  • Migration

    • When calling List Orders, use one of the allowed searchField values and include its matching parameter (e.g., searchField=sku_Ids&sku_Ids=11223).

Written for commit 436ade4. Summary will update on new commits.

Review in cubic

Use schema override from fork while waiting for upstream PR
vtex/openapi-schemas#1728 to be merged. Adds the 6 companion
query parameters (sku_Ids, listId, tid, pci_tid, paymentId, nsu)
that are required alongside searchField for order filtering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@guitavano guitavano merged commit 5ddc689 into main Jun 18, 2026
2 checks passed
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