@toa.io/storages.mongodb 0.24.0-alpha.21 → 0.24.0-alpha.23
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 +7 -7
- package/types/connection.d.ts +15 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toa.io/storages.mongodb",
|
|
3
|
-
"version": "0.24.0-alpha.
|
|
3
|
+
"version": "0.24.0-alpha.23",
|
|
4
4
|
"description": "Toa MongoDB Storage Connector",
|
|
5
5
|
"author": "temich <tema.gurtovoy@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/toa-io/toa#readme",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@toa.io/console": "0.24.0-alpha.
|
|
23
|
-
"@toa.io/conveyor": "0.24.0-alpha.
|
|
24
|
-
"@toa.io/core": "0.24.0-alpha.
|
|
25
|
-
"@toa.io/generic": "0.24.0-alpha.
|
|
26
|
-
"@toa.io/pointer": "0.24.0-alpha.
|
|
22
|
+
"@toa.io/console": "0.24.0-alpha.23",
|
|
23
|
+
"@toa.io/conveyor": "0.24.0-alpha.23",
|
|
24
|
+
"@toa.io/core": "0.24.0-alpha.23",
|
|
25
|
+
"@toa.io/generic": "0.24.0-alpha.23",
|
|
26
|
+
"@toa.io/pointer": "0.24.0-alpha.23",
|
|
27
27
|
"mongodb": "6.3.0",
|
|
28
28
|
"saslprep": "1.0.3"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "df9de3cbb530e8f985a660bca0bf65bd027dbb01"
|
|
31
31
|
}
|
package/types/connection.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
// noinspection ES6UnusedImports
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
Document,
|
|
5
|
+
Filter,
|
|
6
|
+
FindOneAndReplaceOptions,
|
|
7
|
+
FindOneAndUpdateOptions,
|
|
8
|
+
FindOptions,
|
|
9
|
+
UpdateFilter,
|
|
10
10
|
} from 'mongodb'
|
|
11
11
|
|
|
12
12
|
import type { Connector } from '@toa.io/core'
|
|
13
13
|
import type { Record } from './record'
|
|
14
14
|
|
|
15
|
-
declare namespace toa.mongodb
|
|
15
|
+
declare namespace toa.mongodb{
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
interface Connection extends Connector{
|
|
18
|
+
get (query: Filter<Record>, options?: FindOptions<Record>): Promise<Record>
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
find (query: Filter<Record>, options?: FindOptions<Record>): Promise<Record[]>
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
add (record: Record): Promise<boolean>
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
addMany (records: Record[]): Promise<boolean>
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
replace (query: Filter<Record>, record: UpdateFilter<Record>, options?: FindOneAndReplaceOptions): Promise<any>
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
update (query: Filter<Record>, update: UpdateFilter<Record>, options?: FindOneAndUpdateOptions): Promise<any>
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
}
|