@overmap-ai/core 1.0.48-activity-history.5 → 1.0.48-activity-history.7

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.
@@ -4523,7 +4523,7 @@ var __publicField = (obj, key, value) => {
4523
4523
  }
4524
4524
  // Attachments aren't models, so we use the OptimisticGenericResult type instead
4525
4525
  async addIssueAttachment(attachmentPayload) {
4526
- const { description: description2, issue, file_sha1, offline_id } = attachmentPayload;
4526
+ const { issue, file_sha1, offline_id } = attachmentPayload;
4527
4527
  if (!attachmentPayload.file.objectURL) {
4528
4528
  throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
4529
4529
  }
@@ -4532,7 +4532,8 @@ var __publicField = (obj, key, value) => {
4532
4532
  file: attachmentPayload.file.objectURL,
4533
4533
  file_name: attachmentPayload.file.name,
4534
4534
  file_type: attachmentPayload.file.type,
4535
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4535
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4536
+ created_by: this.client.store.getState().userReducer.currentUser.id
4536
4537
  };
4537
4538
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4538
4539
  this.client.store.dispatch(addIssueAttachment(offlineAttachment));
@@ -4544,10 +4545,7 @@ var __publicField = (obj, key, value) => {
4544
4545
  blocks: [offline_id, issue],
4545
4546
  blockers: [file_sha1],
4546
4547
  payload: {
4547
- offline_id,
4548
- issue,
4549
- description: description2 ?? "",
4550
- submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3,
4548
+ ...offlineAttachment,
4551
4549
  ...fileProps
4552
4550
  }
4553
4551
  });
@@ -4558,7 +4556,7 @@ var __publicField = (obj, key, value) => {
4558
4556
  return [offlineAttachment, promise];
4559
4557
  }
4560
4558
  async addComponentAttachment(attachmentPayload) {
4561
- const { description: description2, component, file_sha1, offline_id } = attachmentPayload;
4559
+ const { component, file_sha1, offline_id } = attachmentPayload;
4562
4560
  if (!attachmentPayload.file.objectURL) {
4563
4561
  throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
4564
4562
  }
@@ -4567,7 +4565,8 @@ var __publicField = (obj, key, value) => {
4567
4565
  file: attachmentPayload.file.objectURL,
4568
4566
  file_name: attachmentPayload.file.name,
4569
4567
  file_type: attachmentPayload.file.type,
4570
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4568
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4569
+ created_by: this.client.store.getState().userReducer.currentUser.id
4571
4570
  };
4572
4571
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4573
4572
  this.client.store.dispatch(addComponentAttachment(offlineAttachment));
@@ -4579,10 +4578,7 @@ var __publicField = (obj, key, value) => {
4579
4578
  blocks: [offline_id, component],
4580
4579
  blockers: [file_sha1],
4581
4580
  payload: {
4582
- offline_id,
4583
- component,
4584
- description: description2 ?? "",
4585
- submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3,
4581
+ ...offlineAttachment,
4586
4582
  ...fileProps
4587
4583
  }
4588
4584
  });
@@ -4593,7 +4589,7 @@ var __publicField = (obj, key, value) => {
4593
4589
  return [offlineAttachment, promise];
4594
4590
  }
4595
4591
  async addComponentTypeAttachment(attachmentPayload) {
4596
- const { description: description2, component_type, file_sha1, offline_id } = attachmentPayload;
4592
+ const { component_type, file_sha1, offline_id } = attachmentPayload;
4597
4593
  if (!attachmentPayload.file.objectURL) {
4598
4594
  throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
4599
4595
  }
@@ -4602,7 +4598,8 @@ var __publicField = (obj, key, value) => {
4602
4598
  file: attachmentPayload.file.objectURL,
4603
4599
  file_name: attachmentPayload.file.name,
4604
4600
  file_type: attachmentPayload.file.type,
4605
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4601
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4602
+ created_by: this.client.store.getState().userReducer.currentUser.id
4606
4603
  };
4607
4604
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4608
4605
  this.client.store.dispatch(addComponentTypeAttachment(offlineAttachment));
@@ -4614,10 +4611,7 @@ var __publicField = (obj, key, value) => {
4614
4611
  blocks: [offline_id, component_type],
4615
4612
  blockers: [file_sha1],
4616
4613
  payload: {
4617
- offline_id,
4618
- component_type,
4619
- description: description2 ?? "",
4620
- submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3,
4614
+ ...offlineAttachment,
4621
4615
  ...fileProps
4622
4616
  }
4623
4617
  });
@@ -4637,7 +4631,8 @@ var __publicField = (obj, key, value) => {
4637
4631
  file: attachmentPayload.file.objectURL,
4638
4632
  file_name: attachmentPayload.file.name,
4639
4633
  file_type: attachmentPayload.file.type,
4640
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4634
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4635
+ created_by: this.client.store.getState().userReducer.currentUser.id
4641
4636
  };
4642
4637
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4643
4638
  this.client.store.dispatch(addProjectAttachment(offlineAttachment));
@@ -4678,7 +4673,8 @@ var __publicField = (obj, key, value) => {
4678
4673
  file_type: file2.type,
4679
4674
  issue: issueId,
4680
4675
  file_sha1: hash,
4681
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4676
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4677
+ created_by: this.client.store.getState().userReducer.currentUser.id
4682
4678
  });
4683
4679
  return this.addIssueAttachment(attachment);
4684
4680
  };
@@ -4698,7 +4694,8 @@ var __publicField = (obj, key, value) => {
4698
4694
  file_type: file2.type,
4699
4695
  component: componentId,
4700
4696
  file_sha1: hash,
4701
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4697
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4698
+ created_by: this.client.store.getState().userReducer.currentUser.id
4702
4699
  });
4703
4700
  return this.addComponentAttachment(attachment);
4704
4701
  };
@@ -4718,7 +4715,8 @@ var __publicField = (obj, key, value) => {
4718
4715
  file_type: file2.type,
4719
4716
  component_type: componentTypeId,
4720
4717
  file_sha1: hash,
4721
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4718
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4719
+ created_by: this.client.store.getState().userReducer.currentUser.id
4722
4720
  });
4723
4721
  return this.addComponentTypeAttachment(attachment);
4724
4722
  };
@@ -4738,7 +4736,8 @@ var __publicField = (obj, key, value) => {
4738
4736
  file_type: file2.type,
4739
4737
  project: projectId,
4740
4738
  file_sha1: hash,
4741
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4739
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4740
+ created_by: this.client.store.getState().userReducer.currentUser.id
4742
4741
  });
4743
4742
  return this.addProjectAttachment(attachment);
4744
4743
  };