@lpdjs/firestore-repo-service 3.0.20 → 3.0.21

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/index.d.cts CHANGED
@@ -4,12 +4,12 @@ import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
4
4
  import { z } from 'zod';
5
5
  import { Q as QueryOptions, R as RepositoryConfig, a as RelationConfig, V as ValidatedPath, E as EffectiveRefCb } from './types-Dc3lX99O.cjs';
6
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 { a4 as PaginationOptions, C as ConfiguredRepository } from './types-x1yAVcQa.cjs';
8
- export { b as ApiResponse, c as ApplyEffectsResult, d as CrudAfterBatchContext, e as CrudAfterBatchCreatedItem, f as CrudAfterBatchDeletedItem, g as CrudAfterBatchUpdatedItem, h as CrudAfterCreateContext, i as CrudAfterDeleteContext, j as CrudAfterUpdateContext, k as CrudBeforeCreateContext, l as CrudBeforeUpdateContext, m as CrudEffectOperation, n as CrudHookErrorCallback, o as CrudHookErrorContext, p as CrudHookName, q as CrudHooks, r as CrudRepoConfig, a as CrudServerOptions, w as CrudWriteOperation, D as DeepDiffReturn, E as EffectExecutionResult, x as EffectPredicateArgs, y as EffectsMap, F as FieldRole, a5 as GenerateGetMethods, a6 as GenerateQueryMethods, a7 as IncludeConfigTyped, L as ListResponseData, M as MutationContext, B as MutationRule, G as MutationsMap, O as OpenAPIHeaderParamSpec, H as OpenAPIHistoryHeadersConfig, a8 as PaginationResult, a9 as PaginationWithIncludeOptionsTyped, aa as PopulateOptionsTyped, P as PreWriteMutation, K as PreWriteMutationFn, Q as QueryRequestBody, R as RepoFieldPath, N as RepoRelationKeys, T as RuleEffect, ab as SystemBackfillFailure, ac as SystemBackfillOptions, ad as SystemBackfillResult, ae as UpdatableData, W as UserFieldPath, af as createPaginationIterator, ag as executePaginatedQuery } from './types-x1yAVcQa.cjs';
7
+ import { a4 as PaginationOptions, C as ConfiguredRepository } from './types-BLHo_PdM.cjs';
8
+ export { b as ApiResponse, c as ApplyEffectsResult, d as CrudAfterBatchContext, e as CrudAfterBatchCreatedItem, f as CrudAfterBatchDeletedItem, g as CrudAfterBatchUpdatedItem, h as CrudAfterCreateContext, i as CrudAfterDeleteContext, j as CrudAfterUpdateContext, k as CrudBeforeCreateContext, l as CrudBeforeUpdateContext, m as CrudEffectOperation, n as CrudHookErrorCallback, o as CrudHookErrorContext, p as CrudHookName, q as CrudHooks, r as CrudRepoConfig, a as CrudServerOptions, w as CrudWriteOperation, D as DeepDiffReturn, E as EffectExecutionResult, x as EffectPredicateArgs, y as EffectsMap, F as FieldRole, a5 as GenerateGetMethods, a6 as GenerateQueryMethods, a7 as IncludeConfigTyped, L as ListResponseData, M as MutationContext, B as MutationRule, G as MutationsMap, O as OpenAPIHeaderParamSpec, H as OpenAPIHistoryHeadersConfig, a8 as PaginationResult, a9 as PaginationWithIncludeOptionsTyped, aa as PopulateOptionsTyped, P as PreWriteMutation, K as PreWriteMutationFn, Q as QueryRequestBody, R as RepoFieldPath, N as RepoRelationKeys, T as RuleEffect, ab as SystemBackfillFailure, ac as SystemBackfillOptions, ad as SystemBackfillResult, ae as UpdatableData, W as UserFieldPath, af as createPaginationIterator, ag as executePaginatedQuery } from './types-BLHo_PdM.cjs';
9
9
  export { a as ActorResolver, b as ActorResolverFieldConfig, A as ActorResolverOption, D as DEFAULT_HISTORY_COMMENT_HEADER, f as DEFAULT_HISTORY_REASON_HEADER, H as HistoryActor, R as ResolvedHistoryHeaderNames, c as createActorContextMiddleware, d as createActorResolver, e as defaultActorResolver, h as getActorResolverHeaders, g as getCurrentActor, s as setRequestActorMeta, w as withActor } from './actor-context-zNobm6nG.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-DSxgSZ2p.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-TfGVAXBQ.cjs';
11
11
  export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig } from './servers/admin/index.cjs';
12
- export { a as applyEffects, b as applyMutations, c as applyRules, d as computeDeepDiff, e as createAfterUpdateEffects, f as createBeforeCreateMutations, g as createBeforeRules, h as createBeforeUpdateMutations, i as createEffects, j as createMutations, k as createRules } from './effects-BQfRbor0.cjs';
12
+ export { a as applyEffects, b as applyMutations, c as applyRules, d as computeDeepDiff, e as createAfterUpdateEffects, f as createBeforeCreateMutations, g as createBeforeRules, h as createBeforeUpdateMutations, i as createEffects, j as createMutations, k as createRules } from './effects-DsI4cSpI.cjs';
13
13
  export { h as MiniRouter } from './firebase-auth-nG3prKoj.cjs';
14
14
  import 'firebase-functions/v2/firestore';
15
15
  import './types-XvVG8_9J.cjs';
@@ -67,8 +67,12 @@ declare function buildAndExecuteQuery<T>(baseQuery: Query, options: QueryOptions
67
67
  /**
68
68
  * Build and count query using server-side aggregate count().
69
69
  * Returns { count, isExact }.
70
- * Exact for AND queries and split IN queries.
71
- * Estimated for OR queries due to potential overlapping documents across branches.
70
+ * - Exact (`isExact: true`) for AND queries, split `in` queries, single-branch OR
71
+ * queries, and multi-branch OR queries eligible for Firestore's native `Filter.or()`
72
+ * (<= 30 DNF disjunctions, server-side deduplicated).
73
+ * - Estimated (`isExact: false`) when falling back to summing parallel branch counts
74
+ * (e.g. > 30 DNF disjunctions, incompatible operators, missing composite index for
75
+ * `Filter.or()`, or split `array-contains-any` > 30 values).
72
76
  */
73
77
  declare function buildAndCountQuery<T>(baseQuery: Query, options: QueryOptions<T>): Promise<{
74
78
  count: number;
package/dist/index.d.ts CHANGED
@@ -4,12 +4,12 @@ import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
4
4
  import { z } from 'zod';
5
5
  import { Q as QueryOptions, R as RepositoryConfig, a as RelationConfig, V as ValidatedPath, E as EffectiveRefCb } from './types-DgFJLwAu.js';
6
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 { a4 as PaginationOptions, C as ConfiguredRepository } from './types-DDfd7qc2.js';
8
- export { b as ApiResponse, c as ApplyEffectsResult, d as CrudAfterBatchContext, e as CrudAfterBatchCreatedItem, f as CrudAfterBatchDeletedItem, g as CrudAfterBatchUpdatedItem, h as CrudAfterCreateContext, i as CrudAfterDeleteContext, j as CrudAfterUpdateContext, k as CrudBeforeCreateContext, l as CrudBeforeUpdateContext, m as CrudEffectOperation, n as CrudHookErrorCallback, o as CrudHookErrorContext, p as CrudHookName, q as CrudHooks, r as CrudRepoConfig, a as CrudServerOptions, w as CrudWriteOperation, D as DeepDiffReturn, E as EffectExecutionResult, x as EffectPredicateArgs, y as EffectsMap, F as FieldRole, a5 as GenerateGetMethods, a6 as GenerateQueryMethods, a7 as IncludeConfigTyped, L as ListResponseData, M as MutationContext, B as MutationRule, G as MutationsMap, O as OpenAPIHeaderParamSpec, H as OpenAPIHistoryHeadersConfig, a8 as PaginationResult, a9 as PaginationWithIncludeOptionsTyped, aa as PopulateOptionsTyped, P as PreWriteMutation, K as PreWriteMutationFn, Q as QueryRequestBody, R as RepoFieldPath, N as RepoRelationKeys, T as RuleEffect, ab as SystemBackfillFailure, ac as SystemBackfillOptions, ad as SystemBackfillResult, ae as UpdatableData, W as UserFieldPath, af as createPaginationIterator, ag as executePaginatedQuery } from './types-DDfd7qc2.js';
7
+ import { a4 as PaginationOptions, C as ConfiguredRepository } from './types-6jjeTvcm.js';
8
+ export { b as ApiResponse, c as ApplyEffectsResult, d as CrudAfterBatchContext, e as CrudAfterBatchCreatedItem, f as CrudAfterBatchDeletedItem, g as CrudAfterBatchUpdatedItem, h as CrudAfterCreateContext, i as CrudAfterDeleteContext, j as CrudAfterUpdateContext, k as CrudBeforeCreateContext, l as CrudBeforeUpdateContext, m as CrudEffectOperation, n as CrudHookErrorCallback, o as CrudHookErrorContext, p as CrudHookName, q as CrudHooks, r as CrudRepoConfig, a as CrudServerOptions, w as CrudWriteOperation, D as DeepDiffReturn, E as EffectExecutionResult, x as EffectPredicateArgs, y as EffectsMap, F as FieldRole, a5 as GenerateGetMethods, a6 as GenerateQueryMethods, a7 as IncludeConfigTyped, L as ListResponseData, M as MutationContext, B as MutationRule, G as MutationsMap, O as OpenAPIHeaderParamSpec, H as OpenAPIHistoryHeadersConfig, a8 as PaginationResult, a9 as PaginationWithIncludeOptionsTyped, aa as PopulateOptionsTyped, P as PreWriteMutation, K as PreWriteMutationFn, Q as QueryRequestBody, R as RepoFieldPath, N as RepoRelationKeys, T as RuleEffect, ab as SystemBackfillFailure, ac as SystemBackfillOptions, ad as SystemBackfillResult, ae as UpdatableData, W as UserFieldPath, af as createPaginationIterator, ag as executePaginatedQuery } from './types-6jjeTvcm.js';
9
9
  export { a as ActorResolver, b as ActorResolverFieldConfig, A as ActorResolverOption, D as DEFAULT_HISTORY_COMMENT_HEADER, f as DEFAULT_HISTORY_REASON_HEADER, H as HistoryActor, R as ResolvedHistoryHeaderNames, c as createActorContextMiddleware, d as createActorResolver, e as defaultActorResolver, h as getActorResolverHeaders, g as getCurrentActor, s as setRequestActorMeta, w as withActor } from './actor-context-zNobm6nG.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-BX4FC03_.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-z-dCkmv2.js';
11
11
  export { AdminRepoConfig, AdminRepoEntry, AdminServerOptions, BasicAuthConfig } from './servers/admin/index.js';
12
- export { a as applyEffects, b as applyMutations, c as applyRules, d as computeDeepDiff, e as createAfterUpdateEffects, f as createBeforeCreateMutations, g as createBeforeRules, h as createBeforeUpdateMutations, i as createEffects, j as createMutations, k as createRules } from './effects-DKiDkMBB.js';
12
+ export { a as applyEffects, b as applyMutations, c as applyRules, d as computeDeepDiff, e as createAfterUpdateEffects, f as createBeforeCreateMutations, g as createBeforeRules, h as createBeforeUpdateMutations, i as createEffects, j as createMutations, k as createRules } from './effects-DLBSYKuA.js';
13
13
  export { h as MiniRouter } from './firebase-auth-nG3prKoj.js';
14
14
  import 'firebase-functions/v2/firestore';
15
15
  import './types-BJ6MAavL.js';
@@ -67,8 +67,12 @@ declare function buildAndExecuteQuery<T>(baseQuery: Query, options: QueryOptions
67
67
  /**
68
68
  * Build and count query using server-side aggregate count().
69
69
  * Returns { count, isExact }.
70
- * Exact for AND queries and split IN queries.
71
- * Estimated for OR queries due to potential overlapping documents across branches.
70
+ * - Exact (`isExact: true`) for AND queries, split `in` queries, single-branch OR
71
+ * queries, and multi-branch OR queries eligible for Firestore's native `Filter.or()`
72
+ * (<= 30 DNF disjunctions, server-side deduplicated).
73
+ * - Estimated (`isExact: false`) when falling back to summing parallel branch counts
74
+ * (e.g. > 30 DNF disjunctions, incompatible operators, missing composite index for
75
+ * `Filter.or()`, or split `array-contains-any` > 30 values).
72
76
  */
73
77
  declare function buildAndCountQuery<T>(baseQuery: Query, options: QueryOptions<T>): Promise<{
74
78
  count: number;