bruce-models 1.8.2 → 1.8.3

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.
@@ -4852,7 +4852,7 @@ var ClientFile;
4852
4852
  ClientFile.Delete = Delete;
4853
4853
  function Upload(params) {
4854
4854
  return __awaiter(this, void 0, void 0, function* () {
4855
- const { api, file, purpose, req, onProgress } = params;
4855
+ let { api, file, purpose, req, onProgress } = params;
4856
4856
  if (!file) {
4857
4857
  throw ("File is required.");
4858
4858
  }
@@ -4860,6 +4860,7 @@ var ClientFile;
4860
4860
  if (!size) {
4861
4861
  throw ("You cannot upload a 0byte sized file.");
4862
4862
  }
4863
+ req = Api.PrepReqParams(req);
4863
4864
  let clientFile;
4864
4865
  if (size > Uploader.MIN_LARGE_FILE_SIZE) {
4865
4866
  clientFile = yield Uploader.DoMultiPartUpload({
@@ -4871,8 +4872,7 @@ var ClientFile;
4871
4872
  });
4872
4873
  }
4873
4874
  else {
4874
- const reqParams = Api.PrepReqParams(Object.assign({}, req));
4875
- reqParams.onProgress = (progress) => {
4875
+ req.onProgress = (progress) => {
4876
4876
  const percent = Math.round((progress.loaded / file.size) * 100);
4877
4877
  onProgress === null || onProgress === void 0 ? void 0 : onProgress({
4878
4878
  percent: percent,
@@ -4921,7 +4921,7 @@ var ClientFile;
4921
4921
  */
4922
4922
  function UploadTemp(params) {
4923
4923
  return __awaiter(this, void 0, void 0, function* () {
4924
- const { api, file, req, onProgress } = params;
4924
+ let { api, file, req, onProgress } = params;
4925
4925
  if (!file) {
4926
4926
  throw ("File is required.");
4927
4927
  }
@@ -4929,6 +4929,7 @@ var ClientFile;
4929
4929
  if (!size) {
4930
4930
  throw ("You cannot upload a 0byte sized file.");
4931
4931
  }
4932
+ req = Api.PrepReqParams(req);
4932
4933
  let tempFile;
4933
4934
  if (size > Uploader.MIN_LARGE_FILE_SIZE) {
4934
4935
  tempFile = yield Uploader.DoMultiPartUpload({
@@ -5286,7 +5287,7 @@ var Tileset;
5286
5287
  Tileset.Update = Update;
5287
5288
  function UploadFile(params) {
5288
5289
  return __awaiter(this, void 0, void 0, function* () {
5289
- const { api, file, req, tilesetId, onProgress } = params;
5290
+ let { api, file, req, tilesetId, onProgress } = params;
5290
5291
  if (!tilesetId || !file) {
5291
5292
  throw ("Tileset ID and file are required.");
5292
5293
  }
@@ -5294,6 +5295,7 @@ var Tileset;
5294
5295
  if (!size) {
5295
5296
  throw ("You cannot upload a 0byte sized file.");
5296
5297
  }
5298
+ req = Api.PrepReqParams(req);
5297
5299
  if (size > Uploader.MIN_LARGE_FILE_SIZE) {
5298
5300
  yield Uploader.DoMultiPartUpload({
5299
5301
  api,
@@ -5334,7 +5336,7 @@ var Tileset;
5334
5336
  Tileset.DeleteFile = DeleteFile;
5335
5337
  function UploadSrcFile(params) {
5336
5338
  return __awaiter(this, void 0, void 0, function* () {
5337
- const { api, file, req, tilesetId, onProgress } = params;
5339
+ let { api, file, req, tilesetId, onProgress } = params;
5338
5340
  if (!tilesetId || !file) {
5339
5341
  throw ("Tileset ID and file are required.");
5340
5342
  }
@@ -5342,6 +5344,7 @@ var Tileset;
5342
5344
  if (!size) {
5343
5345
  throw ("You cannot upload a 0byte sized file.");
5344
5346
  }
5347
+ req = Api.PrepReqParams(req);
5345
5348
  if (size > Uploader.MIN_LARGE_FILE_SIZE) {
5346
5349
  yield Uploader.DoMultiPartUpload({
5347
5350
  api,