@evergis/api 4.1.18 → 4.1.20

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/index.js CHANGED
@@ -1760,8 +1760,15 @@ class CatalogService extends Service {
1760
1760
  }
1761
1761
 
1762
1762
  class FileUpload extends CatalogService {
1763
- upload(file, rewrite) {
1764
- return this.createFile1({ file, rewrite: !!rewrite });
1763
+ upload(file, rewrite, parentId, fileName) {
1764
+ const props = { file, rewrite: !!rewrite };
1765
+ if (parentId) {
1766
+ props.parentId = parentId;
1767
+ }
1768
+ if (fileName) {
1769
+ props.fileName = fileName;
1770
+ }
1771
+ return this.createFile1(props);
1765
1772
  }
1766
1773
  replaceFile(params) {
1767
1774
  return this.createFile(params);