@lpdjs/firestore-repo-service 3.0.11 → 3.0.13

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 (60) hide show
  1. package/README.md +27 -14
  2. package/dist/{create-servers-KRf2J2fi.d.ts → create-servers-Db1xUY2N.d.ts} +4 -4
  3. package/dist/{create-servers-DQBvtkBM.d.cts → create-servers-LyRLAOh3.d.cts} +4 -4
  4. package/dist/history/index.cjs +1 -1
  5. package/dist/history/index.cjs.map +1 -1
  6. package/dist/history/index.js +1 -1
  7. package/dist/history/index.js.map +1 -1
  8. package/dist/index.cjs +69 -69
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +19 -15
  11. package/dist/index.d.ts +19 -15
  12. package/dist/index.js +69 -69
  13. package/dist/index.js.map +1 -1
  14. package/dist/llms-full.txt +36 -23
  15. package/dist/llms.txt +2 -2
  16. package/dist/{openapi-CzrvqcOE.d.ts → openapi-CNIA7QRw.d.ts} +1 -1
  17. package/dist/{openapi-DK7pS1zN.d.cts → openapi-QVpqnnes.d.cts} +1 -1
  18. package/dist/{queue-HoGBozpD.d.ts → queue-BEB-ujA3.d.ts} +1 -1
  19. package/dist/{queue-CdmBSUNN.d.cts → queue-CpHe6M5j.d.cts} +1 -1
  20. package/dist/{rules-Bu2WJoLI.d.cts → rules-Bu2NB7Eb.d.cts} +1 -1
  21. package/dist/{rules-gKR5VFhO.d.ts → rules-Cafrkb9v.d.ts} +1 -1
  22. package/dist/servers/admin/index.cjs +26 -26
  23. package/dist/servers/admin/index.cjs.map +1 -1
  24. package/dist/servers/admin/index.d.cts +3 -1
  25. package/dist/servers/admin/index.d.ts +3 -1
  26. package/dist/servers/admin/index.js +26 -26
  27. package/dist/servers/admin/index.js.map +1 -1
  28. package/dist/servers/crud/index.cjs +2 -2
  29. package/dist/servers/crud/index.cjs.map +1 -1
  30. package/dist/servers/crud/index.d.cts +6 -6
  31. package/dist/servers/crud/index.d.ts +6 -6
  32. package/dist/servers/crud/index.js +2 -2
  33. package/dist/servers/crud/index.js.map +1 -1
  34. package/dist/servers/hono/index.cjs +12 -12
  35. package/dist/servers/hono/index.cjs.map +1 -1
  36. package/dist/servers/hono/index.js +12 -12
  37. package/dist/servers/hono/index.js.map +1 -1
  38. package/dist/servers/index.cjs +88 -88
  39. package/dist/servers/index.cjs.map +1 -1
  40. package/dist/servers/index.d.cts +8 -8
  41. package/dist/servers/index.d.ts +8 -8
  42. package/dist/servers/index.js +88 -88
  43. package/dist/servers/index.js.map +1 -1
  44. package/dist/sync/bigquery.d.cts +1 -1
  45. package/dist/sync/bigquery.d.ts +1 -1
  46. package/dist/sync/index.cjs +41 -41
  47. package/dist/sync/index.cjs.map +1 -1
  48. package/dist/sync/index.d.cts +5 -5
  49. package/dist/sync/index.d.ts +5 -5
  50. package/dist/sync/index.js +41 -41
  51. package/dist/sync/index.js.map +1 -1
  52. package/dist/sync/meilisearch.d.cts +1 -1
  53. package/dist/sync/meilisearch.d.ts +1 -1
  54. package/dist/{types-DZoEAKT7.d.cts → types-B51LYvQZ.d.cts} +58 -7
  55. package/dist/{types-8Yoacm2k.d.cts → types-CNseHqF7.d.cts} +4 -2
  56. package/dist/{types-DiGFAWPA.d.ts → types-Ci0dGbuW.d.ts} +58 -7
  57. package/dist/{types-DzJ9WrcY.d.ts → types-DGQURFSq.d.ts} +1 -1
  58. package/dist/{types-DRKB8gTA.d.ts → types-DmXW_fVz.d.ts} +4 -2
  59. package/dist/{types-KEVZXCF4.d.cts → types-VVuLlmfc.d.cts} +1 -1
  60. package/package.json +3 -2
@@ -4,7 +4,7 @@ import '../firebase-auth-nG3prKoj.cjs';
4
4
  import 'firebase-functions/v2/firestore';
5
5
  import 'firebase-functions/v2/https';
6
6
  import 'firebase-functions/v2/pubsub';
7
- import '../types-DZoEAKT7.cjs';
7
+ import '../types-B51LYvQZ.cjs';
8
8
  import '../types--RamYGF1.cjs';
9
9
  import 'firebase-admin/firestore';
10
10
 
@@ -4,7 +4,7 @@ import '../firebase-auth-nG3prKoj.js';
4
4
  import 'firebase-functions/v2/firestore';
5
5
  import 'firebase-functions/v2/https';
6
6
  import 'firebase-functions/v2/pubsub';
7
- import '../types-DiGFAWPA.js';
7
+ import '../types-Ci0dGbuW.js';
8
8
  import '../types--RamYGF1.js';
9
9
  import 'firebase-admin/firestore';
10
10
 
@@ -7,6 +7,36 @@ import { DocumentReference, Firestore, DocumentSnapshot, WhereFilterOp } from 'f
7
7
  * @internal
8
8
  */
9
9
  type ExtractDocumentRefSignature<T> = T extends (db: Firestore, ...args: infer P) => DocumentReference ? (...args: P) => DocumentReference : never;
10
+ /**
11
+ * Extract all `{param}` names from a path template string in left-to-right order.
12
+ * @example ExtractPathParams<"prevention/prev_rules/prev_workshops/{workshopId}/prev_events"> // ["workshopId"]
13
+ */
14
+ type ExtractPathParams<TPath extends string> = string extends TPath ? [] : TPath extends `${string}{${infer Param}}${infer Rest}` ? [Param, ...ExtractPathParams<Rest>] : [];
15
+ /**
16
+ * Extract dynamic parent key names from a path template (strips trailing `/{documentKey}` if present).
17
+ */
18
+ type ExtractParentParams<TPath extends string, TDocumentKey extends string> = ExtractPathParams<TPath> extends [
19
+ ...infer Parents extends string[],
20
+ TDocumentKey
21
+ ] ? Parents : ExtractPathParams<TPath>;
22
+ /**
23
+ * Detect `{param}` names in `TPath` that are not valid keys of `TModel`.
24
+ */
25
+ type InvalidPathParams<TPath extends string, TModel> = Exclude<ExtractPathParams<TPath>[number], keyof TModel & string>;
26
+ /**
27
+ * Constrain `TPath` so every `{param}` placeholder must be a strict `keyof TModel`.
28
+ */
29
+ type ValidatedPath<TPath extends string, TModel> = string extends TPath ? TPath : [InvalidPathParams<TPath, TModel>] extends [never] ? TPath : `Invalid path parameter(s): {${InvalidPathParams<TPath, TModel>}} — must be keyof model (${keyof TModel & string})`;
30
+ /**
31
+ * Convert an ordered tuple of parent key names into a positional string parameter tuple followed by `docId: string`.
32
+ * @internal
33
+ */
34
+ type PathParamsToArgsTuple<TParams extends readonly string[]> = [
35
+ ...{
36
+ [I in keyof TParams]: string;
37
+ },
38
+ docId: string
39
+ ];
10
40
  /**
11
41
  * `true` when `T` is `any` (the `0 extends (1 & T)` trick).
12
42
  * @internal
@@ -18,10 +48,18 @@ type IsAny<T> = 0 extends 1 & T ? true : false;
18
48
  */
19
49
  type ExtractUpdateSignature<T, TType> = T extends (db: Firestore, ...args: infer P) => DocumentReference ? (...args: [...P, DeepPartial<TType> & DotNotationUpdate<TType>]) => Promise<TType> : never;
20
50
  /**
21
- * Check if a type is a plain object (not Date, Array, Function, etc.)
51
+ * Check if an object type has any method properties (e.g. Timestamp.toDate, GeoPoint.isEqual)
52
+ * @internal
53
+ */
54
+ type HasMethod<T> = {
55
+ [K in keyof T]-?: NonNullable<T[K]> extends (...args: any[]) => any ? K : never;
56
+ }[keyof T] extends never ? false : true;
57
+ /**
58
+ * Check if a type is a plain data object with known static keys
59
+ * (excludes Date, Timestamp, GeoPoint, DocumentReference, Array, Function, Map, Set, RegExp, and Record<string, V>)
22
60
  * @internal
23
61
  */
24
- type IsPlainObject<T> = IsAny<T> extends true ? false : NonNullable<T> extends Date ? false : NonNullable<T> extends Array<any> ? false : NonNullable<T> extends Function ? false : NonNullable<T> extends object ? true : false;
62
+ type IsPlainObject<T> = IsAny<T> extends true ? false : NonNullable<T> extends Date | Array<any> | ReadonlyArray<any> | Function | RegExp | Map<any, any> | Set<any> | Promise<any> ? false : NonNullable<T> extends object ? string extends keyof NonNullable<T> ? false : HasMethod<NonNullable<T>> extends true ? false : true : false;
25
63
  /**
26
64
  * Recursively generates dot-notation paths for nested plain objects only
27
65
  * Stops at primitives, Date, Array, Function, etc.
@@ -195,8 +233,8 @@ type RelationalKeys<T = any, TMapping = any> = {
195
233
  * @template TCreatedKey - The field name to store the creation timestamp (optional)
196
234
  * @template TUpdatedKey - The field name to store the update timestamp (optional)
197
235
  */
198
- interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryKeys extends readonly (keyof T)[], TIsGroup extends boolean = boolean, TRefCb = any, TRelationalKeys = {}, TDocumentKey extends keyof T = keyof T, TPathKey extends keyof T | undefined = undefined, TCreatedKey extends keyof T | undefined = undefined, TUpdatedKey extends keyof T | undefined = undefined, THistoryEnabled extends boolean = false> {
199
- path: string;
236
+ interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryKeys extends readonly (keyof T)[], TIsGroup extends boolean = boolean, TRefCb = any, TRelationalKeys = {}, TDocumentKey extends keyof T = keyof T, TPathKey extends keyof T | undefined = undefined, TCreatedKey extends keyof T | undefined = undefined, TUpdatedKey extends keyof T | undefined = undefined, THistoryEnabled extends boolean = false, TPath extends string = string> {
237
+ path: TPath;
200
238
  isGroup: TIsGroup;
201
239
  foreignKeys: TForeignKeys;
202
240
  queryKeys: TQueryKeys;
@@ -207,6 +245,10 @@ interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryK
207
245
  type: T;
208
246
  /** Zod schema attached when using createRepositoryConfig(schema)(config). Used by the admin server. */
209
247
  schema?: zod.ZodObject<any>;
248
+ /**
249
+ * @deprecated `refCb` is no longer needed — `documentRef` is automatically generated from `path`
250
+ * (e.g. `path: "residences/{residenceId}/res_events"`). Kept optional for backward compatibility.
251
+ */
210
252
  refCb?: TRefCb;
211
253
  relationalKeys?: TRelationalKeys;
212
254
  /**
@@ -219,8 +261,17 @@ interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryK
219
261
  history?: HistoryConfigForModel<T> & {
220
262
  enabled: THistoryEnabled;
221
263
  };
222
- documentRef: TRefCb extends undefined ? TIsGroup extends true ? (...pathSegments: string[]) => DocumentReference : (docId: string) => DocumentReference : ExtractDocumentRefSignature<TRefCb>;
223
- update: TRefCb extends undefined ? TIsGroup extends true ? (...args: [...string[], DeepPartial<T> & DotNotationUpdate<T>]) => Promise<T> : (docId: string, data: DeepPartial<T> & DotNotationUpdate<T>) => Promise<T> : ExtractUpdateSignature<TRefCb, T>;
264
+ documentRef: TRefCb extends undefined ? ExtractParentParams<TPath, TDocumentKey & string> extends [
265
+ string,
266
+ ...string[]
267
+ ] ? (...args: PathParamsToArgsTuple<ExtractParentParams<TPath, TDocumentKey & string>>) => DocumentReference : TIsGroup extends true ? (...pathSegments: string[]) => DocumentReference : (docId: string) => DocumentReference : ExtractDocumentRefSignature<TRefCb>;
268
+ update: TRefCb extends undefined ? ExtractParentParams<TPath, TDocumentKey & string> extends [
269
+ string,
270
+ ...string[]
271
+ ] ? (...args: [
272
+ ...PathParamsToArgsTuple<ExtractParentParams<TPath, TDocumentKey & string>>,
273
+ DeepPartial<T> & DotNotationUpdate<T>
274
+ ]) => Promise<T> : TIsGroup extends true ? (...args: [...string[], DeepPartial<T> & DotNotationUpdate<T>]) => Promise<T> : (docId: string, data: DeepPartial<T> & DotNotationUpdate<T>) => Promise<T> : ExtractUpdateSignature<TRefCb, T>;
224
275
  }
225
276
 
226
- export type { DeepPartial as D, ExtractDocumentRefSignature as E, FieldPath as F, GetOptions as G, QueryOptions as Q, RepositoryConfig as R, WhereClause as W, RelationConfig as a, DotNotationUpdate as b, ExtractUpdateSignature as c, GetResult as d, RelationalKeys as e, ExtractReturnDoc as f };
277
+ export type { DeepPartial as D, ExtractDocumentRefSignature as E, FieldPath as F, GetOptions as G, InvalidPathParams as I, PathParamsToArgsTuple as P, QueryOptions as Q, RepositoryConfig as R, ValidatedPath as V, WhereClause as W, RelationConfig as a, DotNotationUpdate as b, ExtractParentParams as c, ExtractPathParams as d, ExtractUpdateSignature as e, GetResult as f, RelationalKeys as g, ExtractReturnDoc as h };
@@ -4,7 +4,7 @@ import { z } from 'zod';
4
4
  import { HttpsOptions } from 'firebase-functions/v2/https';
5
5
  import { H as HistoryMethods } from './read-B15YaPyR.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, d as GetResult, f as ExtractReturnDoc, a as RelationConfig, D as DeepPartial, b as DotNotationUpdate, F as FieldPath } from './types-DZoEAKT7.cjs';
7
+ import { Q as QueryOptions, R as RepositoryConfig, G as GetOptions, f as GetResult, h as ExtractReturnDoc, a as RelationConfig, D as DeepPartial, b as DotNotationUpdate, F as FieldPath } from './types-B51LYvQZ.cjs';
8
8
 
9
9
  /**
10
10
  * Pagination result with data and cursor information
@@ -802,8 +802,10 @@ interface CrudRepoEntry {
802
802
  pathKey?: string;
803
803
  /** Whether this repo is a collection group (subcollection) */
804
804
  isGroup?: boolean;
805
- /** Parent key field names needed to build a subcollection document ref (auto-detected from refCb) */
805
+ /** Parent key field names needed to build a subcollection document ref (auto-detected from path template or refCb) */
806
806
  parentKeys?: string[];
807
+ /** Full Firestore document path pattern with `{param}` placeholders */
808
+ documentPathTemplate?: string;
807
809
  /** Field name for the creation timestamp (auto-set on create) */
808
810
  createdKey?: string;
809
811
  pageSize: number;
@@ -7,6 +7,36 @@ import { DocumentReference, Firestore, DocumentSnapshot, WhereFilterOp } from 'f
7
7
  * @internal
8
8
  */
9
9
  type ExtractDocumentRefSignature<T> = T extends (db: Firestore, ...args: infer P) => DocumentReference ? (...args: P) => DocumentReference : never;
10
+ /**
11
+ * Extract all `{param}` names from a path template string in left-to-right order.
12
+ * @example ExtractPathParams<"prevention/prev_rules/prev_workshops/{workshopId}/prev_events"> // ["workshopId"]
13
+ */
14
+ type ExtractPathParams<TPath extends string> = string extends TPath ? [] : TPath extends `${string}{${infer Param}}${infer Rest}` ? [Param, ...ExtractPathParams<Rest>] : [];
15
+ /**
16
+ * Extract dynamic parent key names from a path template (strips trailing `/{documentKey}` if present).
17
+ */
18
+ type ExtractParentParams<TPath extends string, TDocumentKey extends string> = ExtractPathParams<TPath> extends [
19
+ ...infer Parents extends string[],
20
+ TDocumentKey
21
+ ] ? Parents : ExtractPathParams<TPath>;
22
+ /**
23
+ * Detect `{param}` names in `TPath` that are not valid keys of `TModel`.
24
+ */
25
+ type InvalidPathParams<TPath extends string, TModel> = Exclude<ExtractPathParams<TPath>[number], keyof TModel & string>;
26
+ /**
27
+ * Constrain `TPath` so every `{param}` placeholder must be a strict `keyof TModel`.
28
+ */
29
+ type ValidatedPath<TPath extends string, TModel> = string extends TPath ? TPath : [InvalidPathParams<TPath, TModel>] extends [never] ? TPath : `Invalid path parameter(s): {${InvalidPathParams<TPath, TModel>}} — must be keyof model (${keyof TModel & string})`;
30
+ /**
31
+ * Convert an ordered tuple of parent key names into a positional string parameter tuple followed by `docId: string`.
32
+ * @internal
33
+ */
34
+ type PathParamsToArgsTuple<TParams extends readonly string[]> = [
35
+ ...{
36
+ [I in keyof TParams]: string;
37
+ },
38
+ docId: string
39
+ ];
10
40
  /**
11
41
  * `true` when `T` is `any` (the `0 extends (1 & T)` trick).
12
42
  * @internal
@@ -18,10 +48,18 @@ type IsAny<T> = 0 extends 1 & T ? true : false;
18
48
  */
19
49
  type ExtractUpdateSignature<T, TType> = T extends (db: Firestore, ...args: infer P) => DocumentReference ? (...args: [...P, DeepPartial<TType> & DotNotationUpdate<TType>]) => Promise<TType> : never;
20
50
  /**
21
- * Check if a type is a plain object (not Date, Array, Function, etc.)
51
+ * Check if an object type has any method properties (e.g. Timestamp.toDate, GeoPoint.isEqual)
52
+ * @internal
53
+ */
54
+ type HasMethod<T> = {
55
+ [K in keyof T]-?: NonNullable<T[K]> extends (...args: any[]) => any ? K : never;
56
+ }[keyof T] extends never ? false : true;
57
+ /**
58
+ * Check if a type is a plain data object with known static keys
59
+ * (excludes Date, Timestamp, GeoPoint, DocumentReference, Array, Function, Map, Set, RegExp, and Record<string, V>)
22
60
  * @internal
23
61
  */
24
- type IsPlainObject<T> = IsAny<T> extends true ? false : NonNullable<T> extends Date ? false : NonNullable<T> extends Array<any> ? false : NonNullable<T> extends Function ? false : NonNullable<T> extends object ? true : false;
62
+ type IsPlainObject<T> = IsAny<T> extends true ? false : NonNullable<T> extends Date | Array<any> | ReadonlyArray<any> | Function | RegExp | Map<any, any> | Set<any> | Promise<any> ? false : NonNullable<T> extends object ? string extends keyof NonNullable<T> ? false : HasMethod<NonNullable<T>> extends true ? false : true : false;
25
63
  /**
26
64
  * Recursively generates dot-notation paths for nested plain objects only
27
65
  * Stops at primitives, Date, Array, Function, etc.
@@ -195,8 +233,8 @@ type RelationalKeys<T = any, TMapping = any> = {
195
233
  * @template TCreatedKey - The field name to store the creation timestamp (optional)
196
234
  * @template TUpdatedKey - The field name to store the update timestamp (optional)
197
235
  */
198
- interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryKeys extends readonly (keyof T)[], TIsGroup extends boolean = boolean, TRefCb = any, TRelationalKeys = {}, TDocumentKey extends keyof T = keyof T, TPathKey extends keyof T | undefined = undefined, TCreatedKey extends keyof T | undefined = undefined, TUpdatedKey extends keyof T | undefined = undefined, THistoryEnabled extends boolean = false> {
199
- path: string;
236
+ interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryKeys extends readonly (keyof T)[], TIsGroup extends boolean = boolean, TRefCb = any, TRelationalKeys = {}, TDocumentKey extends keyof T = keyof T, TPathKey extends keyof T | undefined = undefined, TCreatedKey extends keyof T | undefined = undefined, TUpdatedKey extends keyof T | undefined = undefined, THistoryEnabled extends boolean = false, TPath extends string = string> {
237
+ path: TPath;
200
238
  isGroup: TIsGroup;
201
239
  foreignKeys: TForeignKeys;
202
240
  queryKeys: TQueryKeys;
@@ -207,6 +245,10 @@ interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryK
207
245
  type: T;
208
246
  /** Zod schema attached when using createRepositoryConfig(schema)(config). Used by the admin server. */
209
247
  schema?: zod.ZodObject<any>;
248
+ /**
249
+ * @deprecated `refCb` is no longer needed — `documentRef` is automatically generated from `path`
250
+ * (e.g. `path: "residences/{residenceId}/res_events"`). Kept optional for backward compatibility.
251
+ */
210
252
  refCb?: TRefCb;
211
253
  relationalKeys?: TRelationalKeys;
212
254
  /**
@@ -219,8 +261,17 @@ interface RepositoryConfig<T, TForeignKeys extends readonly (keyof T)[], TQueryK
219
261
  history?: HistoryConfigForModel<T> & {
220
262
  enabled: THistoryEnabled;
221
263
  };
222
- documentRef: TRefCb extends undefined ? TIsGroup extends true ? (...pathSegments: string[]) => DocumentReference : (docId: string) => DocumentReference : ExtractDocumentRefSignature<TRefCb>;
223
- update: TRefCb extends undefined ? TIsGroup extends true ? (...args: [...string[], DeepPartial<T> & DotNotationUpdate<T>]) => Promise<T> : (docId: string, data: DeepPartial<T> & DotNotationUpdate<T>) => Promise<T> : ExtractUpdateSignature<TRefCb, T>;
264
+ documentRef: TRefCb extends undefined ? ExtractParentParams<TPath, TDocumentKey & string> extends [
265
+ string,
266
+ ...string[]
267
+ ] ? (...args: PathParamsToArgsTuple<ExtractParentParams<TPath, TDocumentKey & string>>) => DocumentReference : TIsGroup extends true ? (...pathSegments: string[]) => DocumentReference : (docId: string) => DocumentReference : ExtractDocumentRefSignature<TRefCb>;
268
+ update: TRefCb extends undefined ? ExtractParentParams<TPath, TDocumentKey & string> extends [
269
+ string,
270
+ ...string[]
271
+ ] ? (...args: [
272
+ ...PathParamsToArgsTuple<ExtractParentParams<TPath, TDocumentKey & string>>,
273
+ DeepPartial<T> & DotNotationUpdate<T>
274
+ ]) => Promise<T> : TIsGroup extends true ? (...args: [...string[], DeepPartial<T> & DotNotationUpdate<T>]) => Promise<T> : (docId: string, data: DeepPartial<T> & DotNotationUpdate<T>) => Promise<T> : ExtractUpdateSignature<TRefCb, T>;
224
275
  }
225
276
 
226
- export type { DeepPartial as D, ExtractDocumentRefSignature as E, FieldPath as F, GetOptions as G, QueryOptions as Q, RepositoryConfig as R, WhereClause as W, RelationConfig as a, DotNotationUpdate as b, ExtractUpdateSignature as c, GetResult as d, RelationalKeys as e, ExtractReturnDoc as f };
277
+ export type { DeepPartial as D, ExtractDocumentRefSignature as E, FieldPath as F, GetOptions as G, InvalidPathParams as I, PathParamsToArgsTuple as P, QueryOptions as Q, RepositoryConfig as R, ValidatedPath as V, WhereClause as W, RelationConfig as a, DotNotationUpdate as b, ExtractParentParams as c, ExtractPathParams as d, ExtractUpdateSignature as e, GetResult as f, RelationalKeys as g, ExtractReturnDoc as h };
@@ -3,7 +3,7 @@ import { onDocumentWritten, DocumentOptions } from 'firebase-functions/v2/firest
3
3
  import { onRequest, HttpsOptions } from 'firebase-functions/v2/https';
4
4
  import { onMessagePublished, PubSubOptions } from 'firebase-functions/v2/pubsub';
5
5
  import { z } from 'zod';
6
- import { F as FieldPath } from './types-DiGFAWPA.js';
6
+ import { F as FieldPath } from './types-Ci0dGbuW.js';
7
7
 
8
8
  /**
9
9
  * Cloud Functions v2 options forwarded to `onDocumentWritten()` for every
@@ -4,7 +4,7 @@ import { z } from 'zod';
4
4
  import { HttpsOptions } from 'firebase-functions/v2/https';
5
5
  import { H as HistoryMethods } from './read-15-TcgCz.js';
6
6
  import { DocumentSnapshot, Query, CollectionReference, WriteBatch, Transaction, DocumentReference } from 'firebase-admin/firestore';
7
- import { Q as QueryOptions, R as RepositoryConfig, G as GetOptions, d as GetResult, f as ExtractReturnDoc, a as RelationConfig, D as DeepPartial, b as DotNotationUpdate, F as FieldPath } from './types-DiGFAWPA.js';
7
+ import { Q as QueryOptions, R as RepositoryConfig, G as GetOptions, f as GetResult, h as ExtractReturnDoc, a as RelationConfig, D as DeepPartial, b as DotNotationUpdate, F as FieldPath } from './types-Ci0dGbuW.js';
8
8
 
9
9
  /**
10
10
  * Pagination result with data and cursor information
@@ -802,8 +802,10 @@ interface CrudRepoEntry {
802
802
  pathKey?: string;
803
803
  /** Whether this repo is a collection group (subcollection) */
804
804
  isGroup?: boolean;
805
- /** Parent key field names needed to build a subcollection document ref (auto-detected from refCb) */
805
+ /** Parent key field names needed to build a subcollection document ref (auto-detected from path template or refCb) */
806
806
  parentKeys?: string[];
807
+ /** Full Firestore document path pattern with `{param}` placeholders */
808
+ documentPathTemplate?: string;
807
809
  /** Field name for the creation timestamp (auto-set on create) */
808
810
  createdKey?: string;
809
811
  pageSize: number;
@@ -3,7 +3,7 @@ import { onDocumentWritten, DocumentOptions } from 'firebase-functions/v2/firest
3
3
  import { onRequest, HttpsOptions } from 'firebase-functions/v2/https';
4
4
  import { onMessagePublished, PubSubOptions } from 'firebase-functions/v2/pubsub';
5
5
  import { z } from 'zod';
6
- import { F as FieldPath } from './types-DZoEAKT7.cjs';
6
+ import { F as FieldPath } from './types-B51LYvQZ.cjs';
7
7
 
8
8
  /**
9
9
  * Cloud Functions v2 options forwarded to `onDocumentWritten()` for every
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lpdjs/firestore-repo-service",
3
- "version": "3.0.11",
3
+ "version": "3.0.13",
4
4
  "workspaces": [
5
5
  "test/functions"
6
6
  ],
@@ -208,6 +208,7 @@
208
208
  },
209
209
  "homepage": "https://frs.lpdjs.fr",
210
210
  "peerDependencies": {
211
+ "@asteasolutions/zod-to-openapi": "^8.0.0 || ^9.0.0",
211
212
  "@google-cloud/bigquery": "^7.0.0 || ^8.0.0 || ^9.0.0",
212
213
  "@google-cloud/bigquery-storage": "^4.0.0 || ^5.0.0 || ^6.0.0",
213
214
  "@google-cloud/pubsub": "^4.0.0 || ^5.0.0 || ^6.0.0",
@@ -239,6 +240,7 @@
239
240
  }
240
241
  },
241
242
  "devDependencies": {
243
+ "@asteasolutions/zod-to-openapi": "^9.1.0",
242
244
  "@google-cloud/bigquery": "^9.3.0",
243
245
  "@google-cloud/bigquery-storage": "^6.2.0",
244
246
  "@google-cloud/pubsub": "^6.3.0",
@@ -254,7 +256,6 @@
254
256
  "zod": "^4.6.7"
255
257
  },
256
258
  "dependencies": {
257
- "@asteasolutions/zod-to-openapi": "^9.1.0",
258
259
  "@hono/node-server": "^2.1.5",
259
260
  "hono": "^4.13.13"
260
261
  }