@opra/mongodb 0.26.0 → 0.26.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/mongodb",
3
- "version": "0.26.0",
3
+ "version": "0.26.2",
4
4
  "description": "Opra MongoDB adapter package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -28,13 +28,13 @@
28
28
  "lodash": "^4.17.21"
29
29
  },
30
30
  "devDependencies": {
31
- "@faker-js/faker": "^8.0.2",
32
- "mongodb": "^6.0.0",
31
+ "@faker-js/faker": "^8.1.0",
32
+ "mongodb": "^6.1.0",
33
33
  "ts-gems": "^2.5.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@opra/common": "^0.26.0",
37
- "@opra/core": "^0.26.0",
36
+ "@opra/common": "^0.26.1",
37
+ "@opra/core": "^0.26.1",
38
38
  "mongodb": ">=6.x.x"
39
39
  },
40
40
  "type": "module",
@@ -58,4 +58,4 @@
58
58
  "mongodb",
59
59
  "adapter"
60
60
  ]
61
- }
61
+ }
@@ -11,13 +11,13 @@ export declare namespace MongoCollection {
11
11
  export declare abstract class MongoCollection<T extends mongodb.Document> implements ICollection<T> {
12
12
  defaultLimit?: number;
13
13
  constructor(options?: MongoCollection.Options);
14
- create?(ctx: Collection.Create.Context): Promise<PartialOutput<T>>;
15
- delete?(ctx: RequestContext): Promise<number>;
16
- deleteMany?(ctx: RequestContext): Promise<number>;
17
- get?(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
18
- update?(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
19
- updateMany?(ctx: RequestContext): Promise<number>;
20
- findMany?(ctx: RequestContext): Promise<PartialOutput<T>[]>;
14
+ create(ctx: Collection.Create.Context): Promise<PartialOutput<T>>;
15
+ delete(ctx: RequestContext): Promise<number>;
16
+ deleteMany(ctx: RequestContext): Promise<number>;
17
+ get(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
18
+ update(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
19
+ updateMany(ctx: RequestContext): Promise<number>;
20
+ findMany(ctx: RequestContext): Promise<PartialOutput<T>[]>;
21
21
  abstract getService(ctx: RequestContext): MongoEntityService<T> | Promise<MongoEntityService<T>>;
22
22
  onPrepare?(ctx: RequestContext, prepared: any): any;
23
23
  protected _onPrepare(ctx: RequestContext, prepared: any): any;
@@ -5,9 +5,9 @@ import { RequestContext } from '@opra/core';
5
5
  import { MongoEntityService } from './mongo-entity-service.js';
6
6
  export declare abstract class MongoSingleton<T extends mongodb.Document> {
7
7
  defaultLimit: number;
8
- create?(ctx: RequestContext): Promise<PartialOutput<T>>;
9
- delete?(ctx: RequestContext): Promise<number>;
10
- get?(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
11
- update?(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
8
+ create(ctx: RequestContext): Promise<PartialOutput<T>>;
9
+ delete(ctx: RequestContext): Promise<number>;
10
+ get(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
11
+ update(ctx: RequestContext): Promise<Maybe<PartialOutput<T>>>;
12
12
  abstract getService(ctx: RequestContext): MongoEntityService<T> | Promise<MongoEntityService<T>>;
13
13
  }