@findlane/server 0.37.0 → 0.38.0

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/index.d.cts CHANGED
@@ -341,7 +341,7 @@ export type PublicSearchPolicy = {
341
341
  sortIds?: string[];
342
342
  /** With `sortIds`: the sort browsers get when they ask for none. */
343
343
  defaultSort?: string;
344
- /** Whether browser search may use `near` and `within`, which show roughly where each record is. */
344
+ /** Whether browser search may use `near`, `within`, `tile`, `bounds`, `clusters` and `spread`, which show roughly where each record is. */
345
345
  location?: boolean;
346
346
  };
347
347
  export type PublicSearchAccess = {
@@ -417,7 +417,7 @@ export type SearchRequest = {
417
417
  * `limit: 0` then gives no hits. */
418
418
  clusters?: {
419
419
  cells: MapCells;
420
- stats?: string[];
420
+ stats?: ClusterStat[];
421
421
  };
422
422
  /** With `tile`: the page is each cell's best records (`perCell`, 1 by default, up to 10) rather than the top of one list. It takes
423
423
  * no `offset`, and `distinct` stays off. */
@@ -524,7 +524,14 @@ export type MapTile = {
524
524
  };
525
525
  /** Cells a side of a map tile. */
526
526
  export type MapCells = 1 | 2 | 4 | 8 | 16;
527
- /** A group of matches: how many, their average place, and the box around them. A box with no size means every record is at one place. */
527
+ /** A number field in clusters' stats, by its name. With `gt`, values at or below it are left out of the stat, such as a price of 0
528
+ * that means no price. Those records stay in the cluster's `count`. */
529
+ export type ClusterStat = string | {
530
+ field: string;
531
+ gt?: number;
532
+ };
533
+ /** A group of matches: how many, their average place, and the box around them. A box with no size means every record is at one
534
+ * place. `stats` leaves out a field no record has a value of. */
528
535
  export type Cluster = {
529
536
  count: number;
530
537
  lat: number;
package/dist/index.d.ts CHANGED
@@ -341,7 +341,7 @@ export type PublicSearchPolicy = {
341
341
  sortIds?: string[];
342
342
  /** With `sortIds`: the sort browsers get when they ask for none. */
343
343
  defaultSort?: string;
344
- /** Whether browser search may use `near` and `within`, which show roughly where each record is. */
344
+ /** Whether browser search may use `near`, `within`, `tile`, `bounds`, `clusters` and `spread`, which show roughly where each record is. */
345
345
  location?: boolean;
346
346
  };
347
347
  export type PublicSearchAccess = {
@@ -417,7 +417,7 @@ export type SearchRequest = {
417
417
  * `limit: 0` then gives no hits. */
418
418
  clusters?: {
419
419
  cells: MapCells;
420
- stats?: string[];
420
+ stats?: ClusterStat[];
421
421
  };
422
422
  /** With `tile`: the page is each cell's best records (`perCell`, 1 by default, up to 10) rather than the top of one list. It takes
423
423
  * no `offset`, and `distinct` stays off. */
@@ -524,7 +524,14 @@ export type MapTile = {
524
524
  };
525
525
  /** Cells a side of a map tile. */
526
526
  export type MapCells = 1 | 2 | 4 | 8 | 16;
527
- /** A group of matches: how many, their average place, and the box around them. A box with no size means every record is at one place. */
527
+ /** A number field in clusters' stats, by its name. With `gt`, values at or below it are left out of the stat, such as a price of 0
528
+ * that means no price. Those records stay in the cluster's `count`. */
529
+ export type ClusterStat = string | {
530
+ field: string;
531
+ gt?: number;
532
+ };
533
+ /** A group of matches: how many, their average place, and the box around them. A box with no size means every record is at one
534
+ * place. `stats` leaves out a field no record has a value of. */
528
535
  export type Cluster = {
529
536
  count: number;
530
537
  lat: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@findlane/server",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "Findlane server SDK: upload catalogs, manage index settings, and search with a secret workspace API key.",
5
5
  "keywords": ["findlane", "search", "full-text search", "typo tolerance", "ecommerce search", "search api", "sdk"],
6
6
  "license": "MIT",