chore: Abstract module services (#6087)

**What**
Create a service abstraction for the modules internal service layer. The objective is to reduce the effort of building new modules when the logic is the same or otherwise allow to override the default behavior.

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Adrien de PerettiandOli Juhl authored and GitHub committed 2024-01-18 09:20:08 +00:00
1 parent 80feb972cb
commit 130c641e5c
46 files changed
+857 -2836

No files matched your search

+4 -2
View File
@@ -58,6 +58,8 @@ export interface RepositoryService<T = any> extends BaseRepositoryService<T> {
ids: string[],
context?: Context
): Promise<[T[], Record<string, unknown[]>]>
upsert?(data: unknown[], context?: Context): Promise<T[]>
}
export interface TreeRepositoryService<T = any>
@@ -81,7 +83,7 @@ export interface TreeRepositoryService<T = any>
/**
* @interface
*
*
* An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
*/
export type SoftDeleteReturn<TReturnableLinkableKeys = string> = {
@@ -93,7 +95,7 @@ export type SoftDeleteReturn<TReturnableLinkableKeys = string> = {
/**
* @interface
*
*
* An object that is used to specify an entity's related entities that should be restored when the main entity is restored.
*/
export type RestoreReturn<TReturnableLinkableKeys = string> = {