@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.
@@ -3963,6 +3963,9 @@ class AssetService extends BaseApiService {
3963
3963
  }
3964
3964
  update(payload) {
3965
3965
  const { store } = this.client;
3966
+ if (!payload.canvas_marker && !payload.geo_marker) {
3967
+ throw new Error("Asset must have either a canvas_marker or geo_marker");
3968
+ }
3966
3969
  const asset = selectAssetById(payload.offline_id)(store.getState());
3967
3970
  if (!asset) {
3968
3971
  throw new Error(`No asset with id ${payload.offline_id} found in the store`);
@@ -3971,9 +3974,6 @@ class AssetService extends BaseApiService {
3971
3974
  ...asset,
3972
3975
  ...payload
3973
3976
  };
3974
- if (!updatedAsset.canvas_marker && !updatedAsset.geo_marker) {
3975
- throw new Error("Asset must have either a canvas_marker or geo_marker");
3976
- }
3977
3977
  this.dispatch(updateAsset(updatedAsset));
3978
3978
  const promise = this.enqueueRequest({
3979
3979
  description: "Edit asset",
@@ -5939,8 +5939,7 @@ class FormSubmissionService extends BaseUploadService {
5939
5939
  description: "Delete user form submissions",
5940
5940
  method: HttpMethod.PATCH,
5941
5941
  url: `/forms/submissions/${updatedSubmission.offline_id}/`,
5942
- // TODO: send just payload when FormSubmissionDeserializer is updated to handle partial updates
5943
- payload: updatedSubmission,
5942
+ payload,
5944
5943
  blockers: [updatedSubmission.offline_id],
5945
5944
  blocks: [updatedSubmission.offline_id]
5946
5945
  });
@@ -6916,19 +6915,7 @@ class AgentService extends BaseApiService {
6916
6915
  blocks: ["prompt"],
6917
6916
  queryParams: { conversation_id: conversationId }
6918
6917
  }).then((response) => {
6919
- const conversation = store.getState().agentsReducer.instances[conversationId];
6920
- if (!(conversation == null ? void 0 : conversation.offline_id)) {
6921
- throw new Error("Conversation not found");
6922
- }
6923
- if (!Array.isArray(response)) {
6924
- response = [response];
6925
- }
6926
- this.dispatch(
6927
- updateConversation({
6928
- ...conversation,
6929
- tiptap_content: [...conversation.tiptap_content || [], ...response]
6930
- })
6931
- );
6918
+ this.dispatch(updateConversation(response));
6932
6919
  });
6933
6920
  }
6934
6921
  async fetchDetails(conversationId) {