kui-crm 0.0.314 → 0.0.316

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/cjs/index.js CHANGED
@@ -692,7 +692,8 @@ var getBodyForFileRequest = function (file, res) {
692
692
  return res
693
693
  ? {
694
694
  temp_file_id: res.id,
695
- name: ((_b = (_a = file === null || file === void 0 ? void 0 : file.file) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.replace(/\.[^/.]+$/, "")) || "file_".concat(res.id),
695
+ name: ((_b = (_a = file === null || file === void 0 ? void 0 : file.file) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.replace(/\.[^/.]+$/, "")) ||
696
+ "file_".concat(res.id),
696
697
  visibility: matchesAPIVisibilityVariants[file.visibility],
697
698
  }
698
699
  : null;
@@ -716,6 +717,19 @@ var getPatchFileParams = function (file) {
716
717
  }
717
718
  return null;
718
719
  };
720
+ var getUpdatedFileParams = function (loader, document) { return __awaiter(void 0, void 0, void 0, function () {
721
+ var file, newFile;
722
+ return __generator(this, function (_a) {
723
+ switch (_a.label) {
724
+ case 0:
725
+ file = getPatchFileParams(document);
726
+ return [4 /*yield*/, uploadNewFile(loader, document)];
727
+ case 1:
728
+ newFile = _a.sent();
729
+ return [2 /*return*/, newFile || file];
730
+ }
731
+ });
732
+ }); };
719
733
  var getBodyForCleanFileRequest = function (file, res) {
720
734
  return res ? { temp_file_id: res.id, name: file.name } : null;
721
735
  };
@@ -4988,6 +5002,7 @@ exports.getMeterValuesFieldsSchema = getMeterValuesFieldsSchema;
4988
5002
  exports.getNumbersValues = getNumbersValues;
4989
5003
  exports.getPartialMeterInfoFields = getPartialMeterInfoFields;
4990
5004
  exports.getPatchFileParams = getPatchFileParams;
5005
+ exports.getUpdatedFileParams = getUpdatedFileParams;
4991
5006
  exports.matchesAPICompanyTypes = matchesAPICompanyTypes;
4992
5007
  exports.matchesAPIFillingTypes = matchesAPIFillingTypes;
4993
5008
  exports.matchesAPISubjectRoles = matchesAPISubjectRoles;