feature: add MongoDB credential testing and two operations: findOneAndReplace and findOneAndUpdate (#3901)

* feature: add MongoDB credential testing and two operations: findOneAndReplace and findOneAndUpdate
Co-authored-by: Anas Naim <anas.naim@hotmail.com>
This commit is contained in:
Michael Kret
2022-09-01 11:23:15 +03:00
committed by GitHub
parent ee519b0c08
commit b5511e5ac7
3 changed files with 219 additions and 95 deletions

View File

@@ -20,6 +20,7 @@ export const nodeDescription: INodeTypeDescription = {
{
name: 'mongoDb',
required: true,
testedBy: 'mongoDbCredentialTest',
},
],
properties: [
@@ -47,6 +48,18 @@ export const nodeDescription: INodeTypeDescription = {
description: 'Find documents',
action: 'Find documents',
},
{
name: 'Find And Replace',
value: 'findOneAndReplace',
description: 'Find and replace documents',
action: 'Find and replace documents',
},
{
name: 'Find And Update',
value: 'findOneAndUpdate',
description: 'Find and update documents',
action: 'Find and update documents',
},
{
name: 'Insert',
value: 'insert',
@@ -207,7 +220,7 @@ export const nodeDescription: INodeTypeDescription = {
type: 'string',
displayOptions: {
show: {
operation: ['update'],
operation: ['update', 'findOneAndReplace', 'findOneAndUpdate'],
},
},
default: 'id',
@@ -222,7 +235,7 @@ export const nodeDescription: INodeTypeDescription = {
type: 'string',
displayOptions: {
show: {
operation: ['update'],
operation: ['update', 'findOneAndReplace', 'findOneAndUpdate'],
},
},
default: '',
@@ -235,7 +248,7 @@ export const nodeDescription: INodeTypeDescription = {
type: 'boolean',
displayOptions: {
show: {
operation: ['update'],
operation: ['update', 'findOneAndReplace', 'findOneAndUpdate'],
},
},
default: false,
@@ -247,7 +260,7 @@ export const nodeDescription: INodeTypeDescription = {
type: 'collection',
displayOptions: {
show: {
operation: ['update', 'insert'],
operation: ['update', 'insert', 'findOneAndReplace', 'findOneAndUpdate'],
},
},
placeholder: 'Add Option',