@punks/backend-entity-manager 0.0.457 → 0.0.459

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;
@@ -5,6 +5,8 @@ export type FileData = {
5
5
  contentType: string;
6
6
  fileName: string;
7
7
  folderPath: string;
8
+ storageFilePath?: string;
9
+ storageBucket?: string;
8
10
  metadata?: Record<string, any>;
9
11
  };
10
12
  export type FileDownloadUrl = {
@@ -50,12 +52,15 @@ export interface IFilesReferenceRepository {
50
52
  }
51
53
  export type FileProviderReference = {
52
54
  reference: string;
55
+ bucket?: string;
53
56
  };
54
57
  export type FileProviderUploadData = {
55
58
  fileId?: string;
56
59
  fileName: string;
60
+ filePath?: string;
57
61
  content: Buffer;
58
62
  contentType: string;
63
+ bucket?: string;
59
64
  };
60
65
  export type FileProviderDownloadData = {
61
66
  content: Buffer;
@@ -9,5 +9,6 @@ export declare class AwsS3FileProvider implements IFileProvider {
9
9
  downloadFile(reference: FileProviderReference): Promise<FileProviderDownloadData>;
10
10
  getFileProviderDownloadUrl(reference: FileProviderReference): Promise<FileProviderDownloadUrl>;
11
11
  private getBucketFileUploadPath;
12
+ private getBucketFileUploadDayPath;
12
13
  get defaultBucket(): string;
13
14
  }
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
  }
@@ -853,6 +858,8 @@ type FileData = {
853
858
  contentType: string;
854
859
  fileName: string;
855
860
  folderPath: string;
861
+ storageFilePath?: string;
862
+ storageBucket?: string;
856
863
  metadata?: Record<string, any>;
857
864
  };
858
865
  type FileDownloadUrl = {
@@ -898,12 +905,15 @@ interface IFilesReferenceRepository {
898
905
  }
899
906
  type FileProviderReference = {
900
907
  reference: string;
908
+ bucket?: string;
901
909
  };
902
910
  type FileProviderUploadData = {
903
911
  fileId?: string;
904
912
  fileName: string;
913
+ filePath?: string;
905
914
  content: Buffer;
906
915
  contentType: string;
916
+ bucket?: string;
907
917
  };
908
918
  type FileProviderDownloadData = {
909
919
  content: Buffer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/backend-entity-manager",
3
- "version": "0.0.457",
3
+ "version": "0.0.459",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",