feat(medusa, medusa-js, medusa-react): Add store queries to react medusa (#3436)
What: - Adds queries to medusa react for core - Fix naming issues in types RESOLVES CORE-1131
This commit is contained in:
1 parent
966aea65c2
commit
9ba09ba4d7
7 files changed
+74
-13
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import {
|
||||
StoreGetProductCategoriesCategoryRes,
|
||||
StoreProductCategoriesListRes,
|
||||
StoreGetProductCategoriesParams,
|
||||
StoreGetProductCategoryParams,
|
||||
StoreGetProductCategoriesRes,
|
||||
StoreGetProductCategoriesCategoryParams,
|
||||
StoreGetProductCategoriesCategoryRes,
|
||||
} from "@medusajs/medusa"
|
||||
import qs from "qs"
|
||||
import { ResponsePromise } from "../typings"
|
||||
@@ -18,7 +18,7 @@ class ProductCategoriesResource extends BaseResource {
|
||||
*/
|
||||
retrieve(
|
||||
id: string,
|
||||
query?: StoreGetProductCategoryParams,
|
||||
query?: StoreGetProductCategoriesCategoryParams,
|
||||
customHeaders: Record<string, any> = {}
|
||||
): ResponsePromise<StoreGetProductCategoriesCategoryRes> {
|
||||
let path = `/store/product-categories/${id}`
|
||||
@@ -35,12 +35,12 @@ class ProductCategoriesResource extends BaseResource {
|
||||
* @description Retrieves a list of product categories
|
||||
* @param {string} query is optional. Can contain a limit and offset for the returned list
|
||||
* @param customHeaders
|
||||
* @return {ResponsePromise<StoreProductCategoriesListRes>}
|
||||
* @return {ResponsePromise<StoreGetProductCategoriesRes>}
|
||||
*/
|
||||
list(
|
||||
query?: StoreGetProductCategoriesParams,
|
||||
customHeaders: Record<string, any> = {}
|
||||
): ResponsePromise<StoreProductCategoriesListRes> {
|
||||
): ResponsePromise<StoreGetProductCategoriesRes> {
|
||||
let path = `/store/product-categories`
|
||||
|
||||
if (query) {
|
||||
|
||||
Reference in new issue
Block a user