@punks/backend-entity-manager 0.0.461 → 0.0.463
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.
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/abstractions/serializer.d.ts +1 -1
- package/dist/cjs/types/actions/get.d.ts +2 -2
- package/dist/cjs/types/actions/search.d.ts +2 -2
- package/dist/cjs/types/base/serializer.d.ts +2 -2
- package/dist/esm/index.js +6 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/abstractions/serializer.d.ts +1 -1
- package/dist/esm/types/actions/get.d.ts +2 -2
- package/dist/esm/types/actions/search.d.ts +2 -2
- package/dist/esm/types/base/serializer.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -250,9 +250,9 @@ class EntitySerializer {
|
|
|
250
250
|
this.entityName = services.getEntityName();
|
|
251
251
|
this.logger = backendCore.Log.getLogger(`${services.getEntityName()} -> Serializer`);
|
|
252
252
|
}
|
|
253
|
-
async export(filters) {
|
|
253
|
+
async export(filters, payload) {
|
|
254
254
|
const entities = await this.loadEntities(filters ?? {});
|
|
255
|
-
return await this.convertToSheetItems(entities);
|
|
255
|
+
return await this.convertToSheetItems(entities, payload);
|
|
256
256
|
}
|
|
257
257
|
async import(items, payload) {
|
|
258
258
|
this.logger.info(`Entities import -> started (${items.length} items)`);
|
|
@@ -607,8 +607,8 @@ class EntityGetAction {
|
|
|
607
607
|
constructor(services) {
|
|
608
608
|
this.services = services;
|
|
609
609
|
}
|
|
610
|
-
async execute(id) {
|
|
611
|
-
const entity = await this.services.resolveGetQuery().execute(id);
|
|
610
|
+
async execute(id, options) {
|
|
611
|
+
const entity = await this.services.resolveGetQuery().execute(id, options);
|
|
612
612
|
const converter = this.services.resolveConverter();
|
|
613
613
|
return entity
|
|
614
614
|
? (await converter?.toEntityDto(entity)) ?? entity
|
|
@@ -661,9 +661,9 @@ class EntitiesSearchAction {
|
|
|
661
661
|
constructor(services) {
|
|
662
662
|
this.services = services;
|
|
663
663
|
}
|
|
664
|
-
async execute(request) {
|
|
664
|
+
async execute(request, options) {
|
|
665
665
|
const searchQuery = this.services.resolveSearchQuery();
|
|
666
|
-
const results = await searchQuery.execute(request);
|
|
666
|
+
const results = await searchQuery.execute(request, options);
|
|
667
667
|
const converter = this.services.resolveConverter();
|
|
668
668
|
return {
|
|
669
669
|
items: await backendCore.mapAsync(results.items, async (x) => ((await converter?.toListItemDto(x)) ?? x)),
|