fix(medusa): use pre-defined type in subscriber args (#7328)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { MedusaContainer } from "@medusajs/types"
|
import { MedusaContainer, MessageBody } from "@medusajs/types"
|
||||||
|
|
||||||
interface SubscriberContext extends Record<string, unknown> {
|
interface SubscriberContext extends Record<string, unknown> {
|
||||||
subscriberId?: string
|
subscriberId?: string
|
||||||
@@ -10,17 +10,7 @@ export type SubscriberConfig = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type SubscriberArgs<T = unknown> = {
|
export type SubscriberArgs<T = unknown> = {
|
||||||
data:
|
data: T | MessageBody<T>
|
||||||
| T
|
|
||||||
| {
|
|
||||||
metadata: {
|
|
||||||
service: string
|
|
||||||
action: string
|
|
||||||
object: string
|
|
||||||
eventGroupId?: string
|
|
||||||
}
|
|
||||||
data: T
|
|
||||||
}
|
|
||||||
eventName: string
|
eventName: string
|
||||||
container: MedusaContainer
|
container: MedusaContainer
|
||||||
pluginOptions: Record<string, unknown>
|
pluginOptions: Record<string, unknown>
|
||||||
|
|||||||
Reference in New Issue
Block a user