@lunora/server 1.0.0-alpha.55 → 1.0.0-alpha.57
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/data-model.d.mts +21 -0
- package/dist/data-model.d.ts +21 -0
- package/dist/index.d.mts +708 -528
- package/dist/index.d.ts +708 -528
- package/dist/index.mjs +1 -1
- package/dist/packem_shared/PRESENCE_DEFAULT_TTL_MS-DO2-TdzC.mjs +1 -0
- package/dist/packem_shared/asBucketStorage-BthCnWop.mjs +1 -0
- package/dist/packem_shared/buildMaskRegistry-BCIzKxdK.mjs +1 -0
- package/dist/packem_shared/{buildRlsReadRegistry-WdiqSj87.mjs → buildRlsReadRegistry-CA-aUi7I.mjs} +1 -1
- package/dist/packem_shared/composePluginMiddleware-B67TQ409.mjs +1 -0
- package/dist/packem_shared/defineAggregateIndex-DMhN3nby.mjs +1 -0
- package/dist/packem_shared/initLunora-DXCOVntr.mjs +1 -0
- package/dist/packem_shared/mask-DF7mtxQe.mjs +1 -0
- package/dist/packem_shared/optional-writer-override-CXXO30sZ.mjs +1 -0
- package/dist/packem_shared/plugin-B5pDeN17.mjs +1 -0
- package/dist/packem_shared/rls-tRDkICWZ.mjs +1 -0
- package/dist/rls/testing.mjs +1 -1
- package/dist/types.d.mts +38 -9
- package/dist/types.d.ts +38 -9
- package/dist/types.mjs +1 -1
- package/package.json +4 -4
- package/dist/packem_shared/PRESENCE_DEFAULT_TTL_MS-C9RX3Cl6.mjs +0 -1
- package/dist/packem_shared/asBucketStorage-1pFfH-Tn.mjs +0 -1
- package/dist/packem_shared/composePluginMiddleware-COr09CXA.mjs +0 -1
- package/dist/packem_shared/defineAggregateIndex-_gWNmkQZ.mjs +0 -1
- package/dist/packem_shared/initLunora-QNqOuG0A.mjs +0 -1
- package/dist/packem_shared/mask-C6Bi78qj.mjs +0 -1
- package/dist/packem_shared/rls-_iVsPvhX.mjs +0 -1
package/dist/data-model.d.mts
CHANGED
|
@@ -275,6 +275,16 @@ interface SearchFilterBuilder<TDocument> {
|
|
|
275
275
|
*/
|
|
276
276
|
interface SearchReader<TDocument> {
|
|
277
277
|
collect: () => Promise<TDocument[]>;
|
|
278
|
+
/**
|
|
279
|
+
* Like `.collect()`, but pairs each matched document with the relevance
|
|
280
|
+
* score the FTS engine already computed to produce the descending order —
|
|
281
|
+
* `.collect()` throws it away after sorting by it, this surfaces it
|
|
282
|
+
* instead. Ordered by `score` descending, same order as `.collect()`.
|
|
283
|
+
*/
|
|
284
|
+
collectWithScores: () => Promise<{
|
|
285
|
+
document: TDocument;
|
|
286
|
+
score: number;
|
|
287
|
+
}[]>;
|
|
278
288
|
first: () => Promise<TDocument | null>;
|
|
279
289
|
take: (limit: number) => Promise<TDocument[]>;
|
|
280
290
|
unique: () => Promise<TDocument | null>;
|
|
@@ -305,6 +315,17 @@ interface GeoFilterBuilder {
|
|
|
305
315
|
*/
|
|
306
316
|
interface GeoReader<TDocument> {
|
|
307
317
|
collect: () => Promise<TDocument[]>;
|
|
318
|
+
/**
|
|
319
|
+
* Like `.collect()`, but pairs each matched document with the distance
|
|
320
|
+
* (in meters) from `.near()`'s point that the read already computed to
|
|
321
|
+
* produce the nearest-first order. `.within()` box matches have no
|
|
322
|
+
* point-distance metric, so `distanceMeters` is `null` for those rows
|
|
323
|
+
* rather than a misleading `0`.
|
|
324
|
+
*/
|
|
325
|
+
collectWithScores: () => Promise<{
|
|
326
|
+
distanceMeters: null | number;
|
|
327
|
+
document: TDocument;
|
|
328
|
+
}[]>;
|
|
308
329
|
first: () => Promise<TDocument | null>;
|
|
309
330
|
take: (limit: number) => Promise<TDocument[]>;
|
|
310
331
|
unique: () => Promise<TDocument | null>;
|
package/dist/data-model.d.ts
CHANGED
|
@@ -275,6 +275,16 @@ interface SearchFilterBuilder<TDocument> {
|
|
|
275
275
|
*/
|
|
276
276
|
interface SearchReader<TDocument> {
|
|
277
277
|
collect: () => Promise<TDocument[]>;
|
|
278
|
+
/**
|
|
279
|
+
* Like `.collect()`, but pairs each matched document with the relevance
|
|
280
|
+
* score the FTS engine already computed to produce the descending order —
|
|
281
|
+
* `.collect()` throws it away after sorting by it, this surfaces it
|
|
282
|
+
* instead. Ordered by `score` descending, same order as `.collect()`.
|
|
283
|
+
*/
|
|
284
|
+
collectWithScores: () => Promise<{
|
|
285
|
+
document: TDocument;
|
|
286
|
+
score: number;
|
|
287
|
+
}[]>;
|
|
278
288
|
first: () => Promise<TDocument | null>;
|
|
279
289
|
take: (limit: number) => Promise<TDocument[]>;
|
|
280
290
|
unique: () => Promise<TDocument | null>;
|
|
@@ -305,6 +315,17 @@ interface GeoFilterBuilder {
|
|
|
305
315
|
*/
|
|
306
316
|
interface GeoReader<TDocument> {
|
|
307
317
|
collect: () => Promise<TDocument[]>;
|
|
318
|
+
/**
|
|
319
|
+
* Like `.collect()`, but pairs each matched document with the distance
|
|
320
|
+
* (in meters) from `.near()`'s point that the read already computed to
|
|
321
|
+
* produce the nearest-first order. `.within()` box matches have no
|
|
322
|
+
* point-distance metric, so `distanceMeters` is `null` for those rows
|
|
323
|
+
* rather than a misleading `0`.
|
|
324
|
+
*/
|
|
325
|
+
collectWithScores: () => Promise<{
|
|
326
|
+
distanceMeters: null | number;
|
|
327
|
+
document: TDocument;
|
|
328
|
+
}[]>;
|
|
308
329
|
first: () => Promise<TDocument | null>;
|
|
309
330
|
take: (limit: number) => Promise<TDocument[]>;
|
|
310
331
|
unique: () => Promise<TDocument | null>;
|