Files
medusa-store/docs/content/references/services/classes/NotificationService.md
Shahed Nasser e134f6d237 chore: fixed commit branch on generate reference action (#1857)
* fixed commit branch

* fixes after yarn upgrade
2022-07-15 18:08:07 +03:00

5.3 KiB

Class: NotificationService

Hierarchy

  • "medusa-interfaces"

    NotificationService

Constructors

constructor

new NotificationService(container)

Parameters

Name Type
container any

Overrides

BaseService.constructor

Defined in

services/notification.js:9

Properties

attachmentGenerator_

attachmentGenerator_: any

Defined in

services/notification.js:30


container_

container_: any

Defined in

services/notification.js:19


logger_

logger_: any

Defined in

services/notification.js:23


notificationProviderRepository_

notificationProviderRepository_: any

Defined in

services/notification.js:27


subscribers_

subscribers_: Object

Defined in

services/notification.js:29

Methods

handleEvent

handleEvent(eventName, data): Promise<any>

Parameters

Name Type Description
eventName string
data any

Returns

Promise<any>

Defined in

services/notification.js:166


list

list(selector, config?): Notification[]

Parameters

Name Type Description
selector any
config any

Returns

Notification[]

Defined in

services/notification.js:84


registerAttachmentGenerator

registerAttachmentGenerator(service): void

Parameters

Name Type Description
service any

Returns

void

Defined in

services/notification.js:38


registerInstalledProviders

registerInstalledProviders(providers): Promise<void>

Parameters

Name Type Description
providers string[]

Returns

Promise<void>

Defined in

services/notification.js:68


resend

resend(id, config?): Notification

Parameters

Name Type Description
id string
config any

Returns

Notification

Defined in

services/notification.js:237


retrieve

retrieve(id, config?): Notification

Parameters

Name Type Description
id string
config any

Returns

Notification

Defined in

services/notification.js:101


retrieveProvider_

retrieveProvider_(id): NotificationProvider

Parameters

Name Type Description
id string

Returns

NotificationProvider

Defined in

services/notification.js:147


send

send(event, eventData, providerId): Notification

Parameters

Name Type Description
event string
eventData any
providerId string

Returns

Notification

Defined in

services/notification.js:195


subscribe

subscribe(eventName, providerId): void

Parameters

Name Type Description
eventName string
providerId string

Returns

void

Defined in

services/notification.js:126


withTransaction

withTransaction(transactionManager): NotificationService

Parameters

Name Type Description
transactionManager EntityManager

Returns

NotificationService

Defined in

services/notification.js:47