@lowdefy/connection-mongodb 4.0.0-alpha.1 → 4.0.0-alpha.10
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/dist/connections/MongoDBCollection/MongoDBAggregation/MongoDBAggregation.js +9 -3
- package/dist/connections/MongoDBCollection/MongoDBAggregation/schema.js +42 -0
- package/dist/connections/MongoDBCollection/MongoDBCollection.js +3 -4
- package/dist/connections/MongoDBCollection/MongoDBDeleteMany/MongoDBDeleteMany.js +11 -4
- package/dist/connections/MongoDBCollection/MongoDBDeleteMany/schema.js +42 -0
- package/dist/connections/MongoDBCollection/MongoDBDeleteOne/MongoDBDeleteOne.js +11 -4
- package/dist/connections/MongoDBCollection/MongoDBDeleteOne/schema.js +42 -0
- package/dist/connections/MongoDBCollection/MongoDBFind/MongoDBFind.js +9 -3
- package/dist/connections/MongoDBCollection/MongoDBFind/schema.js +42 -0
- package/dist/connections/MongoDBCollection/MongoDBFindOne/MongoDBFindOne.js +9 -3
- package/dist/connections/MongoDBCollection/MongoDBFindOne/schema.js +42 -0
- package/dist/connections/MongoDBCollection/MongoDBInsertMany/MongoDBInsertMany.js +12 -6
- package/dist/connections/MongoDBCollection/MongoDBInsertMany/schema.js +48 -0
- package/dist/connections/MongoDBCollection/MongoDBInsertOne/MongoDBInsertOne.js +12 -7
- package/dist/connections/MongoDBCollection/MongoDBInsertOne/schema.js +42 -0
- package/dist/connections/MongoDBCollection/MongoDBUpdateMany/MongoDBUpdateMany.js +9 -3
- package/dist/connections/MongoDBCollection/MongoDBUpdateMany/schema.js +56 -0
- package/dist/connections/MongoDBCollection/MongoDBUpdateOne/MongoDBUpdateOne.js +9 -3
- package/dist/connections/MongoDBCollection/MongoDBUpdateOne/schema.js +56 -0
- package/dist/connections/MongoDBCollection/getCollection.js +1 -1
- package/dist/connections/MongoDBCollection/schema.js +69 -0
- package/dist/connections/MongoDBCollection/serialize.js +5 -5
- package/dist/{connections/MongoDBCollection/MongoDBFind/index.js → connections.js} +2 -11
- package/dist/{connections/MongoDBCollection/MongoDBFindOne/index.js → types.js} +7 -11
- package/package.json +14 -13
- package/dist/connections/MongoDBCollection/MongoDBAggregation/MongoDBAggregationSchema.json +0 -26
- package/dist/connections/MongoDBCollection/MongoDBAggregation/index.js +0 -24
- package/dist/connections/MongoDBCollection/MongoDBCollectionSchema.json +0 -52
- package/dist/connections/MongoDBCollection/MongoDBDeleteMany/MongoDBDeleteManySchema.json +0 -26
- package/dist/connections/MongoDBCollection/MongoDBDeleteMany/index.js +0 -24
- package/dist/connections/MongoDBCollection/MongoDBDeleteOne/MongoDBDeleteOneSchema.json +0 -26
- package/dist/connections/MongoDBCollection/MongoDBDeleteOne/index.js +0 -24
- package/dist/connections/MongoDBCollection/MongoDBFind/MongoDBFindSchema.json +0 -26
- package/dist/connections/MongoDBCollection/MongoDBFindOne/MongoDBFindOneSchema.json +0 -26
- package/dist/connections/MongoDBCollection/MongoDBInsertMany/MongoDBInsertManySchema.json +0 -32
- package/dist/connections/MongoDBCollection/MongoDBInsertMany/index.js +0 -24
- package/dist/connections/MongoDBCollection/MongoDBInsertOne/MongoDBInsertOneSchema.json +0 -26
- package/dist/connections/MongoDBCollection/MongoDBInsertOne/index.js +0 -24
- package/dist/connections/MongoDBCollection/MongoDBUpdateMany/MongoDBUpdateManySchema.json +0 -36
- package/dist/connections/MongoDBCollection/MongoDBUpdateMany/index.js +0 -24
- package/dist/connections/MongoDBCollection/MongoDBUpdateOne/MongoDBUpdateOneSchema.json +0 -36
- package/dist/connections/MongoDBCollection/MongoDBUpdateOne/index.js +0 -24
- package/dist/index.js +0 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import getCollection from '../getCollection.js';
|
|
16
16
|
import { serialize, deserialize } from '../serialize.js';
|
|
17
|
-
|
|
17
|
+
import schema from './schema.js';
|
|
18
|
+
async function MongodbUpdateOne({ request , connection }) {
|
|
18
19
|
const deserializedRequest = deserialize(request);
|
|
19
20
|
const { filter , update , options } = deserializedRequest;
|
|
20
21
|
const { collection , client } = await getCollection({
|
|
@@ -36,4 +37,9 @@ async function mongodbUpdateOne({ request , connection }) {
|
|
|
36
37
|
matchedCount
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
+
MongodbUpdateOne.schema = schema;
|
|
41
|
+
MongodbUpdateOne.meta = {
|
|
42
|
+
checkRead: false,
|
|
43
|
+
checkWrite: true
|
|
44
|
+
};
|
|
45
|
+
export default MongodbUpdateOne;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Request Schema - MongoDBUpdateOne',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'filter',
|
|
21
|
+
'update'
|
|
22
|
+
],
|
|
23
|
+
properties: {
|
|
24
|
+
filter: {
|
|
25
|
+
type: 'object',
|
|
26
|
+
description: 'The filter used to select the document to update.',
|
|
27
|
+
errorMessage: {
|
|
28
|
+
type: 'MongoDBUpdateOne request property "filter" should be an object.'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
update: {
|
|
32
|
+
type: [
|
|
33
|
+
'object',
|
|
34
|
+
'array'
|
|
35
|
+
],
|
|
36
|
+
description: 'The update operations to be applied to the document.',
|
|
37
|
+
errorMessage: {
|
|
38
|
+
type: 'MongoDBUpdateOne request property "update" should be an object.'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
options: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
description: 'Optional settings.',
|
|
44
|
+
errorMessage: {
|
|
45
|
+
type: 'MongoDBUpdateOne request property "options" should be an object.'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
errorMessage: {
|
|
50
|
+
type: 'MongoDBUpdateOne request properties should be an object.',
|
|
51
|
+
required: {
|
|
52
|
+
filter: 'MongoDBUpdateOne request should have required property "filter".',
|
|
53
|
+
update: 'MongoDBUpdateOne request should have required property "update".'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Connection Schema - MongoDBCollection',
|
|
18
|
+
type: 'object',
|
|
19
|
+
required: [
|
|
20
|
+
'databaseUri',
|
|
21
|
+
'collection'
|
|
22
|
+
],
|
|
23
|
+
properties: {
|
|
24
|
+
databaseUri: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Connection uri string for the MongoDb deployment.',
|
|
27
|
+
errorMessage: {
|
|
28
|
+
type: 'MongoDBCollection connection property "databaseUri" should be a string.'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
databaseName: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'AWS IAM secret access key with s3 access.',
|
|
34
|
+
errorMessage: {
|
|
35
|
+
type: 'MongoDBCollection connection property "databaseName" should be a string.'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
collection: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'AWS region the bucket is located in.',
|
|
41
|
+
errorMessage: {
|
|
42
|
+
type: 'MongoDBCollection connection property "collection" should be a string.'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
read: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
default: true,
|
|
48
|
+
description: 'Allow reads from the collection.',
|
|
49
|
+
errorMessage: {
|
|
50
|
+
type: 'MongoDBCollection connection property "read" should be a boolean.'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
write: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
default: false,
|
|
56
|
+
description: 'Allow writes to the collection.',
|
|
57
|
+
errorMessage: {
|
|
58
|
+
type: 'MongoDBCollection connection property "write" should be a boolean.'
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
errorMessage: {
|
|
63
|
+
type: 'MongoDBCollection connection properties should be an object.',
|
|
64
|
+
required: {
|
|
65
|
+
databaseUri: 'MongoDBCollection connection should have required property "databaseUri".',
|
|
66
|
+
collection: 'MongoDBCollection connection should have required property "collection".'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ import {
|
|
15
|
+
*/ import { ObjectId } from 'mongodb';
|
|
16
16
|
import { type } from '@lowdefy/helpers';
|
|
17
17
|
function replacer(_, value) {
|
|
18
18
|
if (type.isObject(value)) {
|
|
19
19
|
Object.keys(value).forEach((key)=>{
|
|
20
|
-
if (value[key] instanceof
|
|
20
|
+
if (value[key] instanceof ObjectId) {
|
|
21
21
|
// eslint-disable-next-line no-param-reassign
|
|
22
22
|
value[key] = {
|
|
23
23
|
_oid: value[key].toHexString()
|
|
@@ -34,7 +34,7 @@ function replacer(_, value) {
|
|
|
34
34
|
}
|
|
35
35
|
if (type.isArray(value)) {
|
|
36
36
|
return value.map((item)=>{
|
|
37
|
-
if (item instanceof
|
|
37
|
+
if (item instanceof ObjectId) {
|
|
38
38
|
return {
|
|
39
39
|
_oid: item.toHexString()
|
|
40
40
|
};
|
|
@@ -52,7 +52,7 @@ function replacer(_, value) {
|
|
|
52
52
|
function reviver(key, value) {
|
|
53
53
|
if (type.isObject(value)) {
|
|
54
54
|
if (value._oid) {
|
|
55
|
-
return
|
|
55
|
+
return ObjectId.createFromHexString(value._oid);
|
|
56
56
|
}
|
|
57
57
|
if (type.isInt(value._date) || type.isString(value._date)) {
|
|
58
58
|
return new Date(value._date);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,13 +12,4 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ export default
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/MongoDBCollection/MongoDBFind/MongoDBFind.js',
|
|
18
|
-
schema: 'connections/MongoDBCollection/MongoDBFind/MongoDBFindSchema.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: true,
|
|
22
|
-
checkWrite: false
|
|
23
|
-
}
|
|
24
|
-
};
|
|
15
|
+
*/ export { default as MongoDBCollection } from './connections/MongoDBCollection/MongoDBCollection.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -12,13 +12,9 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: true,
|
|
22
|
-
checkWrite: false
|
|
23
|
-
}
|
|
15
|
+
*/ import * as connections from './connections.js';
|
|
16
|
+
export default {
|
|
17
|
+
connections: Object.keys(connections),
|
|
18
|
+
requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)
|
|
19
|
+
).flat()
|
|
24
20
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-mongodb",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.10",
|
|
4
4
|
"licence": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"lowdefy connection"
|
|
9
|
+
"lowdefy connection",
|
|
10
|
+
"lowdefy plugin"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
},
|
|
28
29
|
"type": "module",
|
|
29
30
|
"exports": {
|
|
30
|
-
"
|
|
31
|
-
"./
|
|
31
|
+
"./connections": "./dist/connections.js",
|
|
32
|
+
"./types": "./dist/types.js"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
34
35
|
"dist/*"
|
|
@@ -41,20 +42,20 @@
|
|
|
41
42
|
"test": "jest --coverage"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
45
|
-
"mongodb": "
|
|
45
|
+
"@lowdefy/helpers": "4.0.0-alpha.10",
|
|
46
|
+
"mongodb": "4.4.0",
|
|
46
47
|
"saslprep": "1.0.3"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@lowdefy/ajv": "4.0.0-alpha.
|
|
50
|
-
"@shelf/jest-mongodb": "2.
|
|
51
|
-
"@swc/cli": "0.1.
|
|
52
|
-
"@swc/core": "1.2.
|
|
53
|
-
"@swc/jest": "0.2.
|
|
54
|
-
"jest": "27.
|
|
50
|
+
"@lowdefy/ajv": "4.0.0-alpha.10",
|
|
51
|
+
"@shelf/jest-mongodb": "2.2.0",
|
|
52
|
+
"@swc/cli": "0.1.55",
|
|
53
|
+
"@swc/core": "1.2.135",
|
|
54
|
+
"@swc/jest": "0.2.17",
|
|
55
|
+
"jest": "27.5.1"
|
|
55
56
|
},
|
|
56
57
|
"publishConfig": {
|
|
57
58
|
"access": "public"
|
|
58
59
|
},
|
|
59
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "d697b4b5f354697d9481a371b90a00ca0944f486"
|
|
60
61
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBAggregation",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["pipeline"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"pipeline": {
|
|
8
|
-
"type": "array",
|
|
9
|
-
"description": "Array containing all the aggregation framework commands for the execution.",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBAggregation request property \"pipeline\" should be an array."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"options": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Optional settings.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBAggregation request property \"options\" should be an object."
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "MongoDBAggregation request properties should be an object.",
|
|
24
|
-
"required": "MongoDBAggregation request should have required property \"pipeline\"."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/MongoDBCollection/MongoDBAggregation/MongoDBAggregation.js',
|
|
18
|
-
schema: 'connections/MongoDBCollection/MongoDBAggregation/MongoDBAggregationSchema.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: true,
|
|
22
|
-
checkWrite: false
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Connection Schema - MongoDBCollection",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["databaseUri", "collection"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"databaseUri": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Connection uri string for the MongoDb deployment.",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBCollection connection property \"databaseUri\" should be a string."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"databaseName": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "AWS IAM secret access key with s3 access.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBCollection connection property \"databaseName\" should be a string."
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"collection": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "AWS region the bucket is located in.",
|
|
24
|
-
"errorMessage": {
|
|
25
|
-
"type": "MongoDBCollection connection property \"collection\" should be a string."
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"read": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"default": true,
|
|
31
|
-
"description": "Allow reads from the collection.",
|
|
32
|
-
"errorMessage": {
|
|
33
|
-
"type": "MongoDBCollection connection property \"read\" should be a boolean."
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"write": {
|
|
37
|
-
"type": "boolean",
|
|
38
|
-
"default": false,
|
|
39
|
-
"description": "Allow writes to the collection.",
|
|
40
|
-
"errorMessage": {
|
|
41
|
-
"type": "MongoDBCollection connection property \"write\" should be a boolean."
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"errorMessage": {
|
|
46
|
-
"type": "MongoDBCollection connection properties should be an object.",
|
|
47
|
-
"required": {
|
|
48
|
-
"databaseUri": "MongoDBCollection connection should have required property \"databaseUri\".",
|
|
49
|
-
"collection": "MongoDBCollection connection should have required property \"collection\"."
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBDeleteMany",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["filter"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"filter": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "The filter used to select the document to update.",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBDeleteMany request property \"filter\" should be an object."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"options": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Optional settings.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBDeleteMany request property \"options\" should be an object."
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "MongoDBDeleteMany request properties should be an object.",
|
|
24
|
-
"required": "MongoDBDeleteMany request should have required property \"filter\"."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/MongoDBCollection/MongoDBDeleteMany/MongoDBDeleteMany.js',
|
|
18
|
-
schema: 'connections/MongoDBCollection/MongoDBDeleteMany/MongoDBDeleteManySchema.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: true
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBDeleteOne",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["filter"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"filter": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "The filter used to select the document to update.",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBDeleteOne request property \"filter\" should be an object."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"options": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Optional settings.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBDeleteOne request property \"options\" should be an object."
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "MongoDBDeleteOne request properties should be an object.",
|
|
24
|
-
"required": "MongoDBDeleteOne request should have required property \"filter\"."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/MongoDBCollection/MongoDBDeleteOne/MongoDBDeleteOne.js',
|
|
18
|
-
schema: 'connections/MongoDBCollection/MongoDBDeleteOne/MongoDBDeleteOneSchema.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: true
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBFind",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["query"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"query": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "A MongoDB query object",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBFind request property \"query\" should be an object."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"options": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Optional settings.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBFind request property \"options\" should be an object."
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "MongoDBFind request properties should be an object.",
|
|
24
|
-
"required": "MongoDBFind request should have required property \"query\"."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBFindOne",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["query"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"query": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "A MongoDB query object",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBFindOne request property \"query\" should be an object."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"options": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Optional settings.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBFindOne request property \"options\" should be an object."
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "MongoDBFindOne request properties should be an object.",
|
|
24
|
-
"required": "MongoDBFindOne request should have required property \"query\"."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBInsertMany",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["docs"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"docs": {
|
|
8
|
-
"type": "array",
|
|
9
|
-
"description": "The array of documents to be inserted.",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBInsertMany request property \"docs\" should be an array."
|
|
12
|
-
},
|
|
13
|
-
"items": {
|
|
14
|
-
"type": "object",
|
|
15
|
-
"errorMessage": {
|
|
16
|
-
"type": "MongoDBInsertMany request property \"docs\" should be an array of documents to insert."
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"options": {
|
|
21
|
-
"type": "object",
|
|
22
|
-
"description": "Optional settings.",
|
|
23
|
-
"errorMessage": {
|
|
24
|
-
"type": "MongoDBInsertMany request property \"options\" should be an object."
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
"errorMessage": {
|
|
29
|
-
"type": "MongoDBInsertMany request properties should be an object.",
|
|
30
|
-
"required": "MongoDBInsertMany request should have required property \"docs\"."
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/MongoDBCollection/MongoDBInsertMany/MongoDBInsertMany.test.js',
|
|
18
|
-
schema: 'connections/MongoDBCollection/MongoDBInsertMany/MongoDBInsertManySchema.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: true
|
|
23
|
-
}
|
|
24
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - MongoDBInsertOne",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"required": ["doc"],
|
|
6
|
-
"properties": {
|
|
7
|
-
"doc": {
|
|
8
|
-
"type": "object",
|
|
9
|
-
"description": "The document to be inserted.",
|
|
10
|
-
"errorMessage": {
|
|
11
|
-
"type": "MongoDBInsertOne request property \"doc\" should be an object."
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"options": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Optional settings.",
|
|
17
|
-
"errorMessage": {
|
|
18
|
-
"type": "MongoDBInsertOne request property \"options\" should be an object."
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "MongoDBInsertOne request properties should be an object.",
|
|
24
|
-
"required": "MongoDBInsertOne request should have required property \"doc\"."
|
|
25
|
-
}
|
|
26
|
-
}
|