-
Notifications
You must be signed in to change notification settings - Fork 224
add shopify tools type generation #6748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
257c0cc to
d77fe8b
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
16010c0 to
a421a8e
Compare
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success3586 tests passing in 1420 suites. Report generated by 🧪jest coverage report action from 27792ef |
dfd5d46 to
6d50ad7
Compare
6d50ad7 to
ead2c83
Compare

WHY are these changes introduced?
Fixes https://github.com/shop/issues-admin-extensibility/issues/2126
Currently, developers building UI extensions with tools don't have TypeScript support for the shopify.tools.register API. This means they lose type safety when registering tool handlers, making it harder to catch errors at compile time and reducing the developer experience with no autocomplete or inline documentation.
WHAT is this pull request doing?
This PR adds automatic TypeScript type generation for Shopify tools in UI extensions. When a tools field is defined in an extension point configuration pointing to a tools.json file, the CLI will:
Summary of changes
Example generated types:
Changes summary:
How to test your changes?
[ { "name": "search-products", "description": "Search for products by query", "inputSchema": { "type": "object", "properties": { "query": {"type": "string"} }, "required": ["query"] }, "outputSchema": { "type": "object", "properties": { "products": {"type": "array", "items": {"type": "string"}} } } } ]Measuring impact
How do we know this change was effective? Please choose one:
Checklist