@punks/backend-entity-manager 0.0.462 → 0.0.464

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 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)`);
@@ -921,7 +921,7 @@ class EntitiesExportCommand {
921
921
  this.settings = settings;
922
922
  }
923
923
  async execute(input) {
924
- const sheetItems = await this.getExportSheetItems(input.filter);
924
+ const sheetItems = await this.getExportSheetItems(input.filter, input.payload);
925
925
  const outputFile = await this.buildExportFile(sheetItems, input.options.format, input.payload);
926
926
  const downloadUrl = await this.uploadExportFile(outputFile);
927
927
  return {
@@ -954,8 +954,8 @@ class EntitiesExportCommand {
954
954
  buildAbsoluteBucketPath(relativePath) {
955
955
  return `${this.settings.exportBucket.rootFolderPath ?? ""}/exports/${createDayPath$1(new Date())}/${relativePath}`;
956
956
  }
957
- async getExportSheetItems(filters) {
958
- return await this.services.resolveSerializer().export(filters);
957
+ async getExportSheetItems(filters, payload) {
958
+ return await this.services.resolveSerializer().export(filters, payload);
959
959
  }
960
960
  get bucket() {
961
961
  return this.services.getRootServices().resolveDefaultBucketProvider();