fix(oas,js,react): use AdminExtendedStoresRes instead of AdminStoresRes (#3478)

## What

Declare and use AdminExtendedStoresRes for `[get] /admin/store` endpoint.

## Why

Only `[get] /admin/store` returns `ExtendedStoreDTO`. Other `/admin/store` endpoints return `Store`.

## How

* Create new AdminExtendedStoresRes OAS schema
* Update medusa-js
* Update medusa-react
This commit is contained in:
Patrick
2023-03-15 11:17:34 +00:00
committed by GitHub
parent 10bf05c147
commit 6748877c69
5 changed files with 34 additions and 9 deletions
@@ -1,8 +1,9 @@
import {
AdminExtendedStoresRes,
AdminPaymentProvidersList,
AdminTaxProvidersList,
AdminPostStoreReq,
AdminStoresRes,
AdminTaxProvidersList,
} from "@medusajs/medusa"
import { ResponsePromise } from "../../typings"
import BaseResource from "../base"
@@ -56,7 +57,7 @@ class AdminStoresResource extends BaseResource {
*/
retrieve(
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminStoresRes> {
): ResponsePromise<AdminExtendedStoresRes> {
const path = `/admin/store/`
return this.client.request("GET", path, undefined, {}, customHeaders)
}