@lpdjs/firestore-repo-service 2.2.4 → 2.2.6

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 (40) hide show
  1. package/README.md +40 -19
  2. package/dist/create-servers-D4-NGpKm.d.ts +105 -0
  3. package/dist/create-servers-DmggzSb3.d.cts +105 -0
  4. package/dist/{index-BiWZwHS_.d.ts → index-Cvip2Sgt.d.ts} +1 -1
  5. package/dist/{index-B3-vAYx0.d.cts → index-DpD4DEqH.d.cts} +1 -1
  6. package/dist/index.cjs +619 -57
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +7 -2
  9. package/dist/index.d.ts +7 -2
  10. package/dist/index.js +619 -57
  11. package/dist/index.js.map +1 -1
  12. package/dist/openapi-B3P2F8op.d.ts +69 -0
  13. package/dist/openapi-UJJ1aCFk.d.cts +69 -0
  14. package/dist/queue-D_-aMf4H.d.ts +52 -0
  15. package/dist/queue-Dk1Ezhkf.d.cts +52 -0
  16. package/dist/servers/admin/index.cjs +547 -75
  17. package/dist/servers/admin/index.cjs.map +1 -1
  18. package/dist/servers/admin/index.d.cts +1 -1
  19. package/dist/servers/admin/index.d.ts +1 -1
  20. package/dist/servers/admin/index.js +547 -75
  21. package/dist/servers/admin/index.js.map +1 -1
  22. package/dist/servers/crud/index.d.cts +5 -69
  23. package/dist/servers/crud/index.d.ts +5 -69
  24. package/dist/servers/index.cjs +637 -75
  25. package/dist/servers/index.cjs.map +1 -1
  26. package/dist/servers/index.d.cts +10 -5
  27. package/dist/servers/index.d.ts +10 -5
  28. package/dist/servers/index.js +637 -75
  29. package/dist/servers/index.js.map +1 -1
  30. package/dist/sync/bigquery.d.cts +1 -1
  31. package/dist/sync/bigquery.d.ts +1 -1
  32. package/dist/sync/index.cjs +33 -33
  33. package/dist/sync/index.cjs.map +1 -1
  34. package/dist/sync/index.d.cts +5 -107
  35. package/dist/sync/index.d.ts +5 -107
  36. package/dist/sync/index.js +33 -33
  37. package/dist/sync/index.js.map +1 -1
  38. package/dist/{types-BbCdscqh.d.cts → types-CX5AbZWV.d.cts} +1 -1
  39. package/dist/{types-BbCdscqh.d.ts → types-CX5AbZWV.d.ts} +1 -1
  40. package/package.json +1 -1
@@ -1,75 +1,11 @@
1
1
  import { HttpsOptions } from 'firebase-functions/v2/https';
2
- import { s as CrudRepoRegistry, O as OpenAPISpecOptions, C as ConfiguredRepository, m as CrudServerOptions } from '../../types-Z9Qy8Xmx.cjs';
3
- export { A as ApiResponse, B as BasicAuthConfig, l as CrudRepoConfig, r as CrudRepoEntry, n as FieldRole, L as ListResponseData, M as Middleware, o as QueryRequestBody, p as RepoFieldPath, q as RepoRelationKeys, U as UserFieldPath } from '../../types-Z9Qy8Xmx.cjs';
2
+ import { C as ConfiguredRepository, m as CrudServerOptions } from '../../types-Z9Qy8Xmx.cjs';
3
+ export { A as ApiResponse, B as BasicAuthConfig, l as CrudRepoConfig, r as CrudRepoEntry, s as CrudRepoRegistry, n as FieldRole, L as ListResponseData, M as Middleware, O as OpenAPISpecOptions, o as QueryRequestBody, p as RepoFieldPath, q as RepoRelationKeys, U as UserFieldPath } from '../../types-Z9Qy8Xmx.cjs';
4
+ import { O as OpenAPIDocument } from '../../openapi-UJJ1aCFk.cjs';
5
+ export { g as generateOpenAPISpec } from '../../openapi-UJJ1aCFk.cjs';
4
6
  import 'zod';
5
7
  import 'firebase-admin/firestore';
6
8
 
7
- /**
8
- * OpenAPI 3.1 specification generator for the CRUD server.
9
- *
10
- * Introspects each `CrudRepoEntry` and uses Zod 4's native `z.toJSONSchema()`
11
- * to produce a fully typed OpenAPI document ready for Scalar UI or codegen.
12
- *
13
- * @module servers/crud/openapi
14
- */
15
-
16
- /** Minimal subset of an OpenAPI 3.1 document we produce. */
17
- interface OpenAPIDocument {
18
- openapi: "3.1.0";
19
- info: OpenAPIInfo;
20
- servers?: {
21
- url: string;
22
- description?: string;
23
- }[];
24
- paths: Record<string, Record<string, OpenAPIOperation>>;
25
- components: {
26
- schemas: Record<string, Record<string, unknown>>;
27
- securitySchemes?: Record<string, Record<string, unknown>>;
28
- };
29
- security?: Record<string, string[]>[];
30
- tags?: {
31
- name: string;
32
- description?: string;
33
- }[];
34
- }
35
- interface OpenAPIInfo {
36
- title: string;
37
- version: string;
38
- description?: string;
39
- }
40
- interface OpenAPIOperation {
41
- operationId: string;
42
- summary: string;
43
- tags: string[];
44
- parameters?: Record<string, unknown>[];
45
- requestBody?: Record<string, unknown>;
46
- responses: Record<string, Record<string, unknown>>;
47
- security?: Record<string, string[]>[];
48
- }
49
- /**
50
- * Generate a full OpenAPI 3.1 specification from a `CrudRepoRegistry`.
51
- *
52
- * Uses Zod 4's native `z.toJSONSchema()` to convert each repo's schema
53
- * into a JSON Schema component, then assembles paths for the standard
54
- * CRUD endpoints.
55
- *
56
- * @example
57
- * ```ts
58
- * import { generateOpenAPISpec } from "@lpdjs/firestore-repo-service/servers/crud";
59
- *
60
- * const spec = generateOpenAPISpec(registry, "/api", {
61
- * title: "My API",
62
- * version: "1.0.0",
63
- * servers: [{ url: "https://my-api.example.com" }],
64
- * auth: "bearer",
65
- * });
66
- *
67
- * // Write to file
68
- * fs.writeFileSync("openapi.json", JSON.stringify(spec, null, 2));
69
- * ```
70
- */
71
- declare function generateOpenAPISpec(registry: CrudRepoRegistry, basePath: string, options?: OpenAPISpecOptions): OpenAPIDocument;
72
-
73
9
  /**
74
10
  * @module servers/crud
75
11
  *
@@ -247,4 +183,4 @@ declare function createCrudServer<TRepos extends Record<string, ConfiguredReposi
247
183
  httpsOptions?: HttpsOptions;
248
184
  };
249
185
 
250
- export { CrudRepoRegistry, CrudServerOptions, type OpenAPIDocument, OpenAPISpecOptions, createCrudServer, generateOpenAPISpec };
186
+ export { CrudServerOptions, OpenAPIDocument, createCrudServer };
@@ -1,75 +1,11 @@
1
1
  import { HttpsOptions } from 'firebase-functions/v2/https';
2
- import { s as CrudRepoRegistry, O as OpenAPISpecOptions, C as ConfiguredRepository, m as CrudServerOptions } from '../../types-Z9Qy8Xmx.js';
3
- export { A as ApiResponse, B as BasicAuthConfig, l as CrudRepoConfig, r as CrudRepoEntry, n as FieldRole, L as ListResponseData, M as Middleware, o as QueryRequestBody, p as RepoFieldPath, q as RepoRelationKeys, U as UserFieldPath } from '../../types-Z9Qy8Xmx.js';
2
+ import { C as ConfiguredRepository, m as CrudServerOptions } from '../../types-Z9Qy8Xmx.js';
3
+ export { A as ApiResponse, B as BasicAuthConfig, l as CrudRepoConfig, r as CrudRepoEntry, s as CrudRepoRegistry, n as FieldRole, L as ListResponseData, M as Middleware, O as OpenAPISpecOptions, o as QueryRequestBody, p as RepoFieldPath, q as RepoRelationKeys, U as UserFieldPath } from '../../types-Z9Qy8Xmx.js';
4
+ import { O as OpenAPIDocument } from '../../openapi-B3P2F8op.js';
5
+ export { g as generateOpenAPISpec } from '../../openapi-B3P2F8op.js';
4
6
  import 'zod';
5
7
  import 'firebase-admin/firestore';
6
8
 
7
- /**
8
- * OpenAPI 3.1 specification generator for the CRUD server.
9
- *
10
- * Introspects each `CrudRepoEntry` and uses Zod 4's native `z.toJSONSchema()`
11
- * to produce a fully typed OpenAPI document ready for Scalar UI or codegen.
12
- *
13
- * @module servers/crud/openapi
14
- */
15
-
16
- /** Minimal subset of an OpenAPI 3.1 document we produce. */
17
- interface OpenAPIDocument {
18
- openapi: "3.1.0";
19
- info: OpenAPIInfo;
20
- servers?: {
21
- url: string;
22
- description?: string;
23
- }[];
24
- paths: Record<string, Record<string, OpenAPIOperation>>;
25
- components: {
26
- schemas: Record<string, Record<string, unknown>>;
27
- securitySchemes?: Record<string, Record<string, unknown>>;
28
- };
29
- security?: Record<string, string[]>[];
30
- tags?: {
31
- name: string;
32
- description?: string;
33
- }[];
34
- }
35
- interface OpenAPIInfo {
36
- title: string;
37
- version: string;
38
- description?: string;
39
- }
40
- interface OpenAPIOperation {
41
- operationId: string;
42
- summary: string;
43
- tags: string[];
44
- parameters?: Record<string, unknown>[];
45
- requestBody?: Record<string, unknown>;
46
- responses: Record<string, Record<string, unknown>>;
47
- security?: Record<string, string[]>[];
48
- }
49
- /**
50
- * Generate a full OpenAPI 3.1 specification from a `CrudRepoRegistry`.
51
- *
52
- * Uses Zod 4's native `z.toJSONSchema()` to convert each repo's schema
53
- * into a JSON Schema component, then assembles paths for the standard
54
- * CRUD endpoints.
55
- *
56
- * @example
57
- * ```ts
58
- * import { generateOpenAPISpec } from "@lpdjs/firestore-repo-service/servers/crud";
59
- *
60
- * const spec = generateOpenAPISpec(registry, "/api", {
61
- * title: "My API",
62
- * version: "1.0.0",
63
- * servers: [{ url: "https://my-api.example.com" }],
64
- * auth: "bearer",
65
- * });
66
- *
67
- * // Write to file
68
- * fs.writeFileSync("openapi.json", JSON.stringify(spec, null, 2));
69
- * ```
70
- */
71
- declare function generateOpenAPISpec(registry: CrudRepoRegistry, basePath: string, options?: OpenAPISpecOptions): OpenAPIDocument;
72
-
73
9
  /**
74
10
  * @module servers/crud
75
11
  *
@@ -247,4 +183,4 @@ declare function createCrudServer<TRepos extends Record<string, ConfiguredReposi
247
183
  httpsOptions?: HttpsOptions;
248
184
  };
249
185
 
250
- export { CrudRepoRegistry, CrudServerOptions, type OpenAPIDocument, OpenAPISpecOptions, createCrudServer, generateOpenAPISpec };
186
+ export { CrudServerOptions, OpenAPIDocument, createCrudServer };