@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.
@@ -4532,7 +4532,7 @@ class AttachmentService extends BaseApiService {
4532
4532
  }
4533
4533
  // Attachments aren't models, so we use the OptimisticGenericResult type instead
4534
4534
  async addIssueAttachment(attachmentPayload) {
4535
- const { description: description2, issue, file_sha1, offline_id } = attachmentPayload;
4535
+ const { issue, file_sha1, offline_id } = attachmentPayload;
4536
4536
  if (!attachmentPayload.file.objectURL) {
4537
4537
  throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
4538
4538
  }
@@ -4541,7 +4541,8 @@ class AttachmentService extends BaseApiService {
4541
4541
  file: attachmentPayload.file.objectURL,
4542
4542
  file_name: attachmentPayload.file.name,
4543
4543
  file_type: attachmentPayload.file.type,
4544
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4544
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4545
+ created_by: this.client.store.getState().userReducer.currentUser.id
4545
4546
  };
4546
4547
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4547
4548
  this.client.store.dispatch(addIssueAttachment(offlineAttachment));
@@ -4553,10 +4554,7 @@ class AttachmentService extends BaseApiService {
4553
4554
  blocks: [offline_id, issue],
4554
4555
  blockers: [file_sha1],
4555
4556
  payload: {
4556
- offline_id,
4557
- issue,
4558
- description: description2 ?? "",
4559
- submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3,
4557
+ ...offlineAttachment,
4560
4558
  ...fileProps
4561
4559
  }
4562
4560
  });
@@ -4567,7 +4565,7 @@ class AttachmentService extends BaseApiService {
4567
4565
  return [offlineAttachment, promise];
4568
4566
  }
4569
4567
  async addComponentAttachment(attachmentPayload) {
4570
- const { description: description2, component, file_sha1, offline_id } = attachmentPayload;
4568
+ const { component, file_sha1, offline_id } = attachmentPayload;
4571
4569
  if (!attachmentPayload.file.objectURL) {
4572
4570
  throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
4573
4571
  }
@@ -4576,7 +4574,8 @@ class AttachmentService extends BaseApiService {
4576
4574
  file: attachmentPayload.file.objectURL,
4577
4575
  file_name: attachmentPayload.file.name,
4578
4576
  file_type: attachmentPayload.file.type,
4579
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4577
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4578
+ created_by: this.client.store.getState().userReducer.currentUser.id
4580
4579
  };
4581
4580
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4582
4581
  this.client.store.dispatch(addComponentAttachment(offlineAttachment));
@@ -4588,10 +4587,7 @@ class AttachmentService extends BaseApiService {
4588
4587
  blocks: [offline_id, component],
4589
4588
  blockers: [file_sha1],
4590
4589
  payload: {
4591
- offline_id,
4592
- component,
4593
- description: description2 ?? "",
4594
- submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3,
4590
+ ...offlineAttachment,
4595
4591
  ...fileProps
4596
4592
  }
4597
4593
  });
@@ -4602,7 +4598,7 @@ class AttachmentService extends BaseApiService {
4602
4598
  return [offlineAttachment, promise];
4603
4599
  }
4604
4600
  async addComponentTypeAttachment(attachmentPayload) {
4605
- const { description: description2, component_type, file_sha1, offline_id } = attachmentPayload;
4601
+ const { component_type, file_sha1, offline_id } = attachmentPayload;
4606
4602
  if (!attachmentPayload.file.objectURL) {
4607
4603
  throw new Error("Expected attachmentPayload.file.objectURL to be defined.");
4608
4604
  }
@@ -4611,7 +4607,8 @@ class AttachmentService extends BaseApiService {
4611
4607
  file: attachmentPayload.file.objectURL,
4612
4608
  file_name: attachmentPayload.file.name,
4613
4609
  file_type: attachmentPayload.file.type,
4614
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4610
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4611
+ created_by: this.client.store.getState().userReducer.currentUser.id
4615
4612
  };
4616
4613
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4617
4614
  this.client.store.dispatch(addComponentTypeAttachment(offlineAttachment));
@@ -4623,10 +4620,7 @@ class AttachmentService extends BaseApiService {
4623
4620
  blocks: [offline_id, component_type],
4624
4621
  blockers: [file_sha1],
4625
4622
  payload: {
4626
- offline_id,
4627
- component_type,
4628
- description: description2 ?? "",
4629
- submitted_at: (/* @__PURE__ */ new Date()).getTime() / 1e3,
4623
+ ...offlineAttachment,
4630
4624
  ...fileProps
4631
4625
  }
4632
4626
  });
@@ -4646,7 +4640,8 @@ class AttachmentService extends BaseApiService {
4646
4640
  file: attachmentPayload.file.objectURL,
4647
4641
  file_name: attachmentPayload.file.name,
4648
4642
  file_type: attachmentPayload.file.type,
4649
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4643
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4644
+ created_by: this.client.store.getState().userReducer.currentUser.id
4650
4645
  };
4651
4646
  await this.client.files.addCache(attachmentPayload.file, file_sha1);
4652
4647
  this.client.store.dispatch(addProjectAttachment(offlineAttachment));
@@ -4687,7 +4682,8 @@ class AttachmentService extends BaseApiService {
4687
4682
  file_type: file2.type,
4688
4683
  issue: issueId,
4689
4684
  file_sha1: hash,
4690
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4685
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4686
+ created_by: this.client.store.getState().userReducer.currentUser.id
4691
4687
  });
4692
4688
  return this.addIssueAttachment(attachment);
4693
4689
  };
@@ -4707,7 +4703,8 @@ class AttachmentService extends BaseApiService {
4707
4703
  file_type: file2.type,
4708
4704
  component: componentId,
4709
4705
  file_sha1: hash,
4710
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4706
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4707
+ created_by: this.client.store.getState().userReducer.currentUser.id
4711
4708
  });
4712
4709
  return this.addComponentAttachment(attachment);
4713
4710
  };
@@ -4727,7 +4724,8 @@ class AttachmentService extends BaseApiService {
4727
4724
  file_type: file2.type,
4728
4725
  component_type: componentTypeId,
4729
4726
  file_sha1: hash,
4730
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4727
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4728
+ created_by: this.client.store.getState().userReducer.currentUser.id
4731
4729
  });
4732
4730
  return this.addComponentTypeAttachment(attachment);
4733
4731
  };
@@ -4747,7 +4745,8 @@ class AttachmentService extends BaseApiService {
4747
4745
  file_type: file2.type,
4748
4746
  project: projectId,
4749
4747
  file_sha1: hash,
4750
- submitted_at: (/* @__PURE__ */ new Date()).toISOString()
4748
+ submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
4749
+ created_by: this.client.store.getState().userReducer.currentUser.id
4751
4750
  });
4752
4751
  return this.addProjectAttachment(attachment);
4753
4752
  };