chore: Refactor and improve abstract module service factory (#7688)

* chore: Refactor and improve abstract module service factory

* align naming

* clean up some template args and tests

* partially migrate modules

* partially migrate modules

* migrate more modules

* migrate last modules

* fix typings

* rename interface

* rename interface

* fixes

* fixes

* rm local plain tests
This commit is contained in:
Adrien de Peretti
2024-06-13 13:12:37 +02:00
committed by GitHub
parent c57223a3a2
commit d2a5201eeb
44 changed files with 590 additions and 519 deletions

View File

@@ -1,5 +1,5 @@
import { Constructor, DAL, NotificationTypes } from "@medusajs/types"
import { ModulesSdkUtils, MedusaError } from "@medusajs/utils"
import { DAL, NotificationTypes } from "@medusajs/types"
import { MedusaError, ModulesSdkUtils } from "@medusajs/utils"
import { NotificationProvider } from "@models"
import { NotificationProviderRegistrationPrefix } from "@types"
@@ -10,7 +10,7 @@ type InjectedDependencies = {
]: NotificationTypes.INotificationProvider
}
export default class NotificationProviderService extends ModulesSdkUtils.internalModuleServiceFactory<InjectedDependencies>(
export default class NotificationProviderService extends ModulesSdkUtils.MedusaInternalService<InjectedDependencies>(
NotificationProvider
) {
protected readonly notificationProviderRepository_: DAL.RepositoryService<NotificationProvider>