@punks/backend-entity-manager 0.0.449 → 0.0.451

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
@@ -406,8 +406,8 @@ class EntitySerializer {
406
406
  throw new Error("Json sample not implemented");
407
407
  }
408
408
  }
409
- async serialize(data, format) {
410
- return await this.buildExportFile(data, format);
409
+ async serialize(data, format, payload) {
410
+ return await this.buildExportFile(data, format, payload);
411
411
  }
412
412
  validateSheetItem(item, allItems, context) { }
413
413
  async getContext() {
@@ -415,13 +415,13 @@ class EntitySerializer {
415
415
  .resolveAuthenticationContextProvider()
416
416
  ?.getContext());
417
417
  }
418
- async buildExportFile(data, format) {
418
+ async buildExportFile(data, format, payload) {
419
419
  const fileName = this.buildExportFileName({
420
420
  format,
421
421
  refDate: new Date(),
422
422
  });
423
423
  const context = await this.getContext();
424
- const definition = await this.getDefinition(context);
424
+ const definition = await this.getDefinition(context, payload);
425
425
  switch (format) {
426
426
  case exports.EntitySerializationFormat.Csv:
427
427
  return {
@@ -921,8 +921,10 @@ class EntitiesExportCommand {
921
921
  },
922
922
  };
923
923
  }
924
- async buildExportFile(data, format) {
925
- return await this.services.resolveSerializer().serialize(data, format);
924
+ async buildExportFile(data, format, payload) {
925
+ return await this.services
926
+ .resolveSerializer()
927
+ .serialize(data, format, payload);
926
928
  }
927
929
  async uploadExportFile(file) {
928
930
  await this.bucket.fileUpload({