feat(modules-sdk): Remote Query (#4463)

* feat: Remote Query
This commit is contained in:
Carlos R. L. Rodrigues
2023-07-19 15:35:36 -03:00
committed by GitHub
parent 95c538c675
commit 5a8a889c6d
57 changed files with 1286 additions and 423 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
export { default as ProductModuleService } from "./product-module-service"
export { default as ProductService } from "./product"
export { default as ProductCategoryService } from "./product-category"
export { default as ProductCollectionService } from "./product-collection"
export { default as ProductModuleService } from "./product-module-service"
export { default as ProductTagService } from "./product-tag"
export { default as ProductVariantService } from "./product-variant"
export { default as ProductCollectionService } from "./product-collection"
export { default as ProductCategoryService } from "./product-category"
export { default as ProductTypeService } from "./product-type"
export { default as ProductOptionService } from "./product-option"
export { default as ProductImageService } from "./product-image"
@@ -1,7 +1,8 @@
import { ProductCollection } from "@models"
import { Context, DAL, FindConfig, ProductTypes } from "@medusajs/types"
import { ModulesSdkUtils, retrieveEntity } from "@medusajs/utils"
import { ProductCollection } from "@models"
type InjectedDependencies = {
productCollectionRepository: DAL.RepositoryService
}
@@ -23,6 +23,7 @@ import {
DAL,
FindConfig,
InternalModuleDeclaration,
JoinerServiceConfig,
ProductTypes,
} from "@medusajs/types"
import ProductImageService from "./product-image"
@@ -34,6 +35,7 @@ import {
MedusaContext,
} from "@medusajs/utils"
import { shouldForceTransaction } from "../utils"
import { joinerConfig } from "./../joiner-config"
type InjectedDependencies = {
baseRepository: DAL.RepositoryService
@@ -96,6 +98,10 @@ export default class ProductModuleService<
this.productOptionService_ = productOptionService
}
__joinerConfig(): JoinerServiceConfig {
return joinerConfig
}
async list(
filters: ProductTypes.FilterableProductProps = {},
config: FindConfig<ProductTypes.ProductDTO> = {},