@lpdjs/firestore-repo-service 2.6.32 → 2.6.34
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/README.md +14 -373
- package/dist/{create-servers-nXXPnlJt.d.ts → create-servers-DDHHOqOW.d.ts} +3 -3
- package/dist/{create-servers-BoJrRNI2.d.cts → create-servers-DmQNkgM_.d.cts} +3 -3
- package/dist/{index-DZnXSClM.d.cts → index-bkOZzCvS.d.cts} +1 -1
- package/dist/{index-BE-Iuye5.d.ts → index-qSs2G4CW.d.ts} +1 -1
- package/dist/index.cjs +94 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +94 -94
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +43 -21
- package/dist/llms.txt +1 -1
- package/dist/{openapi-BHW1HViI.d.cts → openapi-B_2O8iJW.d.cts} +1 -1
- package/dist/{openapi-BupSdudk.d.ts → openapi-DBi6hg2V.d.ts} +1 -1
- package/dist/servers/admin/index.d.cts +4 -2
- package/dist/servers/admin/index.d.ts +4 -2
- package/dist/servers/crud/index.cjs +7 -7
- package/dist/servers/crud/index.cjs.map +1 -1
- package/dist/servers/crud/index.d.cts +7 -171
- package/dist/servers/crud/index.d.ts +7 -171
- package/dist/servers/crud/index.js +7 -7
- package/dist/servers/crud/index.js.map +1 -1
- package/dist/servers/hono/index.d.cts +5 -858
- package/dist/servers/hono/index.d.ts +5 -858
- package/dist/servers/index.cjs +98 -98
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +7 -5
- package/dist/servers/index.d.ts +7 -5
- package/dist/servers/index.js +98 -98
- package/dist/servers/index.js.map +1 -1
- package/dist/sync/index.cjs +7 -7
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.js +7 -7
- package/dist/sync/index.js.map +1 -1
- package/dist/types-B4dMmfet.d.cts +860 -0
- package/dist/{types-CpkQQn4b.d.cts → types-BRS75oO7.d.cts} +10 -38
- package/dist/{types-BcT92G9B.d.ts → types-DnycnK_G.d.ts} +10 -38
- package/dist/types-DyKJJ9UQ.d.ts +860 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { c as AuthUser
|
|
1
|
+
import { c as AuthUser } from './firebase-auth-DZ8lb2Ec.cjs';
|
|
2
|
+
import { H as HonoServerOptions, O as OpenAPIConfig } from './types-B4dMmfet.cjs';
|
|
2
3
|
import * as zod from 'zod';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import { HttpsOptions } from 'firebase-functions/v2/https';
|
|
@@ -662,6 +663,12 @@ interface OpenAPISpecOptions {
|
|
|
662
663
|
}[];
|
|
663
664
|
/** Whether the API requires auth — adds securitySchemes */
|
|
664
665
|
auth?: "basic" | "bearer" | false;
|
|
666
|
+
/** Path served by the JSON spec (e.g. `/openapi.json`). Default: `/openapi.json`. */
|
|
667
|
+
path?: string;
|
|
668
|
+
/** Path serving the documentation UI. Set to `false` to disable. Default: `/docs`. */
|
|
669
|
+
docsPath?: string | false;
|
|
670
|
+
/** Auth guards for the docs UI (same as HonoServer DocsAuthExtension or middleware) */
|
|
671
|
+
docsAuth?: OpenAPIConfig["docsAuth"];
|
|
665
672
|
}
|
|
666
673
|
/**
|
|
667
674
|
* Extracts the model type `T` from a `ConfiguredRepository`.
|
|
@@ -892,20 +899,6 @@ interface CrudRepoEntry {
|
|
|
892
899
|
rules?: AnyCrudRules;
|
|
893
900
|
}
|
|
894
901
|
type CrudRepoRegistry = Record<string, CrudRepoEntry>;
|
|
895
|
-
/**
|
|
896
|
-
* HTTP Basic Auth configuration.
|
|
897
|
-
*/
|
|
898
|
-
interface BasicAuthConfig {
|
|
899
|
-
type: "basic";
|
|
900
|
-
/** Realm displayed in the browser login dialog */
|
|
901
|
-
realm?: string;
|
|
902
|
-
username: string;
|
|
903
|
-
password: string;
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* Middleware function type
|
|
907
|
-
*/
|
|
908
|
-
type Middleware = (req: any, res: any, next: () => void | Promise<void>) => void | Promise<void>;
|
|
909
902
|
/**
|
|
910
903
|
* Options for `createCrudServer`.
|
|
911
904
|
*
|
|
@@ -915,13 +908,7 @@ type Middleware = (req: any, res: any, next: () => void | Promise<void>) => void
|
|
|
915
908
|
*
|
|
916
909
|
* @template TRepos - Shape of the repos map (inferred automatically at the call site)
|
|
917
910
|
*/
|
|
918
|
-
interface CrudServerOptions<TRepos extends Record<string, ConfiguredRepository<any>> = Record<string, ConfiguredRepository<any>>> {
|
|
919
|
-
/**
|
|
920
|
-
* Base URL path of the function (e.g. "/api").
|
|
921
|
-
* Must match the path where the Firebase Function is mounted.
|
|
922
|
-
* Default: "/"
|
|
923
|
-
*/
|
|
924
|
-
basePath?: string;
|
|
911
|
+
interface CrudServerOptions<TRepos extends Record<string, ConfiguredRepository<any>> = Record<string, ConfiguredRepository<any>>> extends Omit<HonoServerOptions<any>, "routes" | "api" | "openapi"> {
|
|
925
912
|
/**
|
|
926
913
|
* Repository entries keyed by a name (used as route prefix).
|
|
927
914
|
* TypeScript infers the model type from each `repo` field,
|
|
@@ -957,21 +944,6 @@ interface CrudServerOptions<TRepos extends Record<string, ConfiguredRepository<a
|
|
|
957
944
|
* `false` to disable (issue #12).
|
|
958
945
|
*/
|
|
959
946
|
securityHeaders?: SecurityHeadersOptions | false;
|
|
960
|
-
/**
|
|
961
|
-
* Authentication guard executed before every request.
|
|
962
|
-
* - Pass an {@link AuthExtension} (e.g. result of `firebaseAuth({...})`) to
|
|
963
|
-
* wire Firebase Auth (typically `mode: "bearer"` for REST APIs).
|
|
964
|
-
* - Pass a `BasicAuthConfig` to enable HTTP Basic Auth.
|
|
965
|
-
* - Pass a `Middleware` function for fully custom auth logic.
|
|
966
|
-
*
|
|
967
|
-
* When an `AuthExtension` is set, per-repo `rules` follow a **default deny**
|
|
968
|
-
* policy: any operation without an explicit rule returns 403.
|
|
969
|
-
*/
|
|
970
|
-
auth?: AuthExtension | BasicAuthConfig | Middleware;
|
|
971
|
-
/**
|
|
972
|
-
* Additional middleware functions executed after auth, before route handlers.
|
|
973
|
-
*/
|
|
974
|
-
middleware?: Middleware[];
|
|
975
947
|
/**
|
|
976
948
|
* Whether to include detailed error messages in responses.
|
|
977
949
|
* Default: false (production-safe).
|
|
@@ -1095,4 +1067,4 @@ interface QueryRequestBody {
|
|
|
1095
1067
|
})[];
|
|
1096
1068
|
}
|
|
1097
1069
|
|
|
1098
|
-
export { type ApiResponse as A, type
|
|
1070
|
+
export { type ApiResponse as A, type ConfiguredRepository as C, DEFAULT_HTML_CSP as D, type ExtractDocumentRefSignature as E, type FieldRole as F, type GetOptions as G, type IncludeConfigTyped as I, type ListResponseData as L, type OpenAPISpecOptions as O, type PaginationOptions as P, type QueryRequestBody as Q, type RepoFieldPath as R, type SecurityHeadersOptions as S, type UserFieldPath as U, type WhereClause as W, type CrudServerOptions as a, type CrudRepoConfig as b, type CrudRepoEntry as c, type CrudRepoRegistry as d, type RepoRelationKeys as e, type RepositoryConfig as f, type FieldPath as g, type QueryOptions as h, type RelationConfig as i, type ExtractUpdateSignature as j, type GetResult as k, type RelationalKeys as l, createPaginationIterator as m, executePaginatedQuery as n, type PaginationResult as o, type SystemBackfillFailure as p, type SystemBackfillOptions as q, type SystemBackfillResult as r, securityHeaders as s, type GenerateGetMethods as t, type GenerateQueryMethods as u, type PaginationWithIncludeOptionsTyped as v, type PopulateOptionsTyped as w };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { c as AuthUser
|
|
1
|
+
import { c as AuthUser } from './firebase-auth-DZ8lb2Ec.js';
|
|
2
|
+
import { H as HonoServerOptions, O as OpenAPIConfig } from './types-DyKJJ9UQ.js';
|
|
2
3
|
import * as zod from 'zod';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import { HttpsOptions } from 'firebase-functions/v2/https';
|
|
@@ -662,6 +663,12 @@ interface OpenAPISpecOptions {
|
|
|
662
663
|
}[];
|
|
663
664
|
/** Whether the API requires auth — adds securitySchemes */
|
|
664
665
|
auth?: "basic" | "bearer" | false;
|
|
666
|
+
/** Path served by the JSON spec (e.g. `/openapi.json`). Default: `/openapi.json`. */
|
|
667
|
+
path?: string;
|
|
668
|
+
/** Path serving the documentation UI. Set to `false` to disable. Default: `/docs`. */
|
|
669
|
+
docsPath?: string | false;
|
|
670
|
+
/** Auth guards for the docs UI (same as HonoServer DocsAuthExtension or middleware) */
|
|
671
|
+
docsAuth?: OpenAPIConfig["docsAuth"];
|
|
665
672
|
}
|
|
666
673
|
/**
|
|
667
674
|
* Extracts the model type `T` from a `ConfiguredRepository`.
|
|
@@ -892,20 +899,6 @@ interface CrudRepoEntry {
|
|
|
892
899
|
rules?: AnyCrudRules;
|
|
893
900
|
}
|
|
894
901
|
type CrudRepoRegistry = Record<string, CrudRepoEntry>;
|
|
895
|
-
/**
|
|
896
|
-
* HTTP Basic Auth configuration.
|
|
897
|
-
*/
|
|
898
|
-
interface BasicAuthConfig {
|
|
899
|
-
type: "basic";
|
|
900
|
-
/** Realm displayed in the browser login dialog */
|
|
901
|
-
realm?: string;
|
|
902
|
-
username: string;
|
|
903
|
-
password: string;
|
|
904
|
-
}
|
|
905
|
-
/**
|
|
906
|
-
* Middleware function type
|
|
907
|
-
*/
|
|
908
|
-
type Middleware = (req: any, res: any, next: () => void | Promise<void>) => void | Promise<void>;
|
|
909
902
|
/**
|
|
910
903
|
* Options for `createCrudServer`.
|
|
911
904
|
*
|
|
@@ -915,13 +908,7 @@ type Middleware = (req: any, res: any, next: () => void | Promise<void>) => void
|
|
|
915
908
|
*
|
|
916
909
|
* @template TRepos - Shape of the repos map (inferred automatically at the call site)
|
|
917
910
|
*/
|
|
918
|
-
interface CrudServerOptions<TRepos extends Record<string, ConfiguredRepository<any>> = Record<string, ConfiguredRepository<any>>> {
|
|
919
|
-
/**
|
|
920
|
-
* Base URL path of the function (e.g. "/api").
|
|
921
|
-
* Must match the path where the Firebase Function is mounted.
|
|
922
|
-
* Default: "/"
|
|
923
|
-
*/
|
|
924
|
-
basePath?: string;
|
|
911
|
+
interface CrudServerOptions<TRepos extends Record<string, ConfiguredRepository<any>> = Record<string, ConfiguredRepository<any>>> extends Omit<HonoServerOptions<any>, "routes" | "api" | "openapi"> {
|
|
925
912
|
/**
|
|
926
913
|
* Repository entries keyed by a name (used as route prefix).
|
|
927
914
|
* TypeScript infers the model type from each `repo` field,
|
|
@@ -957,21 +944,6 @@ interface CrudServerOptions<TRepos extends Record<string, ConfiguredRepository<a
|
|
|
957
944
|
* `false` to disable (issue #12).
|
|
958
945
|
*/
|
|
959
946
|
securityHeaders?: SecurityHeadersOptions | false;
|
|
960
|
-
/**
|
|
961
|
-
* Authentication guard executed before every request.
|
|
962
|
-
* - Pass an {@link AuthExtension} (e.g. result of `firebaseAuth({...})`) to
|
|
963
|
-
* wire Firebase Auth (typically `mode: "bearer"` for REST APIs).
|
|
964
|
-
* - Pass a `BasicAuthConfig` to enable HTTP Basic Auth.
|
|
965
|
-
* - Pass a `Middleware` function for fully custom auth logic.
|
|
966
|
-
*
|
|
967
|
-
* When an `AuthExtension` is set, per-repo `rules` follow a **default deny**
|
|
968
|
-
* policy: any operation without an explicit rule returns 403.
|
|
969
|
-
*/
|
|
970
|
-
auth?: AuthExtension | BasicAuthConfig | Middleware;
|
|
971
|
-
/**
|
|
972
|
-
* Additional middleware functions executed after auth, before route handlers.
|
|
973
|
-
*/
|
|
974
|
-
middleware?: Middleware[];
|
|
975
947
|
/**
|
|
976
948
|
* Whether to include detailed error messages in responses.
|
|
977
949
|
* Default: false (production-safe).
|
|
@@ -1095,4 +1067,4 @@ interface QueryRequestBody {
|
|
|
1095
1067
|
})[];
|
|
1096
1068
|
}
|
|
1097
1069
|
|
|
1098
|
-
export { type ApiResponse as A, type
|
|
1070
|
+
export { type ApiResponse as A, type ConfiguredRepository as C, DEFAULT_HTML_CSP as D, type ExtractDocumentRefSignature as E, type FieldRole as F, type GetOptions as G, type IncludeConfigTyped as I, type ListResponseData as L, type OpenAPISpecOptions as O, type PaginationOptions as P, type QueryRequestBody as Q, type RepoFieldPath as R, type SecurityHeadersOptions as S, type UserFieldPath as U, type WhereClause as W, type CrudServerOptions as a, type CrudRepoConfig as b, type CrudRepoEntry as c, type CrudRepoRegistry as d, type RepoRelationKeys as e, type RepositoryConfig as f, type FieldPath as g, type QueryOptions as h, type RelationConfig as i, type ExtractUpdateSignature as j, type GetResult as k, type RelationalKeys as l, createPaginationIterator as m, executePaginatedQuery as n, type PaginationResult as o, type SystemBackfillFailure as p, type SystemBackfillOptions as q, type SystemBackfillResult as r, securityHeaders as s, type GenerateGetMethods as t, type GenerateQueryMethods as u, type PaginationWithIncludeOptionsTyped as v, type PopulateOptionsTyped as w };
|