@conboai/app.db.query 0.8.44 → 0.8.45

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.
@@ -137906,13 +137906,14 @@ const KGe = (e, t) => {
137906
137906
  },
137907
137907
  findAllReids: async ({ conboKey: t, baseUrl: n }) => {
137908
137908
  e(() => ({ loading: !0, error: null }));
137909
+ const r = xt.getState().editTabData;
137909
137910
  try {
137910
- const r = await JGe({ conboKey: t, baseUrl: n }), o = xt.getState().editTabData;
137911
- o("allReids", ZGe(r)), e(() => ({
137911
+ const o = await JGe({ conboKey: t, baseUrl: n });
137912
+ r("allReids", ZGe(o)), e(() => ({
137912
137913
  loading: !1
137913
137914
  }));
137914
- } catch (r) {
137915
- console.log(r), e({ error: "Something went wrong", loading: !1 });
137915
+ } catch (o) {
137916
+ console.log(o), r("allReids", []), e({ error: "Something went wrong", loading: !1 });
137916
137917
  }
137917
137918
  }
137918
137919
  })), QGe = ({
@@ -138356,20 +138357,21 @@ const KGe = (e, t) => {
138356
138357
  endTime: s
138357
138358
  }) => {
138358
138359
  e(() => ({ loading: !0, error: null }));
138360
+ const a = xt.getState().editTabData;
138359
138361
  try {
138360
- const a = await ch.detectionsControllerGetDetections(
138362
+ const l = await ch.detectionsControllerGetDetections(
138361
138363
  i,
138362
138364
  s,
138363
138365
  o,
138364
138366
  r,
138365
138367
  n,
138366
138368
  t
138367
- ), l = xt.getState().editTabData;
138368
- l("detectionsPixel", a), e(() => ({
138369
+ );
138370
+ a("detectionsPixel", l), e(() => ({
138369
138371
  loading: !1
138370
138372
  }));
138371
- } catch (a) {
138372
- sa(a) && a.body.statusCode === Bs.BAD_REQUEST && Gs.error(a.body.messages[0]), e({ error: "Something went wrong", loading: !1 });
138373
+ } catch (l) {
138374
+ sa(l) && l.body.statusCode === Bs.BAD_REQUEST && Gs.error(l.body.messages[0]), a("detectionsPixel", []), e({ error: "Something went wrong", loading: !1 });
138373
138375
  }
138374
138376
  },
138375
138377
  getDetectionsGeo: async ({
@@ -138381,73 +138383,77 @@ const KGe = (e, t) => {
138381
138383
  endTime: s
138382
138384
  }) => {
138383
138385
  e(() => ({ loading: !0, error: null }));
138386
+ const a = xt.getState().editTabData;
138384
138387
  try {
138385
- const a = await Av.detectionsControllerGetDetections(
138388
+ const l = await Av.detectionsControllerGetDetections(
138386
138389
  i,
138387
138390
  s,
138388
138391
  o,
138389
138392
  r,
138390
138393
  n,
138391
138394
  t
138392
- ), l = xt.getState().editTabData;
138393
- l("detectionsGeo", a), e(() => ({
138395
+ );
138396
+ a("detectionsGeo", l), e(() => ({
138394
138397
  loading: !1
138395
138398
  }));
138396
- } catch (a) {
138397
- sa(a) && a.body.statusCode === Bs.BAD_REQUEST && Gs.error(a.body.messages[0]), e({ error: "Something went wrong", loading: !1 });
138399
+ } catch (l) {
138400
+ sa(l) && l.body.statusCode === Bs.BAD_REQUEST && Gs.error(l.body.messages[0]), a("detectionsGeo", null), e({ error: "Something went wrong", loading: !1 });
138398
138401
  }
138399
138402
  },
138400
138403
  getTrailInfoPixel: async ({ requestBody: t, startTime: n, endTime: r }) => {
138401
138404
  e(() => ({ loading: !0, error: null }));
138405
+ const o = xt.getState().editTabData;
138402
138406
  try {
138403
- const o = await ch.detectionsControllerGetTrailDetails(
138407
+ const s = (await ch.detectionsControllerGetTrailDetails(
138404
138408
  t,
138405
138409
  n,
138406
138410
  r
138407
- ), i = xt.getState().editTabData, s = o.items.map((a) => ({
138411
+ )).items.map((a) => ({
138408
138412
  ...a,
138409
138413
  id: `${Ml()}-${a.count}`
138410
138414
  }));
138411
- i("trailInfoPixel", s), e(() => ({
138415
+ o("trailInfoPixel", s), e(() => ({
138412
138416
  loading: !1
138413
138417
  }));
138414
- } catch (o) {
138415
- sa(o) && o.body.statusCode === Bs.BAD_REQUEST && Gs.error(o.body.messages[0]), e({ error: "Something went wrong", loading: !1 });
138418
+ } catch (i) {
138419
+ sa(i) && i.body.statusCode === Bs.BAD_REQUEST && Gs.error(i.body.messages[0]), o("trailInfoPixel", []), e({ error: "Something went wrong", loading: !1 });
138416
138420
  }
138417
138421
  },
138418
138422
  getTrailInfoGeo: async ({ requestBody: t, startTime: n, endTime: r }) => {
138419
138423
  e(() => ({ loading: !0, error: null }));
138424
+ const o = xt.getState().editTabData;
138420
138425
  try {
138421
- const o = await Av.detectionsControllerGetTrailDetails(
138426
+ const i = await Av.detectionsControllerGetTrailDetails(
138422
138427
  t,
138423
138428
  n,
138424
138429
  r
138425
- ), i = xt.getState().editTabData;
138426
- i("trailInfoGeo", o.items), e(() => ({
138430
+ );
138431
+ o("trailInfoGeo", i.items), e(() => ({
138427
138432
  loading: !1
138428
138433
  }));
138429
- } catch (o) {
138430
- sa(o) && o.body.statusCode === Bs.BAD_REQUEST && Gs.error(o.body.messages[0]), e({ error: "Something went wrong", loading: !1 });
138434
+ } catch (i) {
138435
+ sa(i) && i.body.statusCode === Bs.BAD_REQUEST && Gs.error(i.body.messages[0]), o("trailInfoGeo", []), e({ error: "Something went wrong", loading: !1 });
138431
138436
  }
138432
138437
  },
138433
138438
  getDetectionsInfo: async ({ conboKey: t }) => {
138434
138439
  e(() => ({ loading: !0, error: null }));
138440
+ const n = xt.getState().editTabData;
138435
138441
  try {
138436
- const n = await ch.detectionsControllerGetDetectionsInfo(
138442
+ const r = await ch.detectionsControllerGetDetectionsInfo(
138437
138443
  t
138438
- ), r = {
138439
- ...n,
138440
- id: n.conbo_key,
138441
- assigned_feed_id: n.assigned_feed,
138442
- startTime: n.start_time,
138443
- endTime: n.end_time,
138444
+ ), o = {
138445
+ ...r,
138446
+ id: r.conbo_key,
138447
+ assigned_feed_id: r.assigned_feed,
138448
+ startTime: r.start_time,
138449
+ endTime: r.end_time,
138444
138450
  origin: "source"
138445
- }, o = xt.getState().editTabData;
138446
- o("detectionsInfo", r), e(() => ({
138451
+ };
138452
+ n("detectionsInfo", o), e(() => ({
138447
138453
  loading: !1
138448
138454
  }));
138449
- } catch (n) {
138450
- sa(n) && n.body.statusCode === Bs.BAD_REQUEST && Gs.error(n.body.messages[0]), e({ error: "Something went wrong", loading: !1 });
138455
+ } catch (r) {
138456
+ sa(r) && r.body.statusCode === Bs.BAD_REQUEST && Gs.error(r.body.messages[0]), n("detectionsInfo", []), e({ error: "Something went wrong", loading: !1 });
138451
138457
  }
138452
138458
  }
138453
138459
  })), eqe = ({ baseUrl: e }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conboai/app.db.query",
3
- "version": "0.8.44",
3
+ "version": "0.8.45",
4
4
  "type": "module",
5
5
  "main": "dist/app.db.query.js",
6
6
  "types": "dist/build/index.d.ts",