feat(sdks): move catalog-search and cart-checkout-order to generator 0.99.0 - #648
Merged
Merged
Conversation
Regenerate @epcc-sdk/sdks-cart-checkout-order with @hey-api/openapi-ts 0.99.0 (previously 0.61.2), still from its cart-checkout-standalone@v1 bundle. - Replace the generator config with the four-plugin one: client-fetch with an EU West baseUrl (the spec lists US East first), typescript, sdk and zod (compatibilityVersion 3). The transformers and generate-readme plugins are gone. - Turn off the read/write split in this package's generator config. With it on, 0.99 drops a property it treats as free-form from any schema that has a readOnly property, which here removes data from 39 types and links from 28. With it off, no property the old types carried is missing and request bodies keep their 0.61 shape. - Vendor the fetch client and drop @hey-api/client-fetch. Add createCartCheckoutOrderClient over @epcc-sdk/sdks-runtime, re-export the runtime helpers from the root, and publish Zod schemas on ./zod with a typesVersions map and zod as an optional peer. - Add a vitest suite beside the runtime entry: the bearer token, the replay after a 401, the EU West default, the shipping group response in /zod, and pins for the read/write switch and the bulk tax meta. - Replace the README's Authentication section by hand and add a Validation schemas section. - Add cart_checkout_service_corrections.yaml to the standalone entry only: a bulk tax item takes an optional meta.component_product_id, which the service reads to tax a bundle component and the spec's own example sends, but its schema left out. - Add a minor changeset listing every type change the old-against-new diff found: 11 date-time fields from Date to string, the two OpenAPI 3.1 widenings, six newly readonly property declarations, ten dropped inline enums with derive examples, and the bulk tax meta. Refs #647
Regenerate @epcc-sdk/sdks-catalog-search with @hey-api/openapi-ts 0.99.0 (previously 0.61.2), file for file after #642. It still generates from the catalog_search-standalone@v1 bundle. - Replace the generator config with the four-plugin one: client-fetch with an EU West baseUrl, typescript, sdk and zod (compatibilityVersion 3). The transformers and generate-readme plugins are gone. - Vendor the fetch client and drop @hey-api/client-fetch. Add createCatalogSearchClient over @epcc-sdk/sdks-runtime, re-export the runtime helpers from the root, and publish Zod schemas on ./zod with a typesVersions map and zod as an optional peer. - Add a vitest suite beside the runtime entry; tsup leaves it out of dist. - Replace the README's Authentication section by hand and add a Validation schemas section. - Add a minor changeset listing every type change found by diffing each named type old against new: ten date-time fields from Date to string, num_tokens_dropped from BigInt to number, and six dropped inline enums with derive examples. All 40 operations keep their names and types. The standalone bundle gains two preprocessors; the spec and the shopper join's catalog_search@v1 entry are unchanged: - remove-v2-server: the spec's servers end in /v2, but the service answers at <host>/pcm/... and returns 404 under /v2, so the base URL is the host. - remove-invalid-enum-defaults (new): deletes a default that is not one of its schema's enum values. JobAttributes.type declares default: index, which made the generated zod declarations fail to compile. specs/patches/README.md describes both. Refs #629 Closes #646
…cart-checkout-099
…rch-cart-checkout-099
…ame the shipping group path
… the integer the service takes The specification points both custom discount update bodies at the response shape, so amount was typed as an object the service rejects with a 400. A correction in the cart-checkout-standalone bundle points them at a request schema with an integer amount, pinned by a test.
…y in data The specification declares the bare discount object as the body of the cart item custom discount create, and the service rejects it with a 422 because it requires the data wrapper. A correction in the cart-checkout-standalone bundle adds the wrapper, pinned by a test.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
🦋 Changeset detectedLatest commit: b482e48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #646. Closes #647. Part of #629 and #626.
What this does
This repo publishes TypeScript SDKs (client libraries) generated from Elastic Path's API specs. Two of them were still built with an old version of the code generator,
@hey-api/openapi-ts0.61, and depended on a deprecated HTTP client. This PR rebuilds them with version 0.99, the same setup as the SDKs already migrated in #635, #637 and #642.@epcc-sdk/sdks-catalog-searchcreateCatalogSearchClient@epcc-sdk/sdks-cart-checkout-ordercreateCartCheckoutOrderClientEach package now has:
<package>/zod;What changes for people using these packages
Each changeset lists every type change. The main ones:
string. They were typedDate, but the value was always a string.num_tokens_droppedis nownumber(catalog-search). It was typedBigInt, but the value was always a number.Statusare removed. Each changeset shows how to derive them instead.valueand the errorstatus.readonly.Where these two packages differ from the others
/v2, but the API answers without it and returns 404 with it.dataandlinksfrom many response types. A test fails if the feature is turned back on.Spec corrections
In four places the API spec doesn't match what the API accepts, so a call written to the types would fail. Each place is corrected when the package's spec is bundled, and the spec file itself is unchanged. Each correction was checked against the service code and has a test. The two custom discount corrections were also confirmed live:
typehad a default that isn't one of its allowed values, which broke the generated Zod schemas.meta.component_product_id, which targets a bundle component.amountas an integer. The service rejected the object form the spec described.{ data }, which the service requires.The spec problems are reported to the service owners.
Known issues (not fixed here)
product_id: "", but the spec says it is an ID. Validating those order responses with/zodfails. This is a service bug, reported to the service owner./zoddrops some fields that the types keep (Cart SDK Zod schemas drop fields from account checkouts and add-to-cart responses #649):204response fails. This affects every migrated SDK and is tracked in Generated z.void() schemas reject the data the client returns for a 204 #638.How it was checked
sdks-shopper, which shares these specs, still generates identical output.