@lpdjs/firestore-repo-service 3.0.14 → 3.0.16
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/actor-context-DQZgWqj3.d.cts +117 -0
- package/dist/actor-context-DQZgWqj3.d.ts +117 -0
- package/dist/{create-servers-BwbKPcBG.d.cts → create-servers-BMpE8oAc.d.cts} +11 -5
- package/dist/{create-servers-DVCB8BKC.d.ts → create-servers-DSXdPM6o.d.ts} +11 -5
- package/dist/history/index.cjs +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +67 -7
- package/dist/history/index.d.ts +67 -7
- package/dist/history/index.js +1 -1
- package/dist/history/index.js.map +1 -1
- package/dist/index.cjs +81 -81
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -10
- package/dist/index.d.ts +12 -10
- package/dist/index.js +81 -81
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +1 -1
- package/dist/llms.txt +1 -1
- package/dist/{openapi-B0s5qVSg.d.ts → openapi-CKTuB2Yz.d.ts} +1 -1
- package/dist/{openapi-DZp7mW-s.d.cts → openapi-Cb3QMU0Q.d.cts} +1 -1
- package/dist/{queue-aNhdaNGW.d.ts → queue-NFod6hTT.d.ts} +1 -1
- package/dist/{queue-B0rkiPZF.d.cts → queue-zw2B7GPx.d.cts} +1 -1
- package/dist/{read-15-TcgCz.d.ts → read-BPov7lws.d.ts} +30 -7
- package/dist/{read-B15YaPyR.d.cts → read-Dfah1PPl.d.cts} +30 -7
- package/dist/{rules-DNJV8yxi.d.ts → rules-DY5f_wPw.d.ts} +1 -1
- package/dist/{rules-BV3-D08Y.d.cts → rules-DhNUzbIl.d.cts} +1 -1
- package/dist/servers/admin/index.cjs +6 -6
- package/dist/servers/admin/index.cjs.map +1 -1
- package/dist/servers/admin/index.d.cts +6 -5
- package/dist/servers/admin/index.d.ts +6 -5
- package/dist/servers/admin/index.js +6 -6
- package/dist/servers/admin/index.js.map +1 -1
- package/dist/servers/crud/index.cjs +2 -2
- package/dist/servers/crud/index.cjs.map +1 -1
- package/dist/servers/crud/index.d.cts +10 -9
- package/dist/servers/crud/index.d.ts +10 -9
- package/dist/servers/crud/index.js +2 -2
- package/dist/servers/crud/index.js.map +1 -1
- package/dist/servers/hono/index.cjs +14 -14
- package/dist/servers/hono/index.cjs.map +1 -1
- package/dist/servers/hono/index.d.cts +11 -3
- package/dist/servers/hono/index.d.ts +11 -3
- package/dist/servers/hono/index.js +14 -14
- package/dist/servers/hono/index.js.map +1 -1
- package/dist/servers/index.cjs +94 -94
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +13 -12
- package/dist/servers/index.d.ts +13 -12
- package/dist/servers/index.js +94 -94
- package/dist/servers/index.js.map +1 -1
- package/dist/sync/bigquery.d.cts +2 -2
- package/dist/sync/bigquery.d.ts +2 -2
- package/dist/sync/index.cjs +55 -55
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +6 -6
- package/dist/sync/index.d.ts +6 -6
- package/dist/sync/index.js +55 -55
- package/dist/sync/index.js.map +1 -1
- package/dist/sync/meilisearch.cjs +2 -2
- package/dist/sync/meilisearch.cjs.map +1 -1
- package/dist/sync/meilisearch.d.cts +2 -2
- package/dist/sync/meilisearch.d.ts +2 -2
- package/dist/sync/meilisearch.js +2 -2
- package/dist/sync/meilisearch.js.map +1 -1
- package/dist/{types-o-9qoExc.d.cts → types-BDTx8VPg.d.cts} +8 -0
- package/dist/{types-dDxiibCW.d.ts → types-B_FrzmO4.d.ts} +1 -1
- package/dist/{types-BuggDko0.d.ts → types-CaCBG76r.d.ts} +82 -49
- package/dist/{types--RamYGF1.d.cts → types-D6zvWzRt.d.cts} +96 -2
- package/dist/{types--RamYGF1.d.ts → types-D6zvWzRt.d.ts} +96 -2
- package/dist/{types-Dvst2iLQ.d.cts → types-D78FPJeF.d.cts} +1 -1
- package/dist/{types-BFu2DpKn.d.cts → types-Dc3lX99O.d.cts} +1 -1
- package/dist/{types-BvJYEGa1.d.ts → types-DgFJLwAu.d.ts} +1 -1
- package/dist/{types-Cko118ZS.d.cts → types-mKcJozu4.d.cts} +82 -49
- package/dist/{types-D3W_RaDA.d.ts → types-w1rEqs0Z.d.ts} +8 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { b as AuthUser } from './firebase-auth-nG3prKoj.cjs';
|
|
2
|
-
import { H as HonoServerOptions, O as OpenAPIConfig } from './types-
|
|
2
|
+
import { H as HonoServerOptions, O as OpenAPIConfig } from './types-BDTx8VPg.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { HttpsOptions } from 'firebase-functions/v2/https';
|
|
5
|
-
import { H as HistoryMethods } from './read-
|
|
5
|
+
import { H as HistoryMethods } from './read-Dfah1PPl.cjs';
|
|
6
6
|
import { DocumentSnapshot, Query, CollectionReference, WriteBatch, Transaction, DocumentReference } from 'firebase-admin/firestore';
|
|
7
|
-
import { Q as QueryOptions, R as RepositoryConfig, G as GetOptions, g as GetResult, i as ExtractReturnDoc, a as RelationConfig, D as DeepPartial, b as DotNotationUpdate, F as FieldPath } from './types-
|
|
7
|
+
import { Q as QueryOptions, R as RepositoryConfig, G as GetOptions, g as GetResult, i as ExtractReturnDoc, a as RelationConfig, D as DeepPartial, b as DotNotationUpdate, F as FieldPath } from './types-Dc3lX99O.cjs';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Pagination result with data and cursor information
|
|
@@ -222,6 +222,18 @@ type IncludeConfigTyped<TRelationalKeys, K extends keyof TRelationalKeys = keyof
|
|
|
222
222
|
/** Fields to select from the related documents (typed to target model) */
|
|
223
223
|
select?: (keyof ExtractTargetModel<TRelationalKeys[K]>)[];
|
|
224
224
|
} : never;
|
|
225
|
+
/**
|
|
226
|
+
* `true` when `T` is `any` (the `0 extends (1 & T)` trick).
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
type IsAny$1<T> = 0 extends 1 & T ? true : false;
|
|
230
|
+
/**
|
|
231
|
+
* `keyof T` for concrete models, or `any` when `T` is `any` (avoiding
|
|
232
|
+
* `keyof any = string | number | symbol` which breaks contravariant method
|
|
233
|
+
* assignability to `ConfiguredRepository<any>`).
|
|
234
|
+
* @internal
|
|
235
|
+
*/
|
|
236
|
+
type FieldKeyOf<T> = IsAny$1<T> extends true ? any : keyof T;
|
|
225
237
|
/**
|
|
226
238
|
* Typed pagination options with include support
|
|
227
239
|
*/
|
|
@@ -230,25 +242,25 @@ interface PaginationWithIncludeOptionsTyped<T, TRelationalKeys, K extends keyof
|
|
|
230
242
|
cursor?: any;
|
|
231
243
|
direction?: "next" | "prev";
|
|
232
244
|
orderBy?: {
|
|
233
|
-
field:
|
|
245
|
+
field: FieldKeyOf<T>;
|
|
234
246
|
direction?: "asc" | "desc";
|
|
235
247
|
}[];
|
|
236
|
-
where?: [
|
|
248
|
+
where?: [FieldKeyOf<T>, any, any][];
|
|
237
249
|
/**
|
|
238
250
|
* Simple OR: each clause is independently OR'd with the others.
|
|
239
251
|
* Base `where` conditions are applied to every OR branch.
|
|
240
252
|
* @example
|
|
241
253
|
* orWhere: [["status", "==", "draft"], ["status", "==", "published"]]
|
|
242
254
|
*/
|
|
243
|
-
orWhere?: [
|
|
255
|
+
orWhere?: [FieldKeyOf<T>, any, any][];
|
|
244
256
|
/**
|
|
245
257
|
* Advanced OR: each element is a GROUP of AND conditions, groups are OR'd.
|
|
246
258
|
* Base `where` conditions are applied to every group.
|
|
247
259
|
*/
|
|
248
|
-
orWhereGroups?: [
|
|
249
|
-
select?:
|
|
260
|
+
orWhereGroups?: [FieldKeyOf<T>, any, any][][];
|
|
261
|
+
select?: FieldKeyOf<T>[];
|
|
250
262
|
/** Relations to include - can be relation keys or typed IncludeConfig */
|
|
251
|
-
include?: (K | IncludeConfigTyped<TRelationalKeys>)[];
|
|
263
|
+
include?: IsAny$1<TRelationalKeys> extends true ? any[] : (K | IncludeConfigTyped<TRelationalKeys>)[];
|
|
252
264
|
}
|
|
253
265
|
/**
|
|
254
266
|
* Helper type to get the system keys (documentKey + pathKey + updatedKey) that should be excluded from updates
|
|
@@ -260,12 +272,12 @@ type SystemKeys<T extends RepositoryConfig<any, any, any, any, any, any, any, an
|
|
|
260
272
|
* and supports deep-partial nested objects as well as dot-notation paths (e.g. "address.city").
|
|
261
273
|
* @internal
|
|
262
274
|
*/
|
|
263
|
-
type UpdatableData<T extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> = DeepPartial<Omit<T["type"], SystemKeys<T>>> & DotNotationUpdate<Omit<T["type"], SystemKeys<T>>>;
|
|
275
|
+
type UpdatableData<T extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> = IsAny$1<T> extends true ? any : DeepPartial<Omit<T["type"], SystemKeys<T>>> & DotNotationUpdate<Omit<T["type"], SystemKeys<T>>>;
|
|
264
276
|
/**
|
|
265
277
|
* Type for create data - excludes pathKey, createdKey and updatedKey (auto-managed), documentKey is optional
|
|
266
278
|
* @internal
|
|
267
279
|
*/
|
|
268
|
-
type CreateData<T extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> = Omit<T["type"], T["documentKey"] | Extract<T["pathKey"], keyof T["type"]> | Extract<T["createdKey"], keyof T["type"]> | Extract<T["updatedKey"], keyof T["type"]>> & {
|
|
280
|
+
type CreateData<T extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> = IsAny$1<T> extends true ? any : Omit<T["type"], T["documentKey"] | Extract<T["pathKey"], keyof T["type"]> | Extract<T["createdKey"], keyof T["type"]> | Extract<T["updatedKey"], keyof T["type"]>> & {
|
|
269
281
|
[K in T["documentKey"]]?: T["type"][K];
|
|
270
282
|
};
|
|
271
283
|
/**
|
|
@@ -305,9 +317,28 @@ type GenerateQueryMethods<TConfig extends RepositoryConfig<any, any, any, any, a
|
|
|
305
317
|
[K in TConfig["queryKeys"][number] as K extends string ? `by${Capitalize<K>}` : never]: (value: TConfig["type"][K], options?: QueryOptions<TConfig["type"]>) => Promise<TConfig["type"][]>;
|
|
306
318
|
};
|
|
307
319
|
/**
|
|
308
|
-
*
|
|
320
|
+
* Conditional `history` namespace property derived from `THistoryEnabled`:
|
|
321
|
+
* - `ConfiguredRepository<any>` → optional `{ history?: HistoryMethods<any, any[]> }`
|
|
322
|
+
* - `history: { enabled: true }` → required `{ history: HistoryMethods<T, PathArgs> }`
|
|
323
|
+
* - `history` omitted or `enabled: false` → `{}` (`history` is absent from the type)
|
|
324
|
+
* - dynamic `enabled: boolean` → optional `{ history?: HistoryMethods<T, PathArgs> }`
|
|
325
|
+
* @internal
|
|
309
326
|
*/
|
|
310
|
-
type
|
|
327
|
+
type HistoryProperty<T> = IsAny$1<T> extends true ? {
|
|
328
|
+
history?: HistoryMethods<any, any[]>;
|
|
329
|
+
} : T extends RepositoryConfig<infer TModel, any, any, any, any, any, any, any, any, any, infer THistoryEnabled> ? [THistoryEnabled] extends [true] ? {
|
|
330
|
+
history: HistoryMethods<TModel, T["documentRef"] extends (...args: infer P) => any ? P : any[]>;
|
|
331
|
+
} : [THistoryEnabled] extends [false] ? {} : {
|
|
332
|
+
history?: HistoryMethods<TModel, T["documentRef"] extends (...args: infer P) => any ? P : any[]>;
|
|
333
|
+
} : {};
|
|
334
|
+
/**
|
|
335
|
+
* Core methods shared by every configured repository. Kept as a dedicated named
|
|
336
|
+
* alias so TypeScript's type-argument shortcut keeps `ConfiguredRepository<T>`
|
|
337
|
+
* assignable to `ConfiguredRepository<any>` even with the conditional
|
|
338
|
+
* {@link HistoryProperty} intersection.
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
type ConfiguredRepositoryBase<T extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> = {
|
|
311
342
|
/** @internal Phantom property to expose the model type for generic extraction */
|
|
312
343
|
readonly _modelType: T["type"];
|
|
313
344
|
/** @internal Whether this is a collectionGroup repository */
|
|
@@ -328,7 +359,7 @@ type ConfiguredRepository<T extends RepositoryConfig<any, any, any, any, any, an
|
|
|
328
359
|
] extends [never] ? PaginationResult<T["type"]> : PaginationResult<T["type"] & {
|
|
329
360
|
populated: Record<string, any>;
|
|
330
361
|
}>>;
|
|
331
|
-
paginateAll
|
|
362
|
+
paginateAll(options: Omit<PaginationWithIncludeOptionsTyped<T["type"], NonNullable<T["relationalKeys"]>, keyof NonNullable<T["relationalKeys"]>>, "cursor" | "direction">): ReturnType<typeof createPaginationIterator<T["type"]>>;
|
|
332
363
|
};
|
|
333
364
|
aggregate: {
|
|
334
365
|
count: (options?: QueryOptions<T["type"]>) => Promise<number>;
|
|
@@ -336,57 +367,57 @@ type ConfiguredRepository<T extends RepositoryConfig<any, any, any, any, any, an
|
|
|
336
367
|
average: <K extends keyof T["type"]>(field: K, options?: QueryOptions<T["type"]>) => Promise<number | null>;
|
|
337
368
|
};
|
|
338
369
|
documentRef: T["documentRef"];
|
|
339
|
-
create
|
|
340
|
-
set
|
|
370
|
+
create(data: CreateData<T>): Promise<T["type"]>;
|
|
371
|
+
set(...args: [
|
|
341
372
|
...Parameters<T["documentRef"]>,
|
|
342
373
|
UpdatableData<T>,
|
|
343
374
|
{
|
|
344
375
|
merge?: boolean;
|
|
345
376
|
}?
|
|
346
|
-
])
|
|
347
|
-
update
|
|
348
|
-
delete
|
|
377
|
+
]): Promise<T["type"]>;
|
|
378
|
+
update(...args: [...Parameters<T["documentRef"]>, UpdatableData<T>]): Promise<T["type"]>;
|
|
379
|
+
delete(...args: Parameters<T["documentRef"]>): Promise<void>;
|
|
349
380
|
batch: {
|
|
350
|
-
create
|
|
381
|
+
create(): {
|
|
351
382
|
batch: WriteBatch;
|
|
352
|
-
set
|
|
383
|
+
set(...args: [
|
|
353
384
|
...Parameters<T["documentRef"]>,
|
|
354
385
|
UpdatableData<T>,
|
|
355
386
|
{
|
|
356
387
|
merge?: boolean;
|
|
357
388
|
}?
|
|
358
|
-
])
|
|
359
|
-
update
|
|
360
|
-
delete
|
|
361
|
-
commit
|
|
389
|
+
]): void;
|
|
390
|
+
update(...args: [...Parameters<T["documentRef"]>, UpdatableData<T>]): void;
|
|
391
|
+
delete(...args: Parameters<T["documentRef"]>): void;
|
|
392
|
+
commit(): Promise<void>;
|
|
362
393
|
};
|
|
363
394
|
};
|
|
364
395
|
transaction: {
|
|
365
|
-
run
|
|
366
|
-
get
|
|
367
|
-
set
|
|
396
|
+
run<R>(updateFunction: (transaction: {
|
|
397
|
+
get(...args: Parameters<T["documentRef"]>): Promise<T["type"] | null>;
|
|
398
|
+
set(...args: [
|
|
368
399
|
...Parameters<T["documentRef"]>,
|
|
369
400
|
UpdatableData<T>,
|
|
370
401
|
{
|
|
371
402
|
merge?: boolean;
|
|
372
403
|
}?
|
|
373
|
-
])
|
|
374
|
-
update
|
|
375
|
-
delete
|
|
404
|
+
]): void;
|
|
405
|
+
update(...args: [...Parameters<T["documentRef"]>, UpdatableData<T>]): void;
|
|
406
|
+
delete(...args: Parameters<T["documentRef"]>): void;
|
|
376
407
|
raw: Transaction;
|
|
377
|
-
}) => Promise<R>)
|
|
408
|
+
}) => Promise<R>): Promise<R>;
|
|
378
409
|
};
|
|
379
410
|
bulk: {
|
|
380
|
-
set
|
|
411
|
+
set(items: Array<{
|
|
381
412
|
docRef: DocumentReference;
|
|
382
413
|
data: UpdatableData<T>;
|
|
383
414
|
merge?: boolean;
|
|
384
|
-
}>)
|
|
385
|
-
update
|
|
415
|
+
}>): Promise<void>;
|
|
416
|
+
update(items: Array<{
|
|
386
417
|
docRef: DocumentReference;
|
|
387
418
|
data: UpdatableData<T>;
|
|
388
|
-
}>)
|
|
389
|
-
delete
|
|
419
|
+
}>): Promise<void>;
|
|
420
|
+
delete(docRefs: DocumentReference[]): Promise<void>;
|
|
390
421
|
};
|
|
391
422
|
/**
|
|
392
423
|
* Collection-wide maintenance helpers. `backfillKeys` fills the auto-managed
|
|
@@ -394,19 +425,21 @@ type ConfiguredRepository<T extends RepositoryConfig<any, any, any, any, any, an
|
|
|
394
425
|
* documents written outside this package — idempotent and write-minimal.
|
|
395
426
|
*/
|
|
396
427
|
system: {
|
|
397
|
-
backfillKeys
|
|
428
|
+
backfillKeys(options?: SystemBackfillOptions): Promise<SystemBackfillResult>;
|
|
398
429
|
};
|
|
399
|
-
populate
|
|
430
|
+
populate<K extends keyof NonNullable<T["relationalKeys"]>, TDoc extends Pick<T["type"], K & keyof T["type"]>>(document: TDoc, relationKeyOrOptions: K | K[] | PopulateOptionsTyped<NonNullable<T["relationalKeys"]>, K>): Promise<TDoc & {
|
|
400
431
|
populated: UnionToIntersection<K extends keyof NonNullable<T["relationalKeys"]> ? ExtractPopulatedFromRelation<NonNullable<T["relationalKeys"]>[K], K & string> : Record<string, never>>;
|
|
401
432
|
}>;
|
|
402
|
-
/**
|
|
403
|
-
* Change-history namespace. Present at the type level when the repo is
|
|
404
|
-
* configured with `history.enabled: true`, otherwise `undefined` at runtime.
|
|
405
|
-
* Kept optional (rather than conditional) so `ConfiguredRepository<any>`
|
|
406
|
-
* stays assignable from any concrete repo config.
|
|
407
|
-
*/
|
|
408
|
-
history?: HistoryMethods<T["type"], Parameters<T["documentRef"]>>;
|
|
409
433
|
};
|
|
434
|
+
/**
|
|
435
|
+
* Configured repository with organized methods.
|
|
436
|
+
*
|
|
437
|
+
* The `history` namespace is typed conditionally from `history.enabled`:
|
|
438
|
+
* - `history: { enabled: true }` → `repo.history` is required (no `!` / `?.` needed)
|
|
439
|
+
* - `history` omitted or `enabled: false` → `repo.history` is absent from the type
|
|
440
|
+
* - dynamic `enabled: boolean` → `repo.history` is optional (`HistoryMethods | undefined`)
|
|
441
|
+
*/
|
|
442
|
+
type ConfiguredRepository<T extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> = ConfiguredRepositoryBase<T> & HistoryProperty<T>;
|
|
410
443
|
|
|
411
444
|
interface PageOptions {
|
|
412
445
|
title: string;
|
|
@@ -562,13 +595,13 @@ interface OpenAPISpecOptions {
|
|
|
562
595
|
* `createRepositoryConfig(schema)`).
|
|
563
596
|
* @internal
|
|
564
597
|
*/
|
|
565
|
-
type RepoModelType<TRepo> = TRepo extends ConfiguredRepository<infer C
|
|
598
|
+
type RepoModelType<TRepo> = TRepo extends ConfiguredRepository<infer C extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> ? C extends RepositoryConfig<infer T, any, any, any, any, any, any, any, any, any, any> ? T : never : never;
|
|
566
599
|
/**
|
|
567
600
|
* Extracts the auto-managed system keys (documentKey, pathKey, createdKey, updatedKey)
|
|
568
601
|
* from a `ConfiguredRepository`. These keys must never appear in create/update payloads.
|
|
569
602
|
* @internal
|
|
570
603
|
*/
|
|
571
|
-
type RepoSystemKeys<TRepo> = TRepo extends ConfiguredRepository<infer C
|
|
604
|
+
type RepoSystemKeys<TRepo> = TRepo extends ConfiguredRepository<infer C extends RepositoryConfig<any, any, any, any, any, any, any, any, any, any, any>> ? C extends RepositoryConfig<any, any, any, any, any, any, infer TDocKey, infer TPathKey, infer TCreatedKey, infer TUpdatedKey, any> ? (TDocKey extends string ? TDocKey : never) | (TPathKey extends string ? TPathKey : never) | (TCreatedKey extends string ? TCreatedKey : never) | (TUpdatedKey extends string ? TUpdatedKey : never) : never : never;
|
|
572
605
|
/**
|
|
573
606
|
* `true` when `T` is `any` (the `0 extends (1 & T)` trick).
|
|
574
607
|
* @internal
|
|
@@ -1020,7 +1053,7 @@ interface QueryRequestBody {
|
|
|
1020
1053
|
*/
|
|
1021
1054
|
select?: string[];
|
|
1022
1055
|
/**
|
|
1023
|
-
* Number of items per page (max
|
|
1056
|
+
* Number of items per page (min 1, max 1000).
|
|
1024
1057
|
* @default 25
|
|
1025
1058
|
*/
|
|
1026
1059
|
pageSize?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z, ZodError } from 'zod';
|
|
2
2
|
import { Env, Context, MiddlewareHandler } from 'hono';
|
|
3
3
|
import { F as FirebaseAdminAuthLike, D as DecodedIdTokenLike } from './firebase-auth-nG3prKoj.js';
|
|
4
|
+
import { A as ActorResolverOption } from './actor-context-DQZgWqj3.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Global DI services container for the Hono server.
|
|
@@ -855,6 +856,13 @@ interface HonoServerOptions<TEnv extends Env = Env> {
|
|
|
855
856
|
* project — declare it once and pass it to {@link createApiRegistry}.
|
|
856
857
|
*/
|
|
857
858
|
services?: AnyServicesContainer;
|
|
859
|
+
/**
|
|
860
|
+
* Optional resolver (function or declarative field config) used to extract
|
|
861
|
+
* the authenticated actor from the Hono `Context` for automatic history
|
|
862
|
+
* shadow metadata injection. Defaults to {@link defaultActorResolver}
|
|
863
|
+
* (`c.get("user") ?? c.get("docsUser")`).
|
|
864
|
+
*/
|
|
865
|
+
actorResolver?: ActorResolverOption;
|
|
858
866
|
}
|
|
859
867
|
|
|
860
868
|
export { basicAuth as N, createRequestContextMiddleware as Q, createServices as T, defineRoutes as U, ValidationError as V, firebaseBearerAuth as W, firebaseDocsAuth as X, isDocsAuthExtension as Y, withRequestContext as Z };
|