@overmap-ai/core 1.0.67-service-fixes.1 → 1.0.67

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.
@@ -3952,6 +3952,9 @@ var __publicField = (obj, key, value) => {
3952
3952
  }
3953
3953
  update(payload) {
3954
3954
  const { store } = this.client;
3955
+ if (!payload.canvas_marker && !payload.geo_marker) {
3956
+ throw new Error("Asset must have either a canvas_marker or geo_marker");
3957
+ }
3955
3958
  const asset = selectAssetById(payload.offline_id)(store.getState());
3956
3959
  if (!asset) {
3957
3960
  throw new Error(`No asset with id ${payload.offline_id} found in the store`);
@@ -3960,9 +3963,6 @@ var __publicField = (obj, key, value) => {
3960
3963
  ...asset,
3961
3964
  ...payload
3962
3965
  };
3963
- if (!updatedAsset.canvas_marker && !updatedAsset.geo_marker) {
3964
- throw new Error("Asset must have either a canvas_marker or geo_marker");
3965
- }
3966
3966
  this.dispatch(updateAsset(updatedAsset));
3967
3967
  const promise = this.enqueueRequest({
3968
3968
  description: "Edit asset",
@@ -5928,8 +5928,7 @@ var __publicField = (obj, key, value) => {
5928
5928
  description: "Delete user form submissions",
5929
5929
  method: HttpMethod.PATCH,
5930
5930
  url: `/forms/submissions/${updatedSubmission.offline_id}/`,
5931
- // TODO: send just payload when FormSubmissionDeserializer is updated to handle partial updates
5932
- payload: updatedSubmission,
5931
+ payload,
5933
5932
  blockers: [updatedSubmission.offline_id],
5934
5933
  blocks: [updatedSubmission.offline_id]
5935
5934
  });
@@ -6905,19 +6904,7 @@ var __publicField = (obj, key, value) => {
6905
6904
  blocks: ["prompt"],
6906
6905
  queryParams: { conversation_id: conversationId }
6907
6906
  }).then((response) => {
6908
- const conversation = store.getState().agentsReducer.instances[conversationId];
6909
- if (!(conversation == null ? void 0 : conversation.offline_id)) {
6910
- throw new Error("Conversation not found");
6911
- }
6912
- if (!Array.isArray(response)) {
6913
- response = [response];
6914
- }
6915
- this.dispatch(
6916
- updateConversation({
6917
- ...conversation,
6918
- tiptap_content: [...conversation.tiptap_content || [], ...response]
6919
- })
6920
- );
6907
+ this.dispatch(updateConversation(response));
6921
6908
  });
6922
6909
  }
6923
6910
  async fetchDetails(conversationId) {