@punks/backend-entity-manager 0.0.350 → 0.0.351

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.
@@ -3,11 +3,16 @@ import { EntitySerializationFormat, IEntitySerializer } from "../abstractions";
3
3
  import { EntityExportFile, EntitySerializerSheetDefinition, ImportEntry } from "../abstractions/serializer";
4
4
  import { EntityServiceLocator } from "../providers/services";
5
5
  import { EntityReference } from "../models";
6
+ export type EntitySerializerOptions = {
7
+ delimiter?: string;
8
+ useTypeColumn?: boolean;
9
+ };
6
10
  export declare abstract class EntitySerializer<TEntity, TEntityId, TEntitySearchParameters, TSheetItem, TContext, TPayload = unknown> implements IEntitySerializer<TEntity, TEntityId, TEntitySearchParameters, TSheetItem> {
7
11
  protected readonly services: EntityServiceLocator<TEntity, TEntityId>;
12
+ protected readonly options?: EntitySerializerOptions | undefined;
8
13
  private readonly logger;
9
14
  protected readonly entityName: string;
10
- constructor(services: EntityServiceLocator<TEntity, TEntityId>);
15
+ constructor(services: EntityServiceLocator<TEntity, TEntityId>, options?: EntitySerializerOptions | undefined);
11
16
  export(filters?: TEntitySearchParameters): Promise<TSheetItem[]>;
12
17
  import(items: TSheetItem[], payload?: TPayload): Promise<void>;
13
18
  parse(data: Buffer, format: EntitySerializationFormat): Promise<ImportEntry<TSheetItem, TEntityId>[]>;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="multer" />
2
2
  import { FooActions } from "./foo.actions";
3
- import { FooCreateDto, FooDto, FooExportRequest, FooExportResponse, FooImportRequest, FooParseRequest, FooParseResponse, FooSampleDownloadRequest, FooSampleDownloadResponse, FooSearchRequest, FooSearchResponse, FooUpdateDto, FooVersionsSearchRequest, FooVersionsSearchResponse } from "./foo.dto";
3
+ import { FooCreateDto, FooDto, FooExportRequest, FooExportResponse, FooParseResponse, FooSampleDownloadRequest, FooSampleDownloadResponse, FooSearchRequest, FooSearchResponse, FooUpdateDto, FooVersionsSearchRequest, FooVersionsSearchResponse } from "./foo.dto";
4
+ import { EntitySerializationFormat } from "../../../../../../abstractions/serializer";
4
5
  export declare class FooController {
5
6
  private readonly actions;
6
7
  constructor(actions: FooActions);
@@ -9,8 +10,8 @@ export declare class FooController {
9
10
  update(id: string, item: FooUpdateDto): Promise<FooDto>;
10
11
  delete(id: string): Promise<void>;
11
12
  search(request: FooSearchRequest): Promise<FooSearchResponse>;
12
- parse(file: Express.Multer.File, request: FooParseRequest): Promise<FooParseResponse>;
13
- import(file: Express.Multer.File, request: FooImportRequest): Promise<void>;
13
+ parse(format: EntitySerializationFormat, file: Express.Multer.File): Promise<FooParseResponse>;
14
+ import(format: EntitySerializationFormat, file: Express.Multer.File): Promise<void>;
14
15
  export(request: FooExportRequest): Promise<FooExportResponse>;
15
16
  sampleDownload(request: FooSampleDownloadRequest): Promise<FooSampleDownloadResponse>;
16
17
  versions(request: FooVersionsSearchRequest): Promise<FooVersionsSearchResponse>;
package/dist/index.d.ts CHANGED
@@ -1747,11 +1747,16 @@ declare abstract class NestEntityManager<TEntity, TEntityId, TEntityCreateData,
1747
1747
  getRepository<TRepository extends IEntityRepository<TEntity, TEntityId, unknown, unknown, unknown, unknown>>(): TRepository;
1748
1748
  }
1749
1749
 
1750
+ type EntitySerializerOptions = {
1751
+ delimiter?: string;
1752
+ useTypeColumn?: boolean;
1753
+ };
1750
1754
  declare abstract class EntitySerializer<TEntity, TEntityId, TEntitySearchParameters, TSheetItem, TContext, TPayload = unknown> implements IEntitySerializer<TEntity, TEntityId, TEntitySearchParameters, TSheetItem> {
1751
1755
  protected readonly services: EntityServiceLocator<TEntity, TEntityId>;
1756
+ protected readonly options?: EntitySerializerOptions | undefined;
1752
1757
  private readonly logger;
1753
1758
  protected readonly entityName: string;
1754
- constructor(services: EntityServiceLocator<TEntity, TEntityId>);
1759
+ constructor(services: EntityServiceLocator<TEntity, TEntityId>, options?: EntitySerializerOptions | undefined);
1755
1760
  export(filters?: TEntitySearchParameters): Promise<TSheetItem[]>;
1756
1761
  import(items: TSheetItem[], payload?: TPayload): Promise<void>;
1757
1762
  parse(data: Buffer, format: EntitySerializationFormat): Promise<ImportEntry<TSheetItem, TEntityId>[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/backend-entity-manager",
3
- "version": "0.0.350",
3
+ "version": "0.0.351",
4
4
  "description": "",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",