|
1
|
import { |
|
2
|
EventBusTypes, |
|
3
|
IEventBusModuleService, |
|
4
|
Message, |
|
5
|
Subscriber, |
|
6
|
} from "@medusajs/framework/types" |
|
7
|
|
|
8
|
export default class EventBusService implements IEventBusModuleService { |
|
9
|
async emit<T>( |
|
10
|
data: Message<T> | Message<T>[], |
|
11
|
options: Record<string, unknown> |
|
12
|
): Promise<void> {} |
|
13
|
|
|
14
|
subscribe(event: string | symbol, subscriber: Subscriber): this { |
|
15
|
return this |
|
16
|
} |
|
17
|
|
|
18
|
unsubscribe( |
|
19
|
event: string | symbol, |
|
20
|
subscriber: Subscriber, |
|
21
|
context?: EventBusTypes.SubscriberContext |
|
22
|
): this { |
|
23
|
return this |
|
24
|
} |
|
25
|
|
|
26
|
releaseGroupedEvents(eventGroupId: string): Promise<void> { |
|
27
|
return Promise.resolve() |
|
28
|
} |
|
29
|
|
|
30
|
clearGroupedEvents(eventGroupId: string): Promise<void> { |
|
31
|
return Promise.resolve() |
|
32
|
} |
|
33
|
} |