flongo 1.0.0 → 1.0.1

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.
@@ -1,5 +1,5 @@
1
1
  import { FlongoQuery } from "./flongoQuery";
2
- import { Entity, Event, EventName, Pagination, Repository } from "./types";
2
+ import { Entity, Event, Pagination, Repository } from "./types";
3
3
  /**
4
4
  * Configuration options for FlongoCollection instances
5
5
  */
@@ -187,6 +187,6 @@ export declare class FlongoCollection<T> {
187
187
  * @param event - Event object with name and metadata
188
188
  * @returns Promise resolving to the event ID (or null if logging disabled)
189
189
  */
190
- logEvent<T extends EventName>(event: Event<T>): Promise<string | null>;
190
+ logEvent<T>(event: Event<T>): Promise<string | null>;
191
191
  }
192
192
  //# sourceMappingURL=flongoCollection.d.ts.map
@@ -89,7 +89,7 @@ class FlongoCollection {
89
89
  */
90
90
  async getAll(query, pagination) {
91
91
  const mongodbQuery = query?.build() ?? {};
92
- const mongodbOptions = query?.buildOptions(pagination) ?? (new flongoQuery_1.FlongoQuery()).buildOptions(pagination);
92
+ const mongodbOptions = query?.buildOptions(pagination) ?? new flongoQuery_1.FlongoQuery().buildOptions(pagination);
93
93
  try {
94
94
  const res = await this.collection.find(mongodbQuery, mongodbOptions).toArray();
95
95
  return res.map((d) => this.toEntity(d));
package/dist/types.d.ts CHANGED
@@ -33,7 +33,7 @@ export declare enum EventName {
33
33
  DeleteEntity = "delete_entity",
34
34
  BatchDeleteEntities = "batch_delete_entities"
35
35
  }
36
- export type Event<T extends EventName = any> = {
36
+ export type Event<T> = {
37
37
  name: T;
38
38
  identity?: string;
39
39
  value: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flongo",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Firestore-like fluent query API for MongoDB",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",