@overmap-ai/core 1.2.5-install-common.0 → 1.2.5-install-common.2

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.
@@ -1,4 +1,4 @@
1
- import { fallbackToEmptyArray as p, submittedAtModelSortFn as Et, assetTypeStatusSortFn as Wr, getDocumentSubTree as Xr, issueTypePrioritySortFn as Yr, issueTypeStatusSortFn as Zr, fallbackToEmptyObject as Ci, toUuidArray as R, chunkArray as C, uuidObj as A, uuidSortFn as pt, IssueUpdateChange as D, DeferredPromise as Ss } from "@overmap-ai/common";
1
+ import { fallbackToEmptyArray as p, submittedAtModelSortFn as Et, assetTypeStatusSortFn as Wr, getDocumentSubTree as Xr, issueTypePrioritySortFn as Yr, issueTypeStatusSortFn as Zr, fallbackToEmptyObject as Ci, toUuidArray as R, ERROR_MSG_UNEXPECTED as Ft, chunkArray as C, uuidObj as A, uuidSortFn as pt, IssueUpdateChange as D, DeferredPromise as Ss } from "@overmap-ai/common";
2
2
  import "@redux-offline/redux-offline/lib/types";
3
3
  import { createAction as Kt, createSelector as o, createSlice as b, isAnyOf as _, combineReducers as Ui } from "@reduxjs/toolkit";
4
4
  import lt from "superagent";
@@ -1406,9 +1406,9 @@ const h = (
1406
1406
  updateIssueAssociation: lp,
1407
1407
  updateIssueAssociations: hp,
1408
1408
  addIssueAssociation: pp,
1409
- addIssueAssociations: Ft,
1409
+ addIssueAssociations: Mt,
1410
1410
  deleteIssueAssociation: mp,
1411
- deleteIssueAssociations: Mt
1411
+ deleteIssueAssociations: gt
1412
1412
  } = Xn.actions, yp = (t) => t.issueAssociationReducer.instances, vt = o([yp], (t) => Object.values(t)), fp = (t) => (e) => e.issueAssociationReducer.instances[t], Sp = h(
1413
1413
  o([vt, (t, e) => e], (t, e) => {
1414
1414
  const s = new Set(e);
@@ -2573,13 +2573,13 @@ const h = (
2573
2573
  }), {
2574
2574
  initializeProcedures: aA,
2575
2575
  addProcedure: rA,
2576
- addProcedures: gt,
2576
+ addProcedures: wt,
2577
2577
  setProcedure: cA,
2578
2578
  setProcedures: dA,
2579
2579
  updateProcedure: uA,
2580
2580
  updateProcedures: oA,
2581
2581
  deleteProcedure: lA,
2582
- deleteProcedures: wt
2582
+ deleteProcedures: Rt
2583
2583
  } = Ya.actions, hA = Ya.reducer, pA = (t) => t.procedureReducer.instances, ft = o(
2584
2584
  [pA],
2585
2585
  (t) => Object.values(t)
@@ -3846,7 +3846,7 @@ function y_(t, e, s) {
3846
3846
  function f_(t, e) {
3847
3847
  return Bt().dispatch(kS((/* @__PURE__ */ new Date()).getTime())), nc;
3848
3848
  }
3849
- const Rt = "An unknown error occurred", S_ = 500, xi = ["non_field_errors", "detail"];
3849
+ const S_ = 500, xi = ["non_field_errors", "detail"];
3850
3850
  function O_(t, e) {
3851
3851
  let s;
3852
3852
  if (t?.body)
@@ -3867,7 +3867,7 @@ function O_(t, e) {
3867
3867
  }
3868
3868
  } else typeof t.body == "string" && (s = t.body);
3869
3869
  else t?.text ? s = t.text : e instanceof Error && (s = e.message);
3870
- return !s || s.length > S_ ? Rt : s;
3870
+ return !s || s.length > S_ ? Ft : s;
3871
3871
  }
3872
3872
  class j extends Error {
3873
3873
  // NOTE: Needs to conform to NetworkError in @redux-offline/redux-offline, which has `status` and `response`.
@@ -3876,9 +3876,9 @@ class j extends Error {
3876
3876
  message;
3877
3877
  options;
3878
3878
  constructor(e) {
3879
- super(Rt);
3879
+ super(Ft);
3880
3880
  const { response: s, innerError: i } = e;
3881
- this.message = e.message ?? O_(s, i) ?? Rt, this.status = s?.status ?? 0, this.response = s, this.options = e;
3881
+ this.message = e.message ?? O_(s, i) ?? Ft, this.status = s?.status ?? 0, this.response = s, this.options = e;
3882
3882
  }
3883
3883
  }
3884
3884
  function A_(t) {
@@ -4501,7 +4501,7 @@ class lg extends E {
4501
4501
  const { addOne: s, deleteOne: i } = this.actions, { selectById: n } = this.selectors, a = this.select(n(e));
4502
4502
  if (!a) throw new Error(`No asset with uuid ${e} found in the store`);
4503
4503
  const c = this.select(bc(e)), r = this.select(kc(e)), l = this.select(Tp(e)), u = this.select(SA(e)), y = this.select(Gh(e));
4504
- this.dispatch(i(e)), this.dispatch(Ki(R(c))), this.dispatch(Gt(R(r))), this.dispatch(Mt(R(l))), this.dispatch(wt(R(u))), this.dispatch(yt(R(y)));
4504
+ this.dispatch(i(e)), this.dispatch(Ki(R(c))), this.dispatch(Gt(R(r))), this.dispatch(gt(R(l))), this.dispatch(Rt(R(u))), this.dispatch(yt(R(y)));
4505
4505
  try {
4506
4506
  return await this.enqueueRequest({
4507
4507
  description: m(d.DELETE, this.name, !1),
@@ -4511,7 +4511,7 @@ class lg extends E {
4511
4511
  blocks: []
4512
4512
  });
4513
4513
  } catch (S) {
4514
- throw this.dispatch(s(a)), this.dispatch(Gi(c)), this.dispatch(Nt(r)), this.dispatch(Ft(l)), this.dispatch(gt(u)), this.dispatch(mt(y)), S;
4514
+ throw this.dispatch(s(a)), this.dispatch(Gi(c)), this.dispatch(Nt(r)), this.dispatch(Mt(l)), this.dispatch(wt(u)), this.dispatch(mt(y)), S;
4515
4515
  }
4516
4516
  }
4517
4517
  bulkAdd(e, s) {
@@ -4584,7 +4584,7 @@ class lg extends E {
4584
4584
  }
4585
4585
  async bulkDelete(e) {
4586
4586
  const { addMany: s, deleteMany: i } = this.actions, { selectByIds: n } = this.selectors, a = this.select(n(e)), c = this.select(zc(e)), r = this.select(bp(e)), l = this.select(OA(e)), u = this.select(Kh(e));
4587
- this.dispatch(i(e)), this.dispatch(Gt(R(c))), this.dispatch(Mt(R(r))), this.dispatch(wt(R(l))), this.dispatch(yt(R(u)));
4587
+ this.dispatch(i(e)), this.dispatch(Gt(R(c))), this.dispatch(gt(R(r))), this.dispatch(Rt(R(l))), this.dispatch(yt(R(u)));
4588
4588
  try {
4589
4589
  return await this.enqueueRequest({
4590
4590
  description: m(d.DELETE, this.name, !0),
@@ -4595,7 +4595,7 @@ class lg extends E {
4595
4595
  blocks: []
4596
4596
  });
4597
4597
  } catch (y) {
4598
- throw this.dispatch(s(a)), this.dispatch(Nt(c)), this.dispatch(Ft(r)), this.dispatch(gt(l)), this.dispatch(mt(u)), y;
4598
+ throw this.dispatch(s(a)), this.dispatch(Nt(c)), this.dispatch(Mt(r)), this.dispatch(wt(l)), this.dispatch(mt(u)), y;
4599
4599
  }
4600
4600
  }
4601
4601
  async refreshStore(e, s) {
@@ -6664,13 +6664,13 @@ class qg extends E {
6664
6664
  url = "/issue-associations";
6665
6665
  actions = {
6666
6666
  addOne: pp,
6667
- addMany: Ft,
6667
+ addMany: Mt,
6668
6668
  setOne: op,
6669
6669
  setMany: up,
6670
6670
  updateOne: lp,
6671
6671
  updateMany: hp,
6672
6672
  deleteOne: mp,
6673
- deleteMany: Mt,
6673
+ deleteMany: gt,
6674
6674
  initialize: dp
6675
6675
  };
6676
6676
  selectors = {
@@ -7138,7 +7138,7 @@ class xg extends E {
7138
7138
  if (!a)
7139
7139
  throw new Error(`No issue with uuid ${e} found in the store`);
7140
7140
  const c = this.select(Ap(e)), r = this.select(vp(e)), l = this.select(Nf(e)), u = this.select(Hh(e));
7141
- this.dispatch(s(e)), this.dispatch(Jn(R(r))), this.dispatch(Ba(R(l))), this.dispatch(Mt(R(c))), this.dispatch(yt(R(u)));
7141
+ this.dispatch(s(e)), this.dispatch(Jn(R(r))), this.dispatch(Ba(R(l))), this.dispatch(gt(R(c))), this.dispatch(yt(R(u)));
7142
7142
  try {
7143
7143
  return await this.enqueueRequest({
7144
7144
  description: m(d.DELETE, this.name, !1),
@@ -7148,12 +7148,12 @@ class xg extends E {
7148
7148
  blocks: []
7149
7149
  });
7150
7150
  } catch (y) {
7151
- throw this.dispatch(i(a)), this.dispatch(Zn(r)), this.dispatch(Ea(l)), this.dispatch(Ft(c)), this.dispatch(mt(u)), y;
7151
+ throw this.dispatch(i(a)), this.dispatch(Zn(r)), this.dispatch(Ea(l)), this.dispatch(Mt(c)), this.dispatch(mt(u)), y;
7152
7152
  }
7153
7153
  }
7154
7154
  async bulkDelete(e) {
7155
7155
  const { addMany: s, deleteMany: i } = this.actions, { selectByIds: n } = this.selectors, a = this.select(n(e)), c = this.select(Op(e)), r = this.select(Nh(e));
7156
- this.dispatch(i(e)), this.dispatch(Mt(R(c))), this.dispatch(yt(R(r)));
7156
+ this.dispatch(i(e)), this.dispatch(gt(R(c))), this.dispatch(yt(R(r)));
7157
7157
  try {
7158
7158
  return await this.enqueueRequest({
7159
7159
  description: m(d.DELETE, this.name, !0),
@@ -7164,7 +7164,7 @@ class xg extends E {
7164
7164
  blocks: []
7165
7165
  });
7166
7166
  } catch (l) {
7167
- throw this.dispatch(s(a)), this.dispatch(Ft(c)), this.dispatch(mt(r)), l;
7167
+ throw this.dispatch(s(a)), this.dispatch(Mt(c)), this.dispatch(mt(r)), l;
7168
7168
  }
7169
7169
  }
7170
7170
  async refreshStore(e, s) {
@@ -8084,7 +8084,7 @@ class Jg extends E_ {
8084
8084
  try {
8085
8085
  await this.renewTokens();
8086
8086
  } catch (e) {
8087
- return e instanceof j && this.clearAuth(), e instanceof Error ? Promise.reject(e) : Promise.reject(new Error((e ?? Rt).toString()));
8087
+ return e instanceof j && this.clearAuth(), e instanceof Error ? Promise.reject(e) : Promise.reject(new Error((e ?? Ft).toString()));
8088
8088
  }
8089
8089
  }
8090
8090
  }
@@ -8652,13 +8652,13 @@ class rw extends E {
8652
8652
  url = "/procedures";
8653
8653
  actions = {
8654
8654
  addOne: rA,
8655
- addMany: gt,
8655
+ addMany: wt,
8656
8656
  setOne: cA,
8657
8657
  setMany: dA,
8658
8658
  updateOne: uA,
8659
8659
  updateMany: oA,
8660
8660
  deleteOne: lA,
8661
- deleteMany: wt,
8661
+ deleteMany: Rt,
8662
8662
  initialize: aA
8663
8663
  };
8664
8664
  selectors = {
@@ -9809,7 +9809,7 @@ class Ow extends E {
9809
9809
  if (!a)
9810
9810
  throw new Error(`Expected ${this.name} with uuid ${e} to exist`);
9811
9811
  const c = this.select(AA(e));
9812
- this.dispatch(s(e)), this.dispatch(wt(R(c)));
9812
+ this.dispatch(s(e)), this.dispatch(Rt(R(c)));
9813
9813
  try {
9814
9814
  return await this.enqueueRequest({
9815
9815
  description: m(d.DELETE, this.name, !1),
@@ -9819,7 +9819,7 @@ class Ow extends E {
9819
9819
  blocks: []
9820
9820
  });
9821
9821
  } catch (r) {
9822
- throw this.dispatch(i(a)), this.dispatch(gt(c)), r;
9822
+ throw this.dispatch(i(a)), this.dispatch(wt(c)), r;
9823
9823
  }
9824
9824
  }
9825
9825
  async refreshStore(e, s) {
@@ -10435,7 +10435,7 @@ class Fw extends E {
10435
10435
  if (!a)
10436
10436
  throw new Error(`Expected procedure type with uuid ${e} to exist`);
10437
10437
  const c = this.select(fA(e));
10438
- this.dispatch(s(e)), this.dispatch(wt(R(c)));
10438
+ this.dispatch(s(e)), this.dispatch(Rt(R(c)));
10439
10439
  try {
10440
10440
  return await this.enqueueRequest({
10441
10441
  description: m(d.DELETE, this.name, !1),
@@ -10445,7 +10445,7 @@ class Fw extends E {
10445
10445
  blocks: []
10446
10446
  });
10447
10447
  } catch (r) {
10448
- throw this.dispatch(i(a)), this.dispatch(gt(c)), r;
10448
+ throw this.dispatch(i(a)), this.dispatch(wt(c)), r;
10449
10449
  }
10450
10450
  }
10451
10451
  async refreshStore(e, s) {
@@ -10771,7 +10771,7 @@ class Rw {
10771
10771
  return Lr(e, c, this, i, n).then((r) => {
10772
10772
  a.resolve(r.body);
10773
10773
  }).catch((r) => {
10774
- r instanceof Error ? a.reject(r) : a.reject(new Error((r ?? Rt).toString()));
10774
+ r instanceof Error ? a.reject(r) : a.reject(new Error((r ?? Ft).toString()));
10775
10775
  }), a;
10776
10776
  }
10777
10777
  async performRequest(e, s, i, n) {
@@ -11159,7 +11159,6 @@ export {
11159
11159
  tF as SelectorBuilder,
11160
11160
  Mw as TeamMembershipService,
11161
11161
  gw as TeamService,
11162
- Rt as UNKNOWN_ERROR_MESSAGE,
11163
11162
  ww as UserService,
11164
11163
  kS as _setLatestRetryTime,
11165
11164
  jc as addAsset,
@@ -11216,7 +11215,7 @@ export {
11216
11215
  Qh as addGeoImages,
11217
11216
  cm as addIssue,
11218
11217
  pp as addIssueAssociation,
11219
- Ft as addIssueAssociations,
11218
+ Mt as addIssueAssociations,
11220
11219
  _p as addIssueAttachment,
11221
11220
  Zn as addIssueAttachments,
11222
11221
  Xp as addIssueComment,
@@ -11289,7 +11288,7 @@ export {
11289
11288
  _I as addProcedureTypeFieldsAttachments,
11290
11289
  jI as addProcedureTypeFieldsMany,
11291
11290
  bP as addProcedureTypes,
11292
- gt as addProcedures,
11291
+ wt as addProcedures,
11293
11292
  jO as addProject,
11294
11293
  qS as addProjectAccess,
11295
11294
  jS as addProjectAccesses,
@@ -11395,7 +11394,7 @@ export {
11395
11394
  ip as deleteGeoImages,
11396
11395
  hm as deleteIssue,
11397
11396
  mp as deleteIssueAssociation,
11398
- Mt as deleteIssueAssociations,
11397
+ gt as deleteIssueAssociations,
11399
11398
  Rp as deleteIssueAttachment,
11400
11399
  Jn as deleteIssueAttachments,
11401
11400
  tm as deleteIssueComment,
@@ -11468,7 +11467,7 @@ export {
11468
11467
  EI as deleteProcedureTypeFieldsAttachments,
11469
11468
  LI as deleteProcedureTypeFieldsMany,
11470
11469
  gP as deleteProcedureTypes,
11471
- wt as deleteProcedures,
11470
+ Rt as deleteProcedures,
11472
11471
  xO as deleteProject,
11473
11472
  US as deleteProjectAccess,
11474
11473
  LS as deleteProjectAccesses,