feat: event aggregator (#6218)

What:
- Event Aggregator Util
- Preparation for normalizing event in a new format (backward compatible with the current format)
- GQL Schema to joiner config and some Entities configured
- Link modules emmiting events
This commit is contained in:
Carlos R. L. Rodrigues
2024-02-05 11:59:10 +00:00
committed by GitHub
parent 73fd92a1af
commit 884428a1b5
66 changed files with 1407 additions and 749 deletions
+11 -25
View File
@@ -8,6 +8,7 @@ import {
PriceSet,
PriceSetMoneyAmount,
} from "@models"
import schema from "./schema"
export const LinkableKeys = {
money_amount_id: MoneyAmount.name,
@@ -32,45 +33,30 @@ export const joinerConfig: ModuleJoinerConfig = {
serviceName: Modules.PRICING,
primaryKeys: ["id"],
linkableKeys: LinkableKeys,
schema,
alias: [
{
name: "price_set",
name: ["price_set", "price_sets"],
args: {
entity: "PriceSet",
},
},
{
name: "price_sets",
},
{
name: "money_amount",
name: ["money_amount", "money_amounts"],
args: {
methodSuffix: "MoneyAmounts",
entity: "MoneyAmount",
},
},
{
name: "money_amounts",
args: {
methodSuffix: "MoneyAmounts",
},
},
{
name: "currency",
name: ["currency", "currencies"],
args: {
methodSuffix: "Currencies",
entity: "Currency",
},
},
{
name: "currencies",
args: {
methodSuffix: "Currencies",
},
},
{
name: "price_list",
args: {
methodSuffix: "PriceLists",
},
},
{
name: "price_lists",
name: ["price_list", "price_lists"],
args: {
methodSuffix: "PriceLists",
},
+17
View File
@@ -0,0 +1,17 @@
export const schema = `
type PriceSet {
id: String!
money_amounts: [MoneyAmount]
}
type MoneyAmount {
id: String!
currency_code: String
currency: Currency
amount: Float
min_quantity: Float
max_quantity: Float
}
`
export default schema