fix(orchestration,link-modules,pricing,types): fix shippingprofile errror outside of core + change link alias name (#5025)

* fix(orchestration,link-modules,pricing,types): fix shippingprofile error outside of core + change link alias name

* chore: scope relationships and move condition inside

* chore: remove islist

* chore: fix merge conflict

* chore: reverted serviceName scoping

* chore: change shape to make methodOverride compatible

* chore: added methodOverride to remote query

* chore: revert override
This commit is contained in:
Riqwan Thamir
2023-09-13 12:16:00 +02:00
committed by GitHub
parent 7231f65833
commit 3d68be2b6b
10 changed files with 49 additions and 21 deletions
+5
View File
@@ -3,6 +3,11 @@ export type JoinerRelationship = {
foreignKey: string
primaryKey: string
serviceName: string
/**
* If true, the relationship is an internal service from the medusa core
* TODO: Remove when there are no more "internal" services
*/
isInternalService?: boolean
/**
* In an inverted relationship the foreign key is on the other service and the primary key is on the current service
*/
@@ -2,8 +2,15 @@ import { BaseFilterable } from "../../dal"
import { FilterableMoneyAmountProps, MoneyAmountDTO } from "./money-amount"
export interface PricingContext {
currency_code?: string
context?: {
currency_code?: string
}
}
export interface PricingFilters {
id: string[]
}
export interface PriceSetDTO {
id: string
money_amounts?: MoneyAmountDTO[]
+3 -2
View File
@@ -13,6 +13,7 @@ import {
MoneyAmountDTO,
PriceSetDTO,
PricingContext,
PricingFilters,
UpdateCurrencyDTO,
UpdateMoneyAmountDTO,
UpdatePriceSetDTO,
@@ -22,8 +23,8 @@ export interface IPricingModuleService {
__joinerConfig(): ModuleJoinerConfig
calculatePrices(
priceSetIds: string[],
pricingContext: PricingContext,
filters: PricingFilters,
context?: PricingContext,
sharedContext?: Context
): Promise<CalculatedPriceSetDTO>