feat(dashboard, core-flows): associate shipping option to type (#13226)

* feat(dashboard, core-flows): allow associating shipping option type to a shipping option

* edit as well

* fix translation schema

* fix some tests

* changeset

* add new test to update shipping option type

* add new test to create shipping option with shipping option type

* pr comments

* pr comments

* rename variable

* make zod great again
This commit is contained in:
William Bouchard
2025-08-19 11:02:36 -04:00
committed by GitHub
parent b1ee204369
commit 67d3660abf
18 changed files with 525 additions and 42 deletions

View File

@@ -1,11 +1,12 @@
import { z } from "zod"
import { NextFunction } from "express"
import { MedusaRequest, MedusaResponse } from "../types"
import { zodValidator } from "../../zod/zod-helpers"
import { zodValidator } from "../../zod"
export function validateAndTransformBody(
zodSchema:
| z.ZodObject<any, any>
| z.ZodEffects<any, any>
| ((
customSchema?: z.ZodOptional<z.ZodNullable<z.ZodObject<any, any>>>
) => z.ZodObject<any, any> | z.ZodEffects<any, any>)