@lpdjs/firestore-repo-service 2.2.2 → 2.2.4

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.
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { HttpsOptions } from 'firebase-functions/v2/https';
3
- import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-B5NdBY1Z.cjs';
3
+ import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-Z9Qy8Xmx.cjs';
4
4
 
5
5
  /**
6
6
  * Minimal zero-dependency HTTP router for Firebase Functions.
@@ -274,9 +274,12 @@ type RepoRegistry = Record<string, AdminRepoEntry>;
274
274
 
275
275
  /**
276
276
  * Extracts the model type `T` from a `ConfiguredRepository`.
277
+ * Two-step inference so it survives intersection types
278
+ * (e.g. `RepositoryConfig<...> & { schema: ZodObject }` produced by
279
+ * `createRepositoryConfig(schema)`).
277
280
  * @internal
278
281
  */
279
- type RepoModelType<TRepo> = TRepo extends ConfiguredRepository<RepositoryConfig<infer T, any, any, any, any, any, any, any, any, any>> ? T : never;
282
+ type RepoModelType<TRepo> = TRepo extends ConfiguredRepository<infer C> ? C extends RepositoryConfig<infer T, any, any, any, any, any, any, any, any, any> ? T : never : never;
280
283
  /**
281
284
  * Configuration for a single repository in the admin server.
282
285
  *
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { HttpsOptions } from 'firebase-functions/v2/https';
3
- import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-B5NdBY1Z.js';
3
+ import { C as ConfiguredRepository, R as RepositoryConfig, F as FieldPath, n as FieldRole } from './types-Z9Qy8Xmx.js';
4
4
 
5
5
  /**
6
6
  * Minimal zero-dependency HTTP router for Firebase Functions.
@@ -274,9 +274,12 @@ type RepoRegistry = Record<string, AdminRepoEntry>;
274
274
 
275
275
  /**
276
276
  * Extracts the model type `T` from a `ConfiguredRepository`.
277
+ * Two-step inference so it survives intersection types
278
+ * (e.g. `RepositoryConfig<...> & { schema: ZodObject }` produced by
279
+ * `createRepositoryConfig(schema)`).
277
280
  * @internal
278
281
  */
279
- type RepoModelType<TRepo> = TRepo extends ConfiguredRepository<RepositoryConfig<infer T, any, any, any, any, any, any, any, any, any>> ? T : never;
282
+ type RepoModelType<TRepo> = TRepo extends ConfiguredRepository<infer C> ? C extends RepositoryConfig<infer T, any, any, any, any, any, any, any, any, any> ? T : never : never;
280
283
  /**
281
284
  * Configuration for a single repository in the admin server.
282
285
  *