@tstdl/base 0.93.121 → 0.93.122
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -3,6 +3,7 @@ import { afterResolve } from '../../../injector/index.js';
|
|
|
3
3
|
import { Module } from '../../../module/module.js';
|
|
4
4
|
export declare class NotificationDeliveryWorkerModule extends Module {
|
|
5
5
|
#private;
|
|
6
|
+
constructor();
|
|
6
7
|
[afterResolve](): void;
|
|
7
8
|
_run(cancellationSignal: CancellationSignal): Promise<void>;
|
|
8
9
|
}
|
|
@@ -4,23 +4,34 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
7
10
|
import { CancellationSignal } from '../../../cancellation/token.js';
|
|
8
11
|
import { afterResolve, inject, Singleton } from '../../../injector/index.js';
|
|
9
12
|
import { Module } from '../../../module/module.js';
|
|
10
13
|
import { NotificationChannel } from '../../../notification/models/index.js';
|
|
11
|
-
import { InAppChannelProvider } from '../providers/index.js';
|
|
14
|
+
import { EmailChannelProvider, InAppChannelProvider, WebPushChannelProvider } from '../providers/index.js';
|
|
12
15
|
import { NotificationDeliveryWorker } from '../services/index.js';
|
|
13
16
|
let NotificationDeliveryWorkerModule = class NotificationDeliveryWorkerModule extends Module {
|
|
14
17
|
#notificationDeliveryWorker = inject(NotificationDeliveryWorker);
|
|
15
18
|
#inAppChannelProvider = inject(InAppChannelProvider);
|
|
19
|
+
#emailChannelProvider = inject(EmailChannelProvider);
|
|
20
|
+
#webPushChannelProvider = inject(WebPushChannelProvider);
|
|
21
|
+
constructor() {
|
|
22
|
+
super('NotificationDeliveryWorker');
|
|
23
|
+
}
|
|
16
24
|
[afterResolve]() {
|
|
17
25
|
this.#notificationDeliveryWorker.registerProvider(NotificationChannel.InApp, this.#inAppChannelProvider);
|
|
26
|
+
this.#notificationDeliveryWorker.registerProvider(NotificationChannel.Email, this.#emailChannelProvider);
|
|
27
|
+
this.#notificationDeliveryWorker.registerProvider(NotificationChannel.WebPush, this.#webPushChannelProvider);
|
|
18
28
|
}
|
|
19
29
|
async _run(cancellationSignal) {
|
|
20
30
|
await this.#notificationDeliveryWorker.run(cancellationSignal);
|
|
21
31
|
}
|
|
22
32
|
};
|
|
23
33
|
NotificationDeliveryWorkerModule = __decorate([
|
|
24
|
-
Singleton()
|
|
34
|
+
Singleton(),
|
|
35
|
+
__metadata("design:paramtypes", [])
|
|
25
36
|
], NotificationDeliveryWorkerModule);
|
|
26
37
|
export { NotificationDeliveryWorkerModule };
|