@lpdjs/firestore-repo-service 2.2.3 → 2.2.5
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 +40 -19
- package/dist/create-servers-D4-NGpKm.d.ts +105 -0
- package/dist/create-servers-DmggzSb3.d.cts +105 -0
- package/dist/{index-Bw1fvzu5.d.ts → index-Cvip2Sgt.d.ts} +2 -2
- package/dist/{index-bqqrGjxe.d.cts → index-DpD4DEqH.d.cts} +2 -2
- package/dist/index.cjs +137 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +137 -47
- package/dist/index.js.map +1 -1
- package/dist/openapi-B3P2F8op.d.ts +69 -0
- package/dist/openapi-UJJ1aCFk.d.cts +69 -0
- package/dist/queue-D_-aMf4H.d.ts +52 -0
- package/dist/queue-Dk1Ezhkf.d.cts +52 -0
- package/dist/servers/admin/index.d.cts +2 -2
- package/dist/servers/admin/index.d.ts +2 -2
- package/dist/servers/crud/index.cjs.map +1 -1
- package/dist/servers/crud/index.d.cts +4 -2
- package/dist/servers/crud/index.d.ts +4 -2
- package/dist/servers/crud/index.js.map +1 -1
- package/dist/servers/index.cjs +157 -67
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +9 -4
- package/dist/servers/index.d.ts +9 -4
- package/dist/servers/index.js +157 -67
- package/dist/servers/index.js.map +1 -1
- package/dist/sync/bigquery.d.cts +1 -1
- package/dist/sync/bigquery.d.ts +1 -1
- package/dist/sync/index.cjs +33 -33
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +5 -107
- package/dist/sync/index.d.ts +5 -107
- package/dist/sync/index.js +33 -33
- package/dist/sync/index.js.map +1 -1
- package/dist/{types-BbCdscqh.d.cts → types-CX5AbZWV.d.cts} +1 -1
- package/dist/{types-BbCdscqh.d.ts → types-CX5AbZWV.d.ts} +1 -1
- package/dist/{types-DKgWRTDf.d.cts → types-Z9Qy8Xmx.d.cts} +7 -68
- package/dist/{types-DKgWRTDf.d.ts → types-Z9Qy8Xmx.d.ts} +7 -68
- package/package.json +1 -1
|
@@ -337,4 +337,4 @@ interface FirestoreSyncConfig<M = Record<string, any>> {
|
|
|
337
337
|
repos?: TypedRepoSyncConfigs<M>;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
export type { AdminHttpsOptions as A, FirestoreSyncConfig as F, GenerateDDLConfig as G, LogicalType as L, OrFactory as O, PubSubClientDep as P, RepoSyncConfig as R,
|
|
340
|
+
export type { AdminHttpsOptions as A, FirestoreSyncConfig as F, GenerateDDLConfig as G, LogicalType as L, OrFactory as O, PubSubClientDep as P, RepoSyncConfig as R, SyncEvent as S, SqlAdapter as a, adminsyncConfig as b, SqlDialect as c, SqlColumn as d, SqlTableDef as e, SyncTriggersConfig as f, SyncWorkerConfig as g, FirestoreTriggersDep as h, PubSubHandlerDep as i, SyncDeps as j, SyncOperation as k, SyncWorkerOptions as l, adminsyncBasicAuth as m, adminsyncFeaturesFlag as n };
|
|
@@ -337,4 +337,4 @@ interface FirestoreSyncConfig<M = Record<string, any>> {
|
|
|
337
337
|
repos?: TypedRepoSyncConfigs<M>;
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
-
export type { AdminHttpsOptions as A, FirestoreSyncConfig as F, GenerateDDLConfig as G, LogicalType as L, OrFactory as O, PubSubClientDep as P, RepoSyncConfig as R,
|
|
340
|
+
export type { AdminHttpsOptions as A, FirestoreSyncConfig as F, GenerateDDLConfig as G, LogicalType as L, OrFactory as O, PubSubClientDep as P, RepoSyncConfig as R, SyncEvent as S, SqlAdapter as a, adminsyncConfig as b, SqlDialect as c, SqlColumn as d, SqlTableDef as e, SyncTriggersConfig as f, SyncWorkerConfig as g, FirestoreTriggersDep as h, PubSubHandlerDep as i, SyncDeps as j, SyncOperation as k, SyncWorkerOptions as l, adminsyncBasicAuth as m, adminsyncFeaturesFlag as n };
|
|
@@ -515,38 +515,14 @@ type ConfiguredRepository<T extends RepositoryConfig<any, any, any, any, any, an
|
|
|
515
515
|
};
|
|
516
516
|
|
|
517
517
|
/**
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
* Introspects each `CrudRepoEntry` and uses Zod 4's native `z.toJSONSchema()`
|
|
521
|
-
* to produce a fully typed OpenAPI document ready for Scalar UI or codegen.
|
|
522
|
-
*
|
|
523
|
-
* @module servers/crud/openapi
|
|
518
|
+
* Type definitions for the CRUD API server.
|
|
524
519
|
*/
|
|
525
520
|
|
|
526
|
-
/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
url: string;
|
|
532
|
-
description?: string;
|
|
533
|
-
}[];
|
|
534
|
-
paths: Record<string, Record<string, OpenAPIOperation>>;
|
|
535
|
-
components: {
|
|
536
|
-
schemas: Record<string, Record<string, unknown>>;
|
|
537
|
-
securitySchemes?: Record<string, Record<string, unknown>>;
|
|
538
|
-
};
|
|
539
|
-
security?: Record<string, string[]>[];
|
|
540
|
-
tags?: {
|
|
541
|
-
name: string;
|
|
542
|
-
description?: string;
|
|
543
|
-
}[];
|
|
544
|
-
}
|
|
545
|
-
interface OpenAPIInfo {
|
|
546
|
-
title: string;
|
|
547
|
-
version: string;
|
|
548
|
-
description?: string;
|
|
549
|
-
}
|
|
521
|
+
/**
|
|
522
|
+
* Options to control OpenAPI 3.1 spec generation for the CRUD server.
|
|
523
|
+
* Defined here (rather than in `./openapi`) to avoid a circular import:
|
|
524
|
+
* `openapi.ts` imports types from this module.
|
|
525
|
+
*/
|
|
550
526
|
interface OpenAPISpecOptions {
|
|
551
527
|
/** Document title (default: "CRUD API") */
|
|
552
528
|
title?: string;
|
|
@@ -562,43 +538,6 @@ interface OpenAPISpecOptions {
|
|
|
562
538
|
/** Whether the API requires auth — adds securitySchemes */
|
|
563
539
|
auth?: "basic" | "bearer" | false;
|
|
564
540
|
}
|
|
565
|
-
interface OpenAPIOperation {
|
|
566
|
-
operationId: string;
|
|
567
|
-
summary: string;
|
|
568
|
-
tags: string[];
|
|
569
|
-
parameters?: Record<string, unknown>[];
|
|
570
|
-
requestBody?: Record<string, unknown>;
|
|
571
|
-
responses: Record<string, Record<string, unknown>>;
|
|
572
|
-
security?: Record<string, string[]>[];
|
|
573
|
-
}
|
|
574
|
-
/**
|
|
575
|
-
* Generate a full OpenAPI 3.1 specification from a `CrudRepoRegistry`.
|
|
576
|
-
*
|
|
577
|
-
* Uses Zod 4's native `z.toJSONSchema()` to convert each repo's schema
|
|
578
|
-
* into a JSON Schema component, then assembles paths for the standard
|
|
579
|
-
* CRUD endpoints.
|
|
580
|
-
*
|
|
581
|
-
* @example
|
|
582
|
-
* ```ts
|
|
583
|
-
* import { generateOpenAPISpec } from "@lpdjs/firestore-repo-service/servers/crud";
|
|
584
|
-
*
|
|
585
|
-
* const spec = generateOpenAPISpec(registry, "/api", {
|
|
586
|
-
* title: "My API",
|
|
587
|
-
* version: "1.0.0",
|
|
588
|
-
* servers: [{ url: "https://my-api.example.com" }],
|
|
589
|
-
* auth: "bearer",
|
|
590
|
-
* });
|
|
591
|
-
*
|
|
592
|
-
* // Write to file
|
|
593
|
-
* fs.writeFileSync("openapi.json", JSON.stringify(spec, null, 2));
|
|
594
|
-
* ```
|
|
595
|
-
*/
|
|
596
|
-
declare function generateOpenAPISpec(registry: CrudRepoRegistry, basePath: string, options?: OpenAPISpecOptions): OpenAPIDocument;
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Type definitions for the CRUD API server.
|
|
600
|
-
*/
|
|
601
|
-
|
|
602
541
|
/**
|
|
603
542
|
* Extracts the model type `T` from a `ConfiguredRepository`.
|
|
604
543
|
* Uses a two-step inference so it survives intersection types
|
|
@@ -926,4 +865,4 @@ interface QueryRequestBody {
|
|
|
926
865
|
})[];
|
|
927
866
|
}
|
|
928
867
|
|
|
929
|
-
export { type ApiResponse as A, type BasicAuthConfig as B, type ConfiguredRepository as C, type ExtractDocumentRefSignature as E, type FieldPath as F, type GetOptions as G, type IncludeConfigTyped as I, type ListResponseData as L, type Middleware as M, type
|
|
868
|
+
export { type ApiResponse as A, type BasicAuthConfig as B, type ConfiguredRepository as C, type ExtractDocumentRefSignature as E, type FieldPath as F, type GetOptions as G, type IncludeConfigTyped as I, type ListResponseData as L, type Middleware as M, type OpenAPISpecOptions as O, type PaginationOptions as P, type QueryOptions as Q, type RepositoryConfig as R, type UserFieldPath as U, type WhereClause as W, type RelationConfig as a, type ExtractUpdateSignature as b, type GetResult as c, type RelationalKeys as d, createPaginationIterator as e, executePaginatedQuery as f, type PaginationResult as g, type GenerateGetMethods as h, type GenerateQueryMethods as i, type PaginationWithIncludeOptionsTyped as j, type PopulateOptionsTyped as k, type CrudRepoConfig as l, type CrudServerOptions as m, type FieldRole as n, type QueryRequestBody as o, type RepoFieldPath as p, type RepoRelationKeys as q, type CrudRepoEntry as r, type CrudRepoRegistry as s };
|
|
@@ -515,38 +515,14 @@ type ConfiguredRepository<T extends RepositoryConfig<any, any, any, any, any, an
|
|
|
515
515
|
};
|
|
516
516
|
|
|
517
517
|
/**
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
* Introspects each `CrudRepoEntry` and uses Zod 4's native `z.toJSONSchema()`
|
|
521
|
-
* to produce a fully typed OpenAPI document ready for Scalar UI or codegen.
|
|
522
|
-
*
|
|
523
|
-
* @module servers/crud/openapi
|
|
518
|
+
* Type definitions for the CRUD API server.
|
|
524
519
|
*/
|
|
525
520
|
|
|
526
|
-
/**
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
url: string;
|
|
532
|
-
description?: string;
|
|
533
|
-
}[];
|
|
534
|
-
paths: Record<string, Record<string, OpenAPIOperation>>;
|
|
535
|
-
components: {
|
|
536
|
-
schemas: Record<string, Record<string, unknown>>;
|
|
537
|
-
securitySchemes?: Record<string, Record<string, unknown>>;
|
|
538
|
-
};
|
|
539
|
-
security?: Record<string, string[]>[];
|
|
540
|
-
tags?: {
|
|
541
|
-
name: string;
|
|
542
|
-
description?: string;
|
|
543
|
-
}[];
|
|
544
|
-
}
|
|
545
|
-
interface OpenAPIInfo {
|
|
546
|
-
title: string;
|
|
547
|
-
version: string;
|
|
548
|
-
description?: string;
|
|
549
|
-
}
|
|
521
|
+
/**
|
|
522
|
+
* Options to control OpenAPI 3.1 spec generation for the CRUD server.
|
|
523
|
+
* Defined here (rather than in `./openapi`) to avoid a circular import:
|
|
524
|
+
* `openapi.ts` imports types from this module.
|
|
525
|
+
*/
|
|
550
526
|
interface OpenAPISpecOptions {
|
|
551
527
|
/** Document title (default: "CRUD API") */
|
|
552
528
|
title?: string;
|
|
@@ -562,43 +538,6 @@ interface OpenAPISpecOptions {
|
|
|
562
538
|
/** Whether the API requires auth — adds securitySchemes */
|
|
563
539
|
auth?: "basic" | "bearer" | false;
|
|
564
540
|
}
|
|
565
|
-
interface OpenAPIOperation {
|
|
566
|
-
operationId: string;
|
|
567
|
-
summary: string;
|
|
568
|
-
tags: string[];
|
|
569
|
-
parameters?: Record<string, unknown>[];
|
|
570
|
-
requestBody?: Record<string, unknown>;
|
|
571
|
-
responses: Record<string, Record<string, unknown>>;
|
|
572
|
-
security?: Record<string, string[]>[];
|
|
573
|
-
}
|
|
574
|
-
/**
|
|
575
|
-
* Generate a full OpenAPI 3.1 specification from a `CrudRepoRegistry`.
|
|
576
|
-
*
|
|
577
|
-
* Uses Zod 4's native `z.toJSONSchema()` to convert each repo's schema
|
|
578
|
-
* into a JSON Schema component, then assembles paths for the standard
|
|
579
|
-
* CRUD endpoints.
|
|
580
|
-
*
|
|
581
|
-
* @example
|
|
582
|
-
* ```ts
|
|
583
|
-
* import { generateOpenAPISpec } from "@lpdjs/firestore-repo-service/servers/crud";
|
|
584
|
-
*
|
|
585
|
-
* const spec = generateOpenAPISpec(registry, "/api", {
|
|
586
|
-
* title: "My API",
|
|
587
|
-
* version: "1.0.0",
|
|
588
|
-
* servers: [{ url: "https://my-api.example.com" }],
|
|
589
|
-
* auth: "bearer",
|
|
590
|
-
* });
|
|
591
|
-
*
|
|
592
|
-
* // Write to file
|
|
593
|
-
* fs.writeFileSync("openapi.json", JSON.stringify(spec, null, 2));
|
|
594
|
-
* ```
|
|
595
|
-
*/
|
|
596
|
-
declare function generateOpenAPISpec(registry: CrudRepoRegistry, basePath: string, options?: OpenAPISpecOptions): OpenAPIDocument;
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Type definitions for the CRUD API server.
|
|
600
|
-
*/
|
|
601
|
-
|
|
602
541
|
/**
|
|
603
542
|
* Extracts the model type `T` from a `ConfiguredRepository`.
|
|
604
543
|
* Uses a two-step inference so it survives intersection types
|
|
@@ -926,4 +865,4 @@ interface QueryRequestBody {
|
|
|
926
865
|
})[];
|
|
927
866
|
}
|
|
928
867
|
|
|
929
|
-
export { type ApiResponse as A, type BasicAuthConfig as B, type ConfiguredRepository as C, type ExtractDocumentRefSignature as E, type FieldPath as F, type GetOptions as G, type IncludeConfigTyped as I, type ListResponseData as L, type Middleware as M, type
|
|
868
|
+
export { type ApiResponse as A, type BasicAuthConfig as B, type ConfiguredRepository as C, type ExtractDocumentRefSignature as E, type FieldPath as F, type GetOptions as G, type IncludeConfigTyped as I, type ListResponseData as L, type Middleware as M, type OpenAPISpecOptions as O, type PaginationOptions as P, type QueryOptions as Q, type RepositoryConfig as R, type UserFieldPath as U, type WhereClause as W, type RelationConfig as a, type ExtractUpdateSignature as b, type GetResult as c, type RelationalKeys as d, createPaginationIterator as e, executePaginatedQuery as f, type PaginationResult as g, type GenerateGetMethods as h, type GenerateQueryMethods as i, type PaginationWithIncludeOptionsTyped as j, type PopulateOptionsTyped as k, type CrudRepoConfig as l, type CrudServerOptions as m, type FieldRole as n, type QueryRequestBody as o, type RepoFieldPath as p, type RepoRelationKeys as q, type CrudRepoEntry as r, type CrudRepoRegistry as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lpdjs/firestore-repo-service",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "⚡ Type-safe Firestore ORM with auto-generated repositories, advanced queries, relations with typed select, pagination with include, batch/bulk operations, aggregations and transactions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|