@lpdjs/firestore-repo-service 3.0.13 → 3.0.15

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 (75) hide show
  1. package/dist/actor-context-DQZgWqj3.d.cts +117 -0
  2. package/dist/actor-context-DQZgWqj3.d.ts +117 -0
  3. package/dist/{create-servers-LyRLAOh3.d.cts → create-servers-B5Z5v2SP.d.cts} +11 -5
  4. package/dist/{create-servers-Db1xUY2N.d.ts → create-servers-p1-jJNTG.d.ts} +11 -5
  5. package/dist/history/index.cjs +1 -1
  6. package/dist/history/index.cjs.map +1 -1
  7. package/dist/history/index.d.cts +67 -7
  8. package/dist/history/index.d.ts +67 -7
  9. package/dist/history/index.js +1 -1
  10. package/dist/history/index.js.map +1 -1
  11. package/dist/index.cjs +81 -81
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +20 -14
  14. package/dist/index.d.ts +20 -14
  15. package/dist/index.js +81 -81
  16. package/dist/index.js.map +1 -1
  17. package/dist/llms-full.txt +1 -1
  18. package/dist/llms.txt +1 -1
  19. package/dist/{openapi-QVpqnnes.d.cts → openapi-B9utXiEH.d.cts} +1 -1
  20. package/dist/{openapi-CNIA7QRw.d.ts → openapi-Bsqq2zgh.d.ts} +1 -1
  21. package/dist/{queue-BEB-ujA3.d.ts → queue-NFod6hTT.d.ts} +1 -1
  22. package/dist/{queue-CpHe6M5j.d.cts → queue-zw2B7GPx.d.cts} +1 -1
  23. package/dist/{read-15-TcgCz.d.ts → read-BPov7lws.d.ts} +30 -7
  24. package/dist/{read-B15YaPyR.d.cts → read-Dfah1PPl.d.cts} +30 -7
  25. package/dist/{rules-Cafrkb9v.d.ts → rules-18wH7Uak.d.ts} +1 -1
  26. package/dist/{rules-Bu2NB7Eb.d.cts → rules-oSXoV4Js.d.cts} +1 -1
  27. package/dist/servers/admin/index.cjs +5 -5
  28. package/dist/servers/admin/index.cjs.map +1 -1
  29. package/dist/servers/admin/index.d.cts +5 -4
  30. package/dist/servers/admin/index.d.ts +5 -4
  31. package/dist/servers/admin/index.js +5 -5
  32. package/dist/servers/admin/index.js.map +1 -1
  33. package/dist/servers/crud/index.cjs +2 -2
  34. package/dist/servers/crud/index.cjs.map +1 -1
  35. package/dist/servers/crud/index.d.cts +10 -9
  36. package/dist/servers/crud/index.d.ts +10 -9
  37. package/dist/servers/crud/index.js +2 -2
  38. package/dist/servers/crud/index.js.map +1 -1
  39. package/dist/servers/hono/index.cjs +14 -14
  40. package/dist/servers/hono/index.cjs.map +1 -1
  41. package/dist/servers/hono/index.d.cts +11 -3
  42. package/dist/servers/hono/index.d.ts +11 -3
  43. package/dist/servers/hono/index.js +14 -14
  44. package/dist/servers/hono/index.js.map +1 -1
  45. package/dist/servers/index.cjs +94 -94
  46. package/dist/servers/index.cjs.map +1 -1
  47. package/dist/servers/index.d.cts +13 -12
  48. package/dist/servers/index.d.ts +13 -12
  49. package/dist/servers/index.js +94 -94
  50. package/dist/servers/index.js.map +1 -1
  51. package/dist/sync/bigquery.d.cts +2 -2
  52. package/dist/sync/bigquery.d.ts +2 -2
  53. package/dist/sync/index.cjs +55 -55
  54. package/dist/sync/index.cjs.map +1 -1
  55. package/dist/sync/index.d.cts +6 -6
  56. package/dist/sync/index.d.ts +6 -6
  57. package/dist/sync/index.js +55 -55
  58. package/dist/sync/index.js.map +1 -1
  59. package/dist/sync/meilisearch.cjs +2 -2
  60. package/dist/sync/meilisearch.cjs.map +1 -1
  61. package/dist/sync/meilisearch.d.cts +2 -2
  62. package/dist/sync/meilisearch.d.ts +2 -2
  63. package/dist/sync/meilisearch.js +2 -2
  64. package/dist/sync/meilisearch.js.map +1 -1
  65. package/dist/{types-o-9qoExc.d.cts → types-BDTx8VPg.d.cts} +8 -0
  66. package/dist/{types-CNseHqF7.d.cts → types-BGh5_2fl.d.cts} +4 -4
  67. package/dist/{types-DGQURFSq.d.ts → types-B_FrzmO4.d.ts} +1 -1
  68. package/dist/{types-DmXW_fVz.d.ts → types-Cc6lelk1.d.ts} +4 -4
  69. package/dist/{types--RamYGF1.d.cts → types-D6zvWzRt.d.cts} +96 -2
  70. package/dist/{types--RamYGF1.d.ts → types-D6zvWzRt.d.ts} +96 -2
  71. package/dist/{types-VVuLlmfc.d.cts → types-D78FPJeF.d.cts} +1 -1
  72. package/dist/{types-B51LYvQZ.d.cts → types-Dc3lX99O.d.cts} +20 -19
  73. package/dist/{types-Ci0dGbuW.d.ts → types-DgFJLwAu.d.ts} +20 -19
  74. package/dist/{types-D3W_RaDA.d.ts → types-w1rEqs0Z.d.ts} +8 -0
  75. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1,22 +1,24 @@
1
1
  import { HistoryConfigForModel } from './history/index.cjs';
2
+ export { D as DEFAULT_HISTORY_SHADOW_KEY, g as HistoryCustomData, h as HistoryCustomInput, m as HistoryFallbackActor, o as HistoryShadowConfig, p as HistoryShadowFieldsConfig } from './types-D6zvWzRt.cjs';
2
3
  import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
3
4
  import { z } from 'zod';
4
- import { Q as QueryOptions, R as RepositoryConfig, a as RelationConfig, V as ValidatedPath } from './types-B51LYvQZ.cjs';
5
- export { D as DeepPartial, b as DotNotationUpdate, E as ExtractDocumentRefSignature, c as ExtractParentParams, d as ExtractPathParams, e as ExtractUpdateSignature, F as FieldPath, G as GetOptions, f as GetResult, I as InvalidPathParams, P as PathParamsToArgsTuple, g as RelationalKeys, W as WhereClause } from './types-B51LYvQZ.cjs';
6
- import { r as PaginationOptions, C as ConfiguredRepository } from './types-CNseHqF7.cjs';
7
- export { A as ApiResponse, b as CrudRepoConfig, a as CrudServerOptions, F as FieldRole, G as GenerateGetMethods, t as GenerateQueryMethods, u as IncludeConfigTyped, L as ListResponseData, v as PaginationResult, w as PaginationWithIncludeOptionsTyped, x as PopulateOptionsTyped, Q as QueryRequestBody, R as RepoFieldPath, h as RepoRelationKeys, y as SystemBackfillFailure, z as SystemBackfillOptions, B as SystemBackfillResult, E as UpdatableData, U as UserFieldPath, H as createPaginationIterator, J as executePaginatedQuery } from './types-CNseHqF7.cjs';
8
- export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, c as BoundCrudServerOptions, d as BoundFirestoreSyncConfig, C as CreateServersDeps, e as createServers } from './create-servers-LyRLAOh3.cjs';
5
+ import { Q as QueryOptions, R as RepositoryConfig, a as RelationConfig, V as ValidatedPath, E as EffectiveRefCb } from './types-Dc3lX99O.cjs';
6
+ export { D as DeepPartial, b as DotNotationUpdate, c as ExtractDocumentRefSignature, d as ExtractParentParams, e as ExtractPathParams, f as ExtractUpdateSignature, F as FieldPath, G as GetOptions, g as GetResult, I as InvalidPathParams, P as PathParamsToArgsTuple, h as RelationalKeys, S as SynthesizedRefCb, W as WhereClause } from './types-Dc3lX99O.cjs';
7
+ import { r as PaginationOptions, C as ConfiguredRepository } from './types-BGh5_2fl.cjs';
8
+ export { A as ApiResponse, b as CrudRepoConfig, a as CrudServerOptions, F as FieldRole, G as GenerateGetMethods, t as GenerateQueryMethods, u as IncludeConfigTyped, L as ListResponseData, v as PaginationResult, w as PaginationWithIncludeOptionsTyped, x as PopulateOptionsTyped, Q as QueryRequestBody, R as RepoFieldPath, h as RepoRelationKeys, y as SystemBackfillFailure, z as SystemBackfillOptions, B as SystemBackfillResult, E as UpdatableData, U as UserFieldPath, H as createPaginationIterator, J as executePaginatedQuery } from './types-BGh5_2fl.cjs';
9
+ export { a as ActorResolver, b as ActorResolverFieldConfig, A as ActorResolverOption, H as HistoryActor, c as createActorContextMiddleware, d as createActorResolver, e as defaultActorResolver, g as getCurrentActor, s as setRequestActorMeta, w as withActor } from './actor-context-DQZgWqj3.cjs';
10
+ export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, c as BoundCrudServerOptions, d as BoundFirestoreSyncConfig, C as CreateServersDeps, e as createServers } from './create-servers-B5Z5v2SP.cjs';
9
11
  export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig } from './servers/admin/index.cjs';
10
12
  export { h as MiniRouter } from './firebase-auth-nG3prKoj.cjs';
11
13
  import 'firebase-functions/v2/firestore';
12
- import './types-o-9qoExc.cjs';
14
+ import './types-BDTx8VPg.cjs';
13
15
  import 'hono';
14
16
  import 'firebase-functions/v2/https';
15
- import './read-B15YaPyR.cjs';
16
- import './queue-CpHe6M5j.cjs';
17
- import './types-VVuLlmfc.cjs';
17
+ import './read-Dfah1PPl.cjs';
18
+ import './queue-zw2B7GPx.cjs';
19
+ import './types-D78FPJeF.cjs';
18
20
  import 'firebase-functions/v2/pubsub';
19
- import './openapi-QVpqnnes.cjs';
21
+ import './openapi-B9utXiEH.cjs';
20
22
  import './sync/meilisearch.cjs';
21
23
 
22
24
  /**
@@ -151,7 +153,7 @@ declare function createRepositoryConfig<TSchema extends z.ZodObject<any>>(schema
151
153
  history?: HistoryConfigForModel<z.infer<TSchema>> & {
152
154
  enabled: THistoryEnabled;
153
155
  };
154
- }) => RepositoryConfig<z.infer<TSchema>, TForeignKeys, TQueryKeys, TIsGroup, TRefCb, {}, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled, TPath> & {
156
+ }) => RepositoryConfig<z.infer<TSchema>, TForeignKeys, TQueryKeys, TIsGroup, EffectiveRefCb<TPath, TDocumentKey & string, TIsGroup, TRefCb>, {}, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled> & {
155
157
  schema: TSchema;
156
158
  };
157
159
  /**
@@ -218,9 +220,13 @@ declare function buildRepositoryRelations<TMapping extends Record<string, any>,
218
220
  }[keyof TMapping];
219
221
  } : never;
220
222
  }>(mapping: TMapping, relations: TRelations): {
221
- [K in keyof TMapping]: K extends keyof TRelations ? TMapping[K] extends RepositoryConfig<infer T, infer TForeignKeys, infer TQueryKeys, infer TIsGroup, infer TRefCb, any, infer TDocumentKey, infer TPathKey, infer TCreatedKey, infer TUpdatedKey, infer THistoryEnabled, infer TPath> ? RepositoryConfig<T, TForeignKeys, TQueryKeys, TIsGroup, TRefCb, {
223
+ [K in keyof TMapping]: K extends keyof TRelations ? TMapping[K] extends RepositoryConfig<infer T, infer TForeignKeys, infer TQueryKeys, infer TIsGroup, infer TRefCb, any, infer TDocumentKey, infer TPathKey, infer TCreatedKey, infer TUpdatedKey, infer THistoryEnabled> ? RepositoryConfig<T, TForeignKeys, TQueryKeys, TIsGroup, TRefCb, {
222
224
  [RK in keyof TRelations[K]]: ResolveRelation<TMapping, TRelations[K][RK]>;
223
- }, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled, TPath> : TMapping[K] : TMapping[K];
225
+ }, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled> & (TMapping[K] extends {
226
+ schema: infer TSchema;
227
+ } ? {
228
+ schema: TSchema;
229
+ } : {}) : TMapping[K] : TMapping[K];
224
230
  };
225
231
  /**
226
232
  * Repository mapping class that manages Firestore repositories with type safety
@@ -307,5 +313,5 @@ declare function createRepositoryMapping<T extends Record<string, any>>(dbFactor
307
313
  [K in keyof T]: ConfiguredRepository<T[K]>;
308
314
  };
309
315
 
310
- export { ConfiguredRepository, PaginationOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, ValidatedPath, applyQueryOptions as applyPaginationQueryOptions, buildAndCountQuery, buildAndExecuteQuery, buildRepositoryRelations, coerceToDate, createRepositoryConfig, createRepositoryMapping, getDateHandling, normalizeTimestamps, setDateHandling };
316
+ export { ConfiguredRepository, EffectiveRefCb, PaginationOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, ValidatedPath, applyQueryOptions as applyPaginationQueryOptions, buildAndCountQuery, buildAndExecuteQuery, buildRepositoryRelations, coerceToDate, createRepositoryConfig, createRepositoryMapping, getDateHandling, normalizeTimestamps, setDateHandling };
311
317
  export type { DateHandlingMode, IncludeConfig, PaginationWithIncludeOptions, PopulateOptions };
package/dist/index.d.ts CHANGED
@@ -1,22 +1,24 @@
1
1
  import { HistoryConfigForModel } from './history/index.js';
2
+ export { D as DEFAULT_HISTORY_SHADOW_KEY, g as HistoryCustomData, h as HistoryCustomInput, m as HistoryFallbackActor, o as HistoryShadowConfig, p as HistoryShadowFieldsConfig } from './types-D6zvWzRt.js';
2
3
  import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
3
4
  import { z } from 'zod';
4
- import { Q as QueryOptions, R as RepositoryConfig, a as RelationConfig, V as ValidatedPath } from './types-Ci0dGbuW.js';
5
- export { D as DeepPartial, b as DotNotationUpdate, E as ExtractDocumentRefSignature, c as ExtractParentParams, d as ExtractPathParams, e as ExtractUpdateSignature, F as FieldPath, G as GetOptions, f as GetResult, I as InvalidPathParams, P as PathParamsToArgsTuple, g as RelationalKeys, W as WhereClause } from './types-Ci0dGbuW.js';
6
- import { r as PaginationOptions, C as ConfiguredRepository } from './types-DmXW_fVz.js';
7
- export { A as ApiResponse, b as CrudRepoConfig, a as CrudServerOptions, F as FieldRole, G as GenerateGetMethods, t as GenerateQueryMethods, u as IncludeConfigTyped, L as ListResponseData, v as PaginationResult, w as PaginationWithIncludeOptionsTyped, x as PopulateOptionsTyped, Q as QueryRequestBody, R as RepoFieldPath, h as RepoRelationKeys, y as SystemBackfillFailure, z as SystemBackfillOptions, B as SystemBackfillResult, E as UpdatableData, U as UserFieldPath, H as createPaginationIterator, J as executePaginatedQuery } from './types-DmXW_fVz.js';
8
- export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, c as BoundCrudServerOptions, d as BoundFirestoreSyncConfig, C as CreateServersDeps, e as createServers } from './create-servers-Db1xUY2N.js';
5
+ import { Q as QueryOptions, R as RepositoryConfig, a as RelationConfig, V as ValidatedPath, E as EffectiveRefCb } from './types-DgFJLwAu.js';
6
+ export { D as DeepPartial, b as DotNotationUpdate, c as ExtractDocumentRefSignature, d as ExtractParentParams, e as ExtractPathParams, f as ExtractUpdateSignature, F as FieldPath, G as GetOptions, g as GetResult, I as InvalidPathParams, P as PathParamsToArgsTuple, h as RelationalKeys, S as SynthesizedRefCb, W as WhereClause } from './types-DgFJLwAu.js';
7
+ import { r as PaginationOptions, C as ConfiguredRepository } from './types-Cc6lelk1.js';
8
+ export { A as ApiResponse, b as CrudRepoConfig, a as CrudServerOptions, F as FieldRole, G as GenerateGetMethods, t as GenerateQueryMethods, u as IncludeConfigTyped, L as ListResponseData, v as PaginationResult, w as PaginationWithIncludeOptionsTyped, x as PopulateOptionsTyped, Q as QueryRequestBody, R as RepoFieldPath, h as RepoRelationKeys, y as SystemBackfillFailure, z as SystemBackfillOptions, B as SystemBackfillResult, E as UpdatableData, U as UserFieldPath, H as createPaginationIterator, J as executePaginatedQuery } from './types-Cc6lelk1.js';
9
+ export { a as ActorResolver, b as ActorResolverFieldConfig, A as ActorResolverOption, H as HistoryActor, c as createActorContextMiddleware, d as createActorResolver, e as defaultActorResolver, g as getCurrentActor, s as setRequestActorMeta, w as withActor } from './actor-context-DQZgWqj3.js';
10
+ export { B as BoundAdminRepoConfig, a as BoundAdminServerOptions, b as BoundCrudRepoConfig, c as BoundCrudServerOptions, d as BoundFirestoreSyncConfig, C as CreateServersDeps, e as createServers } from './create-servers-p1-jJNTG.js';
9
11
  export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig } from './servers/admin/index.js';
10
12
  export { h as MiniRouter } from './firebase-auth-nG3prKoj.js';
11
13
  import 'firebase-functions/v2/firestore';
12
- import './types-D3W_RaDA.js';
14
+ import './types-w1rEqs0Z.js';
13
15
  import 'hono';
14
16
  import 'firebase-functions/v2/https';
15
- import './read-15-TcgCz.js';
16
- import './queue-BEB-ujA3.js';
17
- import './types-DGQURFSq.js';
17
+ import './read-BPov7lws.js';
18
+ import './queue-NFod6hTT.js';
19
+ import './types-B_FrzmO4.js';
18
20
  import 'firebase-functions/v2/pubsub';
19
- import './openapi-CNIA7QRw.js';
21
+ import './openapi-Bsqq2zgh.js';
20
22
  import './sync/meilisearch.js';
21
23
 
22
24
  /**
@@ -151,7 +153,7 @@ declare function createRepositoryConfig<TSchema extends z.ZodObject<any>>(schema
151
153
  history?: HistoryConfigForModel<z.infer<TSchema>> & {
152
154
  enabled: THistoryEnabled;
153
155
  };
154
- }) => RepositoryConfig<z.infer<TSchema>, TForeignKeys, TQueryKeys, TIsGroup, TRefCb, {}, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled, TPath> & {
156
+ }) => RepositoryConfig<z.infer<TSchema>, TForeignKeys, TQueryKeys, TIsGroup, EffectiveRefCb<TPath, TDocumentKey & string, TIsGroup, TRefCb>, {}, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled> & {
155
157
  schema: TSchema;
156
158
  };
157
159
  /**
@@ -218,9 +220,13 @@ declare function buildRepositoryRelations<TMapping extends Record<string, any>,
218
220
  }[keyof TMapping];
219
221
  } : never;
220
222
  }>(mapping: TMapping, relations: TRelations): {
221
- [K in keyof TMapping]: K extends keyof TRelations ? TMapping[K] extends RepositoryConfig<infer T, infer TForeignKeys, infer TQueryKeys, infer TIsGroup, infer TRefCb, any, infer TDocumentKey, infer TPathKey, infer TCreatedKey, infer TUpdatedKey, infer THistoryEnabled, infer TPath> ? RepositoryConfig<T, TForeignKeys, TQueryKeys, TIsGroup, TRefCb, {
223
+ [K in keyof TMapping]: K extends keyof TRelations ? TMapping[K] extends RepositoryConfig<infer T, infer TForeignKeys, infer TQueryKeys, infer TIsGroup, infer TRefCb, any, infer TDocumentKey, infer TPathKey, infer TCreatedKey, infer TUpdatedKey, infer THistoryEnabled> ? RepositoryConfig<T, TForeignKeys, TQueryKeys, TIsGroup, TRefCb, {
222
224
  [RK in keyof TRelations[K]]: ResolveRelation<TMapping, TRelations[K][RK]>;
223
- }, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled, TPath> : TMapping[K] : TMapping[K];
225
+ }, TDocumentKey, TPathKey, TCreatedKey, TUpdatedKey, THistoryEnabled> & (TMapping[K] extends {
226
+ schema: infer TSchema;
227
+ } ? {
228
+ schema: TSchema;
229
+ } : {}) : TMapping[K] : TMapping[K];
224
230
  };
225
231
  /**
226
232
  * Repository mapping class that manages Firestore repositories with type safety
@@ -307,5 +313,5 @@ declare function createRepositoryMapping<T extends Record<string, any>>(dbFactor
307
313
  [K in keyof T]: ConfiguredRepository<T[K]>;
308
314
  };
309
315
 
310
- export { ConfiguredRepository, PaginationOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, ValidatedPath, applyQueryOptions as applyPaginationQueryOptions, buildAndCountQuery, buildAndExecuteQuery, buildRepositoryRelations, coerceToDate, createRepositoryConfig, createRepositoryMapping, getDateHandling, normalizeTimestamps, setDateHandling };
316
+ export { ConfiguredRepository, EffectiveRefCb, PaginationOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, ValidatedPath, applyQueryOptions as applyPaginationQueryOptions, buildAndCountQuery, buildAndExecuteQuery, buildRepositoryRelations, coerceToDate, createRepositoryConfig, createRepositoryMapping, getDateHandling, normalizeTimestamps, setDateHandling };
311
317
  export type { DateHandlingMode, IncludeConfig, PaginationWithIncludeOptions, PopulateOptions };