feat(product): Move mikro orm utils to the utils package (#4631)

Move utils to the utils package as much as possible

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
Adrien de PerettiandShahed Nasser authored and GitHub committed 2023-07-31 11:30:43 +00:00
1 parent 648eb106d6
commit 4073b73130
39 files changed
+523 -375

No files matched your search

+3 -6
View File
@@ -35,13 +35,9 @@ export interface RepositoryService<T = any> extends BaseRepositoryService<T> {
context?: Context
): Promise<[T[], number]>
// Only required for some repositories
upsert?(data: any, context?: Context): Promise<T[]>
create(data: unknown[], context?: Context): Promise<T[]>
// TODO: remove optionality when all the other repositories have an update
update?(data: unknown[], context?: Context): Promise<T[]>
update(data: unknown[], context?: Context): Promise<T[]>
delete(ids: string[], context?: Context): Promise<void>
@@ -50,7 +46,8 @@ export interface RepositoryService<T = any> extends BaseRepositoryService<T> {
restore(ids: string[], context?: Context): Promise<T[]>
}
export interface TreeRepositoryService<T = any> extends BaseRepositoryService<T> {
export interface TreeRepositoryService<T = any>
extends BaseRepositoryService<T> {
find(
options?: FindOptions<T>,
transformOptions?: RepositoryTransformOptions,