@lunora/server 1.0.0-alpha.61 → 1.0.0-alpha.63

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.
Files changed (32) hide show
  1. package/dist/data-model.d.mts +10 -10
  2. package/dist/data-model.d.ts +10 -10
  3. package/dist/index.d.mts +281 -293
  4. package/dist/index.d.ts +281 -293
  5. package/dist/index.mjs +1 -1
  6. package/dist/packem_shared/{PRESENCE_DEFAULT_TTL_MS-DmnVChTY.mjs → PRESENCE_DEFAULT_TTL_MS-Dyb1szd2.mjs} +1 -1
  7. package/dist/packem_shared/buildRlsReadRegistry-CE5k6akj.mjs +1 -0
  8. package/dist/packem_shared/{composePluginMiddleware-B9NyOR1k.mjs → composePluginMiddleware-ByhCqIGt.mjs} +1 -1
  9. package/dist/packem_shared/{defineAggregateIndex-C3CMy5jn.mjs → defineAggregateIndex-BoiwhUKL.mjs} +1 -1
  10. package/dist/packem_shared/httpAction-BpEJYwzV.mjs +5 -0
  11. package/dist/packem_shared/initLunora-BadfSfpJ.mjs +1 -0
  12. package/dist/packem_shared/mask-Chnz8Z0H.mjs +1 -0
  13. package/dist/packem_shared/middleware-D9_39C5C.mjs +1 -0
  14. package/dist/packem_shared/plugin-184MITA3.mjs +1 -0
  15. package/dist/packem_shared/rls-CI2149Ve.mjs +1 -0
  16. package/dist/packem_shared/storageRules-6_G8JpCv.mjs +1 -0
  17. package/dist/packem_shared/{types.d-C4CMJK8x.d.mts → types.d-B-pIn8rE.d.mts} +2 -2
  18. package/dist/packem_shared/{types.d-DdYF8E18.d.ts → types.d-CdPDEjhz.d.ts} +2 -2
  19. package/dist/rls/testing.d.mts +1 -1
  20. package/dist/rls/testing.d.ts +1 -1
  21. package/dist/rls/testing.mjs +1 -1
  22. package/dist/types.d.mts +21 -21
  23. package/dist/types.d.ts +21 -21
  24. package/package.json +4 -4
  25. package/dist/packem_shared/buildRlsReadRegistry-CA-aUi7I.mjs +0 -1
  26. package/dist/packem_shared/httpAction-C14NuF3V.mjs +0 -4
  27. package/dist/packem_shared/initLunora-DXCOVntr.mjs +0 -1
  28. package/dist/packem_shared/mask-DF7mtxQe.mjs +0 -1
  29. package/dist/packem_shared/optional-writer-override-CXXO30sZ.mjs +0 -1
  30. package/dist/packem_shared/plugin-CDBMGCeQ.mjs +0 -1
  31. package/dist/packem_shared/rls-tRDkICWZ.mjs +0 -1
  32. package/dist/packem_shared/storageRules-BptPZbi8.mjs +0 -1
@@ -93,7 +93,7 @@ type RelationWhere<DM, REL extends Record<keyof DM, object>, T extends keyof DM>
93
93
  /**
94
94
  * Relation-aware `where` tree — the column predicates of {@link Where} plus
95
95
  * Prisma-style relation predicates resolved by the `@lunora/do` pre-resolver.
96
- * `Where&lt;DM[T]>` stays the column-only structural mirror for back-compat; the
96
+ * `Where<DM[T]>` stays the column-only structural mirror for back-compat; the
97
97
  * table facade threads `REL` through this richer form.
98
98
  */
99
99
  type WhereOf<DM, REL extends Record<keyof DM, object>, T extends keyof DM> = RelationWhere<DM, REL, T> & { [K in keyof DM[T]]?: DM[T][K] | WhereOperators<DM[T][K]>; } & {
@@ -176,7 +176,7 @@ type SelectAlwaysKeep<DM, T extends keyof DM> = ("_creationTime" | "_id") & keyo
176
176
  */
177
177
  type ProjectDoc<DM, T extends keyof DM, S> = S extends ReadonlyArray<infer K> ? (K extends keyof DM[T] ? Pick<DM[T], (K & keyof DM[T]) | SelectAlwaysKeep<DM, T>> : DM[T]) : DM[T];
178
178
  /**
179
- * `Doc&lt;T>` narrowed to exactly the relations requested in the with-arg `W` and,
179
+ * `Doc<T>` narrowed to exactly the relations requested in the with-arg `W` and,
180
180
  * when a `select` tuple `S` is supplied, to its projected columns. `S` defaults
181
181
  * to `undefined` so the 4-argument form (the codegen-emitted callers) keeps the
182
182
  * full document.
@@ -207,7 +207,7 @@ interface RestrictableQueryOptionsOf<DM, REL extends Record<keyof DM, object>, T
207
207
  restrictsCounts?: boolean;
208
208
  where?: WhereOf<DM, REL, T>;
209
209
  }
210
- /** Args for `ctx.db.&lt;table>.aggregate({ op, field?, where? })`. */
210
+ /** Args for `ctx.db.<table>.aggregate({ op, field?, where? })`. */
211
211
  interface TableAggregateOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
212
212
  field?: keyof TDocument & string;
213
213
  op: AggregateOp;
@@ -217,7 +217,7 @@ interface TableAggregateOptionsOf<DM, REL extends Record<keyof DM, object>, T ex
217
217
  field?: keyof DM[T] & string;
218
218
  op: AggregateOp;
219
219
  }
220
- /** Args for `ctx.db.&lt;table>.groupBy({ by, agg?, where? })`. */
220
+ /** Args for `ctx.db.<table>.groupBy({ by, agg?, where? })`. */
221
221
  interface TableGroupByOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
222
222
  agg?: {
223
223
  field?: keyof TDocument & string;
@@ -238,7 +238,7 @@ interface GroupByEntry<TDocument> {
238
238
  key: Partial<TDocument>;
239
239
  value: null | number;
240
240
  }
241
- /** Args for `ctx.db.&lt;table>.rank(name, args)`. `row` is either an id or a row doc. */
241
+ /** Args for `ctx.db.<table>.rank(name, args)`. `row` is either an id or a row doc. */
242
242
  interface TableRankOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
243
243
  row: string | TDocument;
244
244
  }
@@ -247,7 +247,7 @@ interface RankResult {
247
247
  position: number;
248
248
  total: number;
249
249
  }
250
- /** Args for `ctx.db.&lt;table>.rankPage(name, args)`. */
250
+ /** Args for `ctx.db.<table>.rankPage(name, args)`. */
251
251
  interface TableRankPageOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
252
252
  cursor?: null | string;
253
253
  take?: number;
@@ -330,7 +330,7 @@ interface GeoReader<TDocument> {
330
330
  take: (limit: number) => Promise<TDocument[]>;
331
331
  unique: () => Promise<TDocument | null>;
332
332
  }
333
- /** Read-only typed table accessor exposed on `QueryCtx.db.&lt;table>`. */
333
+ /** Read-only typed table accessor exposed on `QueryCtx.db.<table>`. */
334
334
  interface TableReaderFacade<DM, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, T extends keyof DM, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> {
335
335
  /**
336
336
  * Reduce rows in this table to a scalar (`avg`/`max`/`min`/`sum` — `count`
@@ -395,7 +395,7 @@ interface TableReaderFacade<DM, REL extends Record<keyof DM, object>, RANK exten
395
395
  */
396
396
  withSearchIndex: (indexName: SEARCH[T], search: (q: SearchFilterBuilder<DM[T]>) => SearchFilterBuilder<DM[T]>) => SearchReader<DM[T]>;
397
397
  }
398
- /** Read-write typed table accessor exposed on `MutationCtx.db.&lt;table>` / `ActionCtx.db.&lt;table>`. */
398
+ /** Read-write typed table accessor exposed on `MutationCtx.db.<table>` / `ActionCtx.db.<table>`. */
399
399
  interface TableWriterFacade<DM, IM extends Record<keyof DM, object>, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, T extends keyof DM, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> extends TableReaderFacade<DM, REL, RANK, SEARCH, T, GEO> {
400
400
  /**
401
401
  * Delete a row by id. On a `.softDelete()` table this flips the marker column
@@ -505,8 +505,8 @@ interface TableWriterFacade<DM, IM extends Record<keyof DM, object>, REL extends
505
505
  }
506
506
  /** Conflict target for `upsert`/`upsertMany`: one column of table `T`, or a tuple of them. */
507
507
  type UpsertTargetOf<DM, T extends keyof DM> = ReadonlyArray<keyof DM[T] & string> | (keyof DM[T] & string);
508
- /** Per-table read facade — `ctx.db.&lt;table>` on a `QueryCtx`. */
508
+ /** Per-table read facade — `ctx.db.<table>` on a `QueryCtx`. */
509
509
  type DatabaseReaderFacade<DM, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> = { readonly [T in keyof DM]: TableReaderFacade<DM, REL, RANK, SEARCH, T, GEO>; };
510
- /** Per-table read-write facade — `ctx.db.&lt;table>` on a `MutationCtx` / `ActionCtx`. */
510
+ /** Per-table read-write facade — `ctx.db.<table>` on a `MutationCtx` / `ActionCtx`. */
511
511
  type DatabaseWriterFacade<DM, IM extends Record<keyof DM, object>, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> = { readonly [T in keyof DM]: TableWriterFacade<DM, IM, REL, RANK, SEARCH, T, GEO>; };
512
512
  export { AggregateOp, DatabaseReaderFacade, DatabaseWriterFacade, GeoBoundingBox, GeoFilterBuilder, GeoPointInput, GeoReader, GroupByEntry, Id, LoadWith, ManyRelationWhere, OneRelationWhere, OrderBy, QueryArgs, QueryArgsOf, QueryPage, RankPage, RankResult, RestrictableQueryOptions, RestrictableQueryOptionsOf, SearchFilterBuilder, SearchReader, TableAggregateOptions, TableAggregateOptionsOf, TableGroupByOptions, TableGroupByOptionsOf, TableRankOptions, TableRankPageOptions, TableReaderFacade, TableWriterFacade, UpsertTargetOf, Where, WhereOf, WhereOperators, WithArg };
@@ -93,7 +93,7 @@ type RelationWhere<DM, REL extends Record<keyof DM, object>, T extends keyof DM>
93
93
  /**
94
94
  * Relation-aware `where` tree — the column predicates of {@link Where} plus
95
95
  * Prisma-style relation predicates resolved by the `@lunora/do` pre-resolver.
96
- * `Where&lt;DM[T]>` stays the column-only structural mirror for back-compat; the
96
+ * `Where<DM[T]>` stays the column-only structural mirror for back-compat; the
97
97
  * table facade threads `REL` through this richer form.
98
98
  */
99
99
  type WhereOf<DM, REL extends Record<keyof DM, object>, T extends keyof DM> = RelationWhere<DM, REL, T> & { [K in keyof DM[T]]?: DM[T][K] | WhereOperators<DM[T][K]>; } & {
@@ -176,7 +176,7 @@ type SelectAlwaysKeep<DM, T extends keyof DM> = ("_creationTime" | "_id") & keyo
176
176
  */
177
177
  type ProjectDoc<DM, T extends keyof DM, S> = S extends ReadonlyArray<infer K> ? (K extends keyof DM[T] ? Pick<DM[T], (K & keyof DM[T]) | SelectAlwaysKeep<DM, T>> : DM[T]) : DM[T];
178
178
  /**
179
- * `Doc&lt;T>` narrowed to exactly the relations requested in the with-arg `W` and,
179
+ * `Doc<T>` narrowed to exactly the relations requested in the with-arg `W` and,
180
180
  * when a `select` tuple `S` is supplied, to its projected columns. `S` defaults
181
181
  * to `undefined` so the 4-argument form (the codegen-emitted callers) keeps the
182
182
  * full document.
@@ -207,7 +207,7 @@ interface RestrictableQueryOptionsOf<DM, REL extends Record<keyof DM, object>, T
207
207
  restrictsCounts?: boolean;
208
208
  where?: WhereOf<DM, REL, T>;
209
209
  }
210
- /** Args for `ctx.db.&lt;table>.aggregate({ op, field?, where? })`. */
210
+ /** Args for `ctx.db.<table>.aggregate({ op, field?, where? })`. */
211
211
  interface TableAggregateOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
212
212
  field?: keyof TDocument & string;
213
213
  op: AggregateOp;
@@ -217,7 +217,7 @@ interface TableAggregateOptionsOf<DM, REL extends Record<keyof DM, object>, T ex
217
217
  field?: keyof DM[T] & string;
218
218
  op: AggregateOp;
219
219
  }
220
- /** Args for `ctx.db.&lt;table>.groupBy({ by, agg?, where? })`. */
220
+ /** Args for `ctx.db.<table>.groupBy({ by, agg?, where? })`. */
221
221
  interface TableGroupByOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
222
222
  agg?: {
223
223
  field?: keyof TDocument & string;
@@ -238,7 +238,7 @@ interface GroupByEntry<TDocument> {
238
238
  key: Partial<TDocument>;
239
239
  value: null | number;
240
240
  }
241
- /** Args for `ctx.db.&lt;table>.rank(name, args)`. `row` is either an id or a row doc. */
241
+ /** Args for `ctx.db.<table>.rank(name, args)`. `row` is either an id or a row doc. */
242
242
  interface TableRankOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
243
243
  row: string | TDocument;
244
244
  }
@@ -247,7 +247,7 @@ interface RankResult {
247
247
  position: number;
248
248
  total: number;
249
249
  }
250
- /** Args for `ctx.db.&lt;table>.rankPage(name, args)`. */
250
+ /** Args for `ctx.db.<table>.rankPage(name, args)`. */
251
251
  interface TableRankPageOptions<TDocument> extends RestrictableQueryOptions<TDocument> {
252
252
  cursor?: null | string;
253
253
  take?: number;
@@ -330,7 +330,7 @@ interface GeoReader<TDocument> {
330
330
  take: (limit: number) => Promise<TDocument[]>;
331
331
  unique: () => Promise<TDocument | null>;
332
332
  }
333
- /** Read-only typed table accessor exposed on `QueryCtx.db.&lt;table>`. */
333
+ /** Read-only typed table accessor exposed on `QueryCtx.db.<table>`. */
334
334
  interface TableReaderFacade<DM, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, T extends keyof DM, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> {
335
335
  /**
336
336
  * Reduce rows in this table to a scalar (`avg`/`max`/`min`/`sum` — `count`
@@ -395,7 +395,7 @@ interface TableReaderFacade<DM, REL extends Record<keyof DM, object>, RANK exten
395
395
  */
396
396
  withSearchIndex: (indexName: SEARCH[T], search: (q: SearchFilterBuilder<DM[T]>) => SearchFilterBuilder<DM[T]>) => SearchReader<DM[T]>;
397
397
  }
398
- /** Read-write typed table accessor exposed on `MutationCtx.db.&lt;table>` / `ActionCtx.db.&lt;table>`. */
398
+ /** Read-write typed table accessor exposed on `MutationCtx.db.<table>` / `ActionCtx.db.<table>`. */
399
399
  interface TableWriterFacade<DM, IM extends Record<keyof DM, object>, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, T extends keyof DM, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> extends TableReaderFacade<DM, REL, RANK, SEARCH, T, GEO> {
400
400
  /**
401
401
  * Delete a row by id. On a `.softDelete()` table this flips the marker column
@@ -505,8 +505,8 @@ interface TableWriterFacade<DM, IM extends Record<keyof DM, object>, REL extends
505
505
  }
506
506
  /** Conflict target for `upsert`/`upsertMany`: one column of table `T`, or a tuple of them. */
507
507
  type UpsertTargetOf<DM, T extends keyof DM> = ReadonlyArray<keyof DM[T] & string> | (keyof DM[T] & string);
508
- /** Per-table read facade — `ctx.db.&lt;table>` on a `QueryCtx`. */
508
+ /** Per-table read facade — `ctx.db.<table>` on a `QueryCtx`. */
509
509
  type DatabaseReaderFacade<DM, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> = { readonly [T in keyof DM]: TableReaderFacade<DM, REL, RANK, SEARCH, T, GEO>; };
510
- /** Per-table read-write facade — `ctx.db.&lt;table>` on a `MutationCtx` / `ActionCtx`. */
510
+ /** Per-table read-write facade — `ctx.db.<table>` on a `MutationCtx` / `ActionCtx`. */
511
511
  type DatabaseWriterFacade<DM, IM extends Record<keyof DM, object>, REL extends Record<keyof DM, object>, RANK extends Record<keyof DM, string>, SEARCH extends Record<keyof DM, string>, GEO extends Record<keyof DM, string> = Record<keyof DM, never>> = { readonly [T in keyof DM]: TableWriterFacade<DM, IM, REL, RANK, SEARCH, T, GEO>; };
512
512
  export { AggregateOp, DatabaseReaderFacade, DatabaseWriterFacade, GeoBoundingBox, GeoFilterBuilder, GeoPointInput, GeoReader, GroupByEntry, Id, LoadWith, ManyRelationWhere, OneRelationWhere, OrderBy, QueryArgs, QueryArgsOf, QueryPage, RankPage, RankResult, RestrictableQueryOptions, RestrictableQueryOptionsOf, SearchFilterBuilder, SearchReader, TableAggregateOptions, TableAggregateOptionsOf, TableGroupByOptions, TableGroupByOptionsOf, TableRankOptions, TableRankPageOptions, TableReaderFacade, TableWriterFacade, UpsertTargetOf, Where, WhereOf, WhereOperators, WithArg };