Files
medusa-store/packages/modules/fulfillment/integration-tests/__fixtures__/events.ts
Adrien de Peretti 4eae25e1ef chore(): Reorganize modules (#7210)
**What**
Move all modules to the modules directory
2024-05-02 15:33:34 +00:00

25 lines
554 B
TypeScript

import { EventBusTypes } from "@medusajs/types"
export function buildExpectedEventMessageShape(options: {
eventName: string
action: string
object: string
eventGroupId?: string
data: any
options?: Record<string, unknown>
}): EventBusTypes.Message {
return {
eventName: options.eventName,
body: {
metadata: {
action: options.action,
eventGroupId: options.eventGroupId,
service: "fulfillment",
object: options.object,
},
data: options.data,
},
options: options.options,
}
}