tsense 0.0.9 → 0.0.10

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.
package/dist/tsense.js CHANGED
@@ -403,16 +403,16 @@ export class TSense {
403
403
  });
404
404
  const hits = (_d = res.hits) !== null && _d !== void 0 ? _d : [];
405
405
  const data = [];
406
+ const lastHit = hits[hits.length - 1].document;
407
+ const nextCursor = String(lastHit[field]);
406
408
  for (const hit of hits) {
407
409
  const doc = this.deserializeDoc(hit.document);
408
410
  data.push(doc);
409
411
  }
410
412
  if (data.length < limit) {
411
- return { data, nextCursor: null, total: res.found };
413
+ return { data, nextCursor: null };
412
414
  }
413
- const lastHit = hits[hits.length - 1].document;
414
- const nextCursor = String(lastHit[field]);
415
- return { data, nextCursor, total: res.found };
415
+ return { data, nextCursor };
416
416
  });
417
417
  }
418
418
  upsert(docs) {
package/dist/types.d.ts CHANGED
@@ -114,6 +114,5 @@ export type SearchListOptions<T> = {
114
114
  export type SearchListResult<T> = {
115
115
  data: T[];
116
116
  nextCursor: string | null;
117
- total: number;
118
117
  };
119
118
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsense",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "private": false,
5
5
  "description": "Opinionated, fully typed typesense client",
6
6
  "keywords": [