@punks/backend-entity-manager 0.0.456 → 0.0.458

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.
@@ -19,6 +19,11 @@ export interface IEntitiesDeleteAction<TEntity, TEntitiesDeleteParameters extend
19
19
  export interface IEntityGetAction<TEntity, TEntityId, TEntityDto> {
20
20
  execute(id: TEntityId): Promise<TEntityDto | undefined>;
21
21
  }
22
+ export interface IEntityGetAction<TEntity, TEntityId, TEntityDto> {
23
+ execute(id: TEntityId, options?: {
24
+ relations?: string[];
25
+ }): Promise<TEntityDto | undefined>;
26
+ }
22
27
  export interface IEntityExistsAction<TEntity, TEntityFilters extends ISearchFilters> {
23
28
  execute(filters: TEntityFilters): Promise<boolean>;
24
29
  }
@@ -49,7 +49,7 @@ export interface IEntitiesSampleDownloadCommand<TEntity> {
49
49
  }
50
50
  export interface IEntityUpsertByParameters<TEntity, TEntityFilters extends ISearchFilters> {
51
51
  filter: TEntityFilters;
52
- data: Partial<Omit<TEntity, "id">>;
52
+ data: Partial<TEntity>;
53
53
  }
54
54
  export interface IEntityUpsertByResult {
55
55
  id: string;
@@ -19,6 +19,7 @@ export type FileReference = {
19
19
  };
20
20
  export interface IFileManager {
21
21
  uploadFile(file: FileData): Promise<FileReference>;
22
+ removeFile(fileId: string): Promise<void>;
22
23
  getFileContent(fileId: string): Promise<FileData>;
23
24
  getFileDownloadUrl(fileId: string): Promise<FileDownloadUrl>;
24
25
  }
@@ -4,6 +4,7 @@ export declare class FilesManager implements IFileManager {
4
4
  private readonly registry;
5
5
  constructor(registry: EntityManagerRegistry);
6
6
  uploadFile(file: FileData): Promise<FileReference>;
7
+ removeFile(fileId: string): Promise<void>;
7
8
  getFileContent(fileId: string): Promise<FileData>;
8
9
  getFileDownloadUrl(fileId: string): Promise<FileDownloadUrl>;
9
10
  getFileReferenceDownloadUrl({ reference, providerId, }: {
package/dist/index.d.ts CHANGED
@@ -383,7 +383,7 @@ interface IEntitiesSampleDownloadCommand<TEntity> {
383
383
  }
384
384
  interface IEntityUpsertByParameters<TEntity, TEntityFilters extends ISearchFilters> {
385
385
  filter: TEntityFilters;
386
- data: Partial<Omit<TEntity, "id">>;
386
+ data: Partial<TEntity>;
387
387
  }
388
388
  interface IEntityUpsertByResult {
389
389
  id: string;
@@ -429,6 +429,11 @@ interface IEntitiesDeleteAction<TEntity, TEntitiesDeleteParameters extends IEnti
429
429
  interface IEntityGetAction<TEntity, TEntityId, TEntityDto> {
430
430
  execute(id: TEntityId): Promise<TEntityDto | undefined>;
431
431
  }
432
+ interface IEntityGetAction<TEntity, TEntityId, TEntityDto> {
433
+ execute(id: TEntityId, options?: {
434
+ relations?: string[];
435
+ }): Promise<TEntityDto | undefined>;
436
+ }
432
437
  interface IEntityExistsAction<TEntity, TEntityFilters extends ISearchFilters> {
433
438
  execute(filters: TEntityFilters): Promise<boolean>;
434
439
  }
@@ -867,6 +872,7 @@ type FileReference = {
867
872
  };
868
873
  interface IFileManager {
869
874
  uploadFile(file: FileData): Promise<FileReference>;
875
+ removeFile(fileId: string): Promise<void>;
870
876
  getFileContent(fileId: string): Promise<FileData>;
871
877
  getFileDownloadUrl(fileId: string): Promise<FileDownloadUrl>;
872
878
  }
@@ -2388,6 +2394,7 @@ declare class FilesManager implements IFileManager {
2388
2394
  private readonly registry;
2389
2395
  constructor(registry: EntityManagerRegistry);
2390
2396
  uploadFile(file: FileData): Promise<FileReference>;
2397
+ removeFile(fileId: string): Promise<void>;
2391
2398
  getFileContent(fileId: string): Promise<FileData>;
2392
2399
  getFileDownloadUrl(fileId: string): Promise<FileDownloadUrl>;
2393
2400
  getFileReferenceDownloadUrl({ reference, providerId, }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/backend-entity-manager",
3
- "version": "0.0.456",
3
+ "version": "0.0.458",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",