feat(dashboard, js-sdk): shipping option type mngmt dashboard (#13208)

* chore(types, api): support shipping option type api endpoints

* core flows

* api

* typos

* compiler errors

* integration tests

* remove metadata

* changeset

* modify test

* upsert

* change remote query

* minor to patch

* description optional

* chore(dashboard, js-sdk): shipping option type management on admin dashboard

* description optional

* woops my bad

* my bad again

* create and edit

* prettier

* build code from label

* remove metadata route

* remove some translation text that is not used

* remove unsued files

* changeset

* adapt test

* fix test

* suggestion

---------

Co-authored-by: william bouchard <williambouchard@williams-MacBook-Pro.local>
This commit is contained in:
William Bouchard
2025-08-14 15:21:33 -04:00
committed by GitHub
parent 257e71f988
commit 4b3c43fe92
36 changed files with 1344 additions and 5 deletions

View File

@@ -66,6 +66,23 @@ medusaIntegrationTestRunner({
})
it("returns a list of shipping option types matching free text search param", async () => {
const res = await api.get("/admin/shipping-option-types?q=st1", adminHeaders)
expect(res.status).toEqual(200)
expect(res.data.shipping_option_types).toEqual([
{
id: expect.stringMatching(/sotype_.{24}/),
label: "Test1",
code: "test1",
description: "Test1 description",
created_at: expect.any(String),
updated_at: expect.any(String),
},
])
})
it("returns a list of shipping option types matching code search param", async () => {
const res = await api.get("/admin/shipping-option-types?code=test1", adminHeaders)
expect(res.status).toEqual(200)