feat(sdks): move sdks-pxm to generator 0.99.0 - #652
Merged
Merged
Conversation
Regenerate @epcc-sdk/sdks-pxm with @hey-api/openapi-ts 0.99.0 (previously 0.61.2), still straight from the checked-in pim specification. - 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 createPxmClient 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, and the getAllProducts response in /zod, including a date-time field given a number; 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 the old-against-new diff found: 32 date-time fields from Date to string grouped by resource, 32 int64 fields from BigInt to number, _Error to Error, and six dropped inline enums with derive examples. All 82 operations keep their names and types; no property is dropped or made readonly. Refs #630
|
The latest updates on your projects. Learn more about Vercel for GitHub. 6 Skipped Deployments
|
🦋 Changeset detectedLatest commit: e4eea33 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 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 #630. Part of #626.
What this does
This repo publishes TypeScript SDKs (client libraries) generated from Elastic Path's API specs. The Product Experience Manager SDK was 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 it with version 0.99, the same setup as the SDKs already migrated in #635, #637, #642 and #648.@epcc-sdk/sdks-pxmcreatePxmClientThe package now has:
@epcc-sdk/sdks-pxm/zod;The spec file is unchanged, and no other package is touched.
What changes for people using this package
The changeset lists every type change, grouped by resource. The main ones:
string. Thirty-two fields across jobs, products, files, variations, variation options, hierarchies, nodes, tags and custom relationships were typedDate, but the value was always a string.number. Thepage[offset]andpage[limit]query parameters of the fifteen list operations were typedBigInt, but the value was always a number. The Zod schemas still parse them tobigint.CommodityType,Default,Locale,Owner,Status,Type). The changeset shows how to derive each instead._Erroris renamedError.All 82 operations keep their names and their request, response and error types. No property is dropped or made read-only.
Known issues (not fixed here)
Content-Typeheader when there is no body, so the service rejects the request. Passbody: {}to work around it. The old client behaved the same.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-shopperstill generates identical output, and its tests pass.