@punks/backend-entity-manager 0.0.405 → 0.0.406

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
@@ -22866,7 +22866,8 @@ exports.DataExportService = class DataExportService {
22866
22866
  async exportData(data, input) {
22867
22867
  const file = await this.extractData(data, input);
22868
22868
  const downloadUrl = await this.uploadExportFile(file, {
22869
- dataName: input.name,
22869
+ dataName: input.dataName,
22870
+ fileName: input.fileName,
22870
22871
  format: input.format,
22871
22872
  });
22872
22873
  return {
@@ -22878,15 +22879,15 @@ exports.DataExportService = class DataExportService {
22878
22879
  const content = new DataExportSerializer().serialize(data, {
22879
22880
  columns: input.columns,
22880
22881
  format: input.format,
22881
- name: input.name,
22882
+ name: input.dataName,
22882
22883
  });
22883
22884
  return {
22884
22885
  content: content.content,
22885
22886
  contentType: content.contentType,
22886
22887
  };
22887
22888
  }
22888
- async uploadExportFile(file, { dataName, format, }) {
22889
- const filePath = this.buildExportFilePath(dataName, format);
22889
+ async uploadExportFile(file, { dataName, fileName, format, }) {
22890
+ const filePath = this.buildExportFilePath(dataName, fileName, format);
22890
22891
  await this.defaultBucketProvider.fileUpload({
22891
22892
  bucket: this.defaultFileProvider.defaultBucket,
22892
22893
  filePath,
@@ -22897,8 +22898,8 @@ exports.DataExportService = class DataExportService {
22897
22898
  reference: filePath,
22898
22899
  });
22899
22900
  }
22900
- buildExportFilePath(dataName, format) {
22901
- return `/data-export/${dataName}/${backendCore.createDayPath(new Date())}/${backendCore.newUuid()}_${dataName}.${format}`;
22901
+ buildExportFilePath(dataName, fileName, format) {
22902
+ return `/data-export/${dataName}/${backendCore.createDayPath(new Date())}/${backendCore.newUuid()}_${fileName}.${format}`;
22902
22903
  }
22903
22904
  get defaultFileProvider() {
22904
22905
  return this.registry