@lpdjs/firestore-repo-service 2.1.11 → 2.1.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.
- package/dist/{index-B3vqoqmx.d.ts → index-BJQXYHTC.d.ts} +4 -0
- package/dist/{index-C4RgCxza.d.cts → index-BjH87AI4.d.cts} +4 -0
- package/dist/index.cjs +51 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +51 -51
- package/dist/index.js.map +1 -1
- package/dist/servers/admin/index.cjs +42 -42
- package/dist/servers/admin/index.cjs.map +1 -1
- package/dist/servers/admin/index.d.cts +1 -1
- package/dist/servers/admin/index.d.ts +1 -1
- package/dist/servers/admin/index.js +42 -42
- 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.js +2 -2
- package/dist/servers/crud/index.js.map +1 -1
- package/dist/servers/index.cjs +60 -60
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +2 -2
- package/dist/servers/index.d.ts +2 -2
- package/dist/servers/index.js +60 -60
- package/dist/servers/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { Q as QueryOptions, P as PaginationOptions, R as RepositoryConfig, a as RelationConfig, C as ConfiguredRepository } from './types-CYVwoOQx.cjs';
|
|
4
4
|
export { A as ApiResponse, l as CrudRepoConfig, m as CrudServerOptions, E as ExtractDocumentRefSignature, b as ExtractUpdateSignature, F as FieldPath, n as FieldRole, h as GenerateGetMethods, i as GenerateQueryMethods, G as GetOptions, c as GetResult, I as IncludeConfigTyped, L as ListResponseData, g as PaginationResult, j as PaginationWithIncludeOptionsTyped, k as PopulateOptionsTyped, o as QueryRequestBody, d as RelationalKeys, p as RepoFieldPath, q as RepoRelationKeys, U as UserFieldPath, W as WhereClause, e as createPaginationIterator, f as executePaginatedQuery } from './types-CYVwoOQx.cjs';
|
|
5
|
-
export { A as AdminRepoConfig, a as AdminRepoEntry, b as AdminServerOptions, B as BasicAuthConfig, M as MiniRouter, c as createAdminServer } from './index-
|
|
5
|
+
export { A as AdminRepoConfig, a as AdminRepoEntry, b as AdminServerOptions, B as BasicAuthConfig, M as MiniRouter, c as createAdminServer } from './index-BjH87AI4.cjs';
|
|
6
6
|
export { createCrudServer } from './servers/crud/index.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -49,6 +49,12 @@ type PopulateOptions<TRelationKey = string> = {
|
|
|
49
49
|
*/
|
|
50
50
|
declare function buildAndExecuteQuery<T>(baseQuery: Query, options: QueryOptions<T>): Promise<QuerySnapshot>;
|
|
51
51
|
|
|
52
|
+
type DateHandlingMode = "preserve" | "normalize";
|
|
53
|
+
declare function setDateHandling(mode: DateHandlingMode): void;
|
|
54
|
+
declare function getDateHandling(): DateHandlingMode;
|
|
55
|
+
declare function coerceToDate(value: unknown): Date | null;
|
|
56
|
+
declare function normalizeTimestamps<T>(value: T): T;
|
|
57
|
+
|
|
52
58
|
/**
|
|
53
59
|
* Helper to create a typed repository configuration with literal type preservation.
|
|
54
60
|
* Uses currying pattern to allow type parameter inference.
|
|
@@ -221,4 +227,4 @@ declare function createRepositoryMapping<T extends Record<string, any>>(db: Fire
|
|
|
221
227
|
[K in keyof T]: ConfiguredRepository<T[K]>;
|
|
222
228
|
};
|
|
223
229
|
|
|
224
|
-
export { ConfiguredRepository, type IncludeConfig, PaginationOptions, type PaginationWithIncludeOptions, type PopulateOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, applyQueryOptions as applyPaginationQueryOptions, buildAndExecuteQuery, buildRepositoryRelations, createRepositoryConfig, createRepositoryMapping };
|
|
230
|
+
export { ConfiguredRepository, type DateHandlingMode, type IncludeConfig, PaginationOptions, type PaginationWithIncludeOptions, type PopulateOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, applyQueryOptions as applyPaginationQueryOptions, buildAndExecuteQuery, buildRepositoryRelations, coerceToDate, createRepositoryConfig, createRepositoryMapping, getDateHandling, normalizeTimestamps, setDateHandling };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Query, QuerySnapshot, Firestore } from 'firebase-admin/firestore';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { Q as QueryOptions, P as PaginationOptions, R as RepositoryConfig, a as RelationConfig, C as ConfiguredRepository } from './types-CYVwoOQx.js';
|
|
4
4
|
export { A as ApiResponse, l as CrudRepoConfig, m as CrudServerOptions, E as ExtractDocumentRefSignature, b as ExtractUpdateSignature, F as FieldPath, n as FieldRole, h as GenerateGetMethods, i as GenerateQueryMethods, G as GetOptions, c as GetResult, I as IncludeConfigTyped, L as ListResponseData, g as PaginationResult, j as PaginationWithIncludeOptionsTyped, k as PopulateOptionsTyped, o as QueryRequestBody, d as RelationalKeys, p as RepoFieldPath, q as RepoRelationKeys, U as UserFieldPath, W as WhereClause, e as createPaginationIterator, f as executePaginatedQuery } from './types-CYVwoOQx.js';
|
|
5
|
-
export { A as AdminRepoConfig, a as AdminRepoEntry, b as AdminServerOptions, B as BasicAuthConfig, M as MiniRouter, c as createAdminServer } from './index-
|
|
5
|
+
export { A as AdminRepoConfig, a as AdminRepoEntry, b as AdminServerOptions, B as BasicAuthConfig, M as MiniRouter, c as createAdminServer } from './index-BJQXYHTC.js';
|
|
6
6
|
export { createCrudServer } from './servers/crud/index.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -49,6 +49,12 @@ type PopulateOptions<TRelationKey = string> = {
|
|
|
49
49
|
*/
|
|
50
50
|
declare function buildAndExecuteQuery<T>(baseQuery: Query, options: QueryOptions<T>): Promise<QuerySnapshot>;
|
|
51
51
|
|
|
52
|
+
type DateHandlingMode = "preserve" | "normalize";
|
|
53
|
+
declare function setDateHandling(mode: DateHandlingMode): void;
|
|
54
|
+
declare function getDateHandling(): DateHandlingMode;
|
|
55
|
+
declare function coerceToDate(value: unknown): Date | null;
|
|
56
|
+
declare function normalizeTimestamps<T>(value: T): T;
|
|
57
|
+
|
|
52
58
|
/**
|
|
53
59
|
* Helper to create a typed repository configuration with literal type preservation.
|
|
54
60
|
* Uses currying pattern to allow type parameter inference.
|
|
@@ -221,4 +227,4 @@ declare function createRepositoryMapping<T extends Record<string, any>>(db: Fire
|
|
|
221
227
|
[K in keyof T]: ConfiguredRepository<T[K]>;
|
|
222
228
|
};
|
|
223
229
|
|
|
224
|
-
export { ConfiguredRepository, type IncludeConfig, PaginationOptions, type PaginationWithIncludeOptions, type PopulateOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, applyQueryOptions as applyPaginationQueryOptions, buildAndExecuteQuery, buildRepositoryRelations, createRepositoryConfig, createRepositoryMapping };
|
|
230
|
+
export { ConfiguredRepository, type DateHandlingMode, type IncludeConfig, PaginationOptions, type PaginationWithIncludeOptions, type PopulateOptions, QueryOptions, RelationConfig, RepositoryConfig, RepositoryMapping, applyQueryOptions as applyPaginationQueryOptions, buildAndExecuteQuery, buildRepositoryRelations, coerceToDate, createRepositoryConfig, createRepositoryMapping, getDateHandling, normalizeTimestamps, setDateHandling };
|