Demo: a static copy of one review, without the review service. Reviewed marks apply in this tab until it reloads, and view settings stay in this browser. Comments, decisions, and publication need an installed mcp-review. About mcp-review · Get early access

Move the storefront API to typed handlers

Coverage

Presentation
All 1051 selected changes are placed. 1050 in groups · 0 unbucketed · 1 generated · 0 without a text diff
Explanations
8 of 8 groups have an explanation.
Agent analysis
Reading the analysis status…
Human review
0 of 1051 hunks are marked reviewed.

Catalog handlers

The handlers of products, categories, brands, prices, stock levels, reviews, collections and media move to the typed form.

Each file keeps its toResponse shape, so the JSON of every answer stays the same. The behaviour changes in three ways:

  • A create with an existing key, such as a product SKU or a category slug, answers 409 instead of a database error.
  • Delete needs an admin. Before, any signed-in user could delete.
  • List and search take their limits from the schema, so a limit over 100 is a 422 instead of being cut silently.

src/catalog/categoryMappings.ts keys every category by the external ID of the new catalog import instead of its legacy code. Each entry changes only that field.

src/catalog/categoryMappings.ts
+240 -240

The changes load when the file comes near.

src/handlers/attributes/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/attributes/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/attributes/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/attributes/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/attributes/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/attributes/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/attributes/update.ts
+17 -25

The changes load when the file comes near.

src/handlers/brands/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/brands/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/brands/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/brands/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/brands/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/brands/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/brands/update.ts
+17 -25

The changes load when the file comes near.

src/handlers/bundles/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/bundles/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/bundles/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/bundles/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/bundles/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/bundles/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/bundles/update.ts
+17 -25

The changes load when the file comes near.

src/handlers/categories/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/categories/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/categories/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/categories/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/categories/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/categories/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/categories/update.ts
+17 -26

The changes load when the file comes near.

src/handlers/collections/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/collections/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/collections/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/collections/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/collections/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/collections/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/collections/update.ts
+17 -25

The changes load when the file comes near.

src/handlers/inventory/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/inventory/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/inventory/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/inventory/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/inventory/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/inventory/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/inventory/update.ts
+17 -26

The changes load when the file comes near.

src/handlers/media/create.ts
+15 -29

The changes load when the file comes near.

src/handlers/media/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/media/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/media/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/media/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/media/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/media/update.ts
+17 -26

The changes load when the file comes near.

src/handlers/prices/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/prices/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/prices/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/prices/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/prices/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/prices/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/prices/update.ts
+17 -26

The changes load when the file comes near.

src/handlers/products/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/products/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/products/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/products/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/products/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/products/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/products/update.ts
+17 -26

The changes load when the file comes near.

src/handlers/reviews/create.ts
+15 -29

The changes load when the file comes near.

src/handlers/reviews/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/reviews/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/reviews/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/reviews/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/reviews/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/reviews/update.ts
+17 -26

The changes load when the file comes near.

src/handlers/variants/create.ts
+18 -29

The changes load when the file comes near.

src/handlers/variants/delete.ts
+16 -18

The changes load when the file comes near.

src/handlers/variants/export.ts
+20 -16

The changes load when the file comes near.

src/handlers/variants/get.ts
+15 -17

The changes load when the file comes near.

src/handlers/variants/list.ts
+16 -14

The changes load when the file comes near.

src/handlers/variants/search.ts
+13 -18

The changes load when the file comes near.

src/handlers/variants/update.ts
+17 -25

The changes load when the file comes near.

+14,668 -11,128 left