@lowdefy/connection-mongodb 0.0.0-experimental-20231123101256

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.
Files changed (28) hide show
  1. package/LICENSE +201 -0
  2. package/dist/auth/adapters/MongoDBAdapter/MongoDBAdapter.js +31 -0
  3. package/dist/auth/adapters.js +2 -0
  4. package/dist/connections/MongoDBCollection/MongoDBAggregation/MongoDBAggregation.js +53 -0
  5. package/dist/connections/MongoDBCollection/MongoDBAggregation/schema.js +42 -0
  6. package/dist/connections/MongoDBCollection/MongoDBCollection.js +38 -0
  7. package/dist/connections/MongoDBCollection/MongoDBDeleteMany/MongoDBDeleteMany.js +43 -0
  8. package/dist/connections/MongoDBCollection/MongoDBDeleteMany/schema.js +42 -0
  9. package/dist/connections/MongoDBCollection/MongoDBDeleteOne/MongoDBDeleteOne.js +39 -0
  10. package/dist/connections/MongoDBCollection/MongoDBDeleteOne/schema.js +42 -0
  11. package/dist/connections/MongoDBCollection/MongoDBFind/MongoDBFind.js +40 -0
  12. package/dist/connections/MongoDBCollection/MongoDBFind/schema.js +42 -0
  13. package/dist/connections/MongoDBCollection/MongoDBFindOne/MongoDBFindOne.js +39 -0
  14. package/dist/connections/MongoDBCollection/MongoDBFindOne/schema.js +42 -0
  15. package/dist/connections/MongoDBCollection/MongoDBInsertMany/MongoDBInsertMany.js +43 -0
  16. package/dist/connections/MongoDBCollection/MongoDBInsertMany/schema.js +48 -0
  17. package/dist/connections/MongoDBCollection/MongoDBInsertOne/MongoDBInsertOne.js +43 -0
  18. package/dist/connections/MongoDBCollection/MongoDBInsertOne/schema.js +42 -0
  19. package/dist/connections/MongoDBCollection/MongoDBUpdateMany/MongoDBUpdateMany.js +45 -0
  20. package/dist/connections/MongoDBCollection/MongoDBUpdateMany/schema.js +56 -0
  21. package/dist/connections/MongoDBCollection/MongoDBUpdateOne/MongoDBUpdateOne.js +39 -0
  22. package/dist/connections/MongoDBCollection/MongoDBUpdateOne/schema.js +56 -0
  23. package/dist/connections/MongoDBCollection/getCollection.js +31 -0
  24. package/dist/connections/MongoDBCollection/schema.js +69 -0
  25. package/dist/connections/MongoDBCollection/serialize.js +59 -0
  26. package/dist/connections.js +15 -0
  27. package/dist/types.js +23 -0
  28. package/package.json +65 -0
@@ -0,0 +1,42 @@
1
+ /*
2
+ Copyright 2020-2023 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 - MongoDBFindOne',
18
+ type: 'object',
19
+ required: [
20
+ 'query'
21
+ ],
22
+ properties: {
23
+ query: {
24
+ type: 'object',
25
+ description: 'A MongoDB query object',
26
+ errorMessage: {
27
+ type: 'MongoDBFindOne request property "query" should be an object.'
28
+ }
29
+ },
30
+ options: {
31
+ type: 'object',
32
+ description: 'Optional settings.',
33
+ errorMessage: {
34
+ type: 'MongoDBFindOne request property "options" should be an object.'
35
+ }
36
+ }
37
+ },
38
+ errorMessage: {
39
+ type: 'MongoDBFindOne request properties should be an object.',
40
+ required: 'MongoDBFindOne request should have required property "query".'
41
+ }
42
+ };
@@ -0,0 +1,43 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ */ import getCollection from '../getCollection.js';
16
+ import { serialize, deserialize } from '../serialize.js';
17
+ import schema from './schema.js';
18
+ async function MongodbInsertMany({ connection, request }) {
19
+ const deserializedRequest = deserialize(request);
20
+ const { docs, options } = deserializedRequest;
21
+ const { collection, client } = await getCollection({
22
+ connection
23
+ });
24
+ let response;
25
+ try {
26
+ response = await collection.insertMany(docs, options);
27
+ } catch (error) {
28
+ await client.close();
29
+ throw error;
30
+ }
31
+ await client.close();
32
+ const { acknowledged, insertedCount } = serialize(response);
33
+ return {
34
+ acknowledged,
35
+ insertedCount
36
+ };
37
+ }
38
+ MongodbInsertMany.schema = schema;
39
+ MongodbInsertMany.meta = {
40
+ checkRead: false,
41
+ checkWrite: true
42
+ };
43
+ export default MongodbInsertMany;
@@ -0,0 +1,48 @@
1
+ /*
2
+ Copyright 2020-2023 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 - MongoDBInsertMany',
18
+ type: 'object',
19
+ required: [
20
+ 'docs'
21
+ ],
22
+ properties: {
23
+ docs: {
24
+ type: 'array',
25
+ description: 'The array of documents to be inserted.',
26
+ errorMessage: {
27
+ type: 'MongoDBInsertMany request property "docs" should be an array.'
28
+ },
29
+ items: {
30
+ type: 'object',
31
+ errorMessage: {
32
+ type: 'MongoDBInsertMany request property "docs" should be an array of documents to insert.'
33
+ }
34
+ }
35
+ },
36
+ options: {
37
+ type: 'object',
38
+ description: 'Optional settings.',
39
+ errorMessage: {
40
+ type: 'MongoDBInsertMany request property "options" should be an object.'
41
+ }
42
+ }
43
+ },
44
+ errorMessage: {
45
+ type: 'MongoDBInsertMany request properties should be an object.',
46
+ required: 'MongoDBInsertMany request should have required property "docs".'
47
+ }
48
+ };
@@ -0,0 +1,43 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ */ import getCollection from '../getCollection.js';
16
+ import { serialize, deserialize } from '../serialize.js';
17
+ import schema from './schema.js';
18
+ async function MongodbInsertOne({ connection, request }) {
19
+ const deserializedRequest = deserialize(request);
20
+ const { doc, options } = deserializedRequest;
21
+ const { collection, client } = await getCollection({
22
+ connection
23
+ });
24
+ let response;
25
+ try {
26
+ response = await collection.insertOne(doc, options);
27
+ } catch (error) {
28
+ await client.close();
29
+ throw error;
30
+ }
31
+ await client.close();
32
+ const { acknowledged, insertedId } = serialize(response);
33
+ return {
34
+ acknowledged,
35
+ insertedId
36
+ };
37
+ }
38
+ MongodbInsertOne.schema = schema;
39
+ MongodbInsertOne.meta = {
40
+ checkRead: false,
41
+ checkWrite: true
42
+ };
43
+ export default MongodbInsertOne;
@@ -0,0 +1,42 @@
1
+ /*
2
+ Copyright 2020-2023 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 - MongoDBInsertOne',
18
+ type: 'object',
19
+ required: [
20
+ 'doc'
21
+ ],
22
+ properties: {
23
+ doc: {
24
+ type: 'object',
25
+ description: 'The document to be inserted.',
26
+ errorMessage: {
27
+ type: 'MongoDBInsertOne request property "doc" should be an object.'
28
+ }
29
+ },
30
+ options: {
31
+ type: 'object',
32
+ description: 'Optional settings.',
33
+ errorMessage: {
34
+ type: 'MongoDBInsertOne request property "options" should be an object.'
35
+ }
36
+ }
37
+ },
38
+ errorMessage: {
39
+ type: 'MongoDBInsertOne request properties should be an object.',
40
+ required: 'MongoDBInsertOne request should have required property "doc".'
41
+ }
42
+ };
@@ -0,0 +1,45 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ */ import getCollection from '../getCollection.js';
16
+ import { serialize, deserialize } from '../serialize.js';
17
+ import schema from './schema.js';
18
+ async function MongodbUpdateMany({ connection, request }) {
19
+ const deserializedRequest = deserialize(request);
20
+ const { filter, update, options } = deserializedRequest;
21
+ const { collection, client } = await getCollection({
22
+ connection
23
+ });
24
+ let response;
25
+ try {
26
+ response = await collection.updateMany(filter, update, options);
27
+ } catch (error) {
28
+ await client.close();
29
+ throw error;
30
+ }
31
+ await client.close();
32
+ const { modifiedCount, upsertedId, upsertedCount, matchedCount } = serialize(response);
33
+ return {
34
+ modifiedCount,
35
+ upsertedId,
36
+ upsertedCount,
37
+ matchedCount
38
+ };
39
+ }
40
+ MongodbUpdateMany.schema = schema;
41
+ MongodbUpdateMany.meta = {
42
+ checkRead: false,
43
+ checkWrite: true
44
+ };
45
+ export default MongodbUpdateMany;
@@ -0,0 +1,56 @@
1
+ /*
2
+ Copyright 2020-2023 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 - MongoDBUpdateMany',
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 documents to update.',
27
+ errorMessage: {
28
+ type: 'MongoDBUpdateMany 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 documents.',
37
+ errorMessage: {
38
+ type: 'MongoDBUpdateMany request property "update" should be an object.'
39
+ }
40
+ },
41
+ options: {
42
+ type: 'object',
43
+ description: 'Optional settings.',
44
+ errorMessage: {
45
+ type: 'MongoDBUpdateMany request property "options" should be an object.'
46
+ }
47
+ }
48
+ },
49
+ errorMessage: {
50
+ type: 'MongoDBUpdateMany request properties should be an object.',
51
+ required: {
52
+ filter: 'MongoDBUpdateMany request should have required property "filter".',
53
+ update: 'MongoDBUpdateMany request should have required property "update".'
54
+ }
55
+ }
56
+ };
@@ -0,0 +1,39 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ */ import getCollection from '../getCollection.js';
16
+ import { serialize, deserialize } from '../serialize.js';
17
+ import schema from './schema.js';
18
+ async function MongodbUpdateOne({ connection, request }) {
19
+ const deserializedRequest = deserialize(request);
20
+ const { filter, update, options } = deserializedRequest;
21
+ const { collection, client } = await getCollection({
22
+ connection
23
+ });
24
+ let response;
25
+ try {
26
+ response = await collection.updateOne(filter, update, options);
27
+ } catch (error) {
28
+ await client.close();
29
+ throw error;
30
+ }
31
+ await client.close();
32
+ return serialize(response);
33
+ }
34
+ MongodbUpdateOne.schema = schema;
35
+ MongodbUpdateOne.meta = {
36
+ checkRead: false,
37
+ checkWrite: true
38
+ };
39
+ export default MongodbUpdateOne;
@@ -0,0 +1,56 @@
1
+ /*
2
+ Copyright 2020-2023 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,31 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ */ import { MongoClient } from 'mongodb';
16
+ async function getCollection({ connection }) {
17
+ const { collection, databaseName, databaseUri, options } = connection;
18
+ const client = new MongoClient(databaseUri, options);
19
+ await client.connect();
20
+ try {
21
+ const db = client.db(databaseName);
22
+ return {
23
+ client,
24
+ collection: db.collection(collection)
25
+ };
26
+ } catch (error) {
27
+ await client.close();
28
+ throw error;
29
+ }
30
+ }
31
+ export default getCollection;
@@ -0,0 +1,69 @@
1
+ /*
2
+ Copyright 2020-2023 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: 'Database name.',
34
+ errorMessage: {
35
+ type: 'MongoDBCollection connection property "databaseName" should be a string.'
36
+ }
37
+ },
38
+ collection: {
39
+ type: 'string',
40
+ description: 'Collection name.',
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
+ };
@@ -0,0 +1,59 @@
1
+ /*
2
+ Copyright 2020-2023 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
+ */ import { ObjectId } from 'mongodb';
16
+ import { serializer, type } from '@lowdefy/helpers';
17
+ function replacer(_, value) {
18
+ if (type.isObject(value)) {
19
+ Object.keys(value).forEach((key)=>{
20
+ if (value[key] instanceof ObjectId) {
21
+ // eslint-disable-next-line no-param-reassign
22
+ value[key] = {
23
+ _oid: value[key].toHexString()
24
+ };
25
+ }
26
+ });
27
+ return value;
28
+ }
29
+ if (type.isArray(value)) {
30
+ return value.map((item)=>{
31
+ if (item instanceof ObjectId) {
32
+ return {
33
+ _oid: item.toHexString()
34
+ };
35
+ }
36
+ return item;
37
+ });
38
+ }
39
+ return value;
40
+ }
41
+ function reviver(key, value) {
42
+ if (type.isObject(value)) {
43
+ if (value._oid) {
44
+ return ObjectId.createFromHexString(value._oid);
45
+ }
46
+ }
47
+ return value;
48
+ }
49
+ function serialize(obj) {
50
+ return serializer.copy(obj, {
51
+ replacer
52
+ });
53
+ }
54
+ function deserialize(obj) {
55
+ return serializer.copy(obj, {
56
+ reviver
57
+ });
58
+ }
59
+ export { serialize, deserialize };
@@ -0,0 +1,15 @@
1
+ /*
2
+ Copyright 2020-2023 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 as MongoDBCollection } from './connections/MongoDBCollection/MongoDBCollection.js';
package/dist/types.js ADDED
@@ -0,0 +1,23 @@
1
+ /* eslint-disable import/namespace */ /*
2
+ Copyright 2020-2023 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
+ */ import * as adapters from './auth/adapters.js';
16
+ import * as connections from './connections.js';
17
+ export default {
18
+ auth: {
19
+ adapters: Object.keys(adapters)
20
+ },
21
+ connections: Object.keys(connections),
22
+ requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)).flat()
23
+ };