mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
✨ Add Deal.duplicate functionality to Pipedrive-Node
This commit is contained in:
parent
b5918c6bfe
commit
d6134ec405
|
@ -171,6 +171,11 @@ export class Pipedrive implements INodeType {
|
|||
value: 'delete',
|
||||
description: 'Delete a deal',
|
||||
},
|
||||
{
|
||||
name: 'Duplicate',
|
||||
value: 'duplicate',
|
||||
description: 'Duplicate a deal',
|
||||
},
|
||||
{
|
||||
name: 'Get',
|
||||
value: 'get',
|
||||
|
@ -947,6 +952,28 @@ export class Pipedrive implements INodeType {
|
|||
description: 'ID of the deal to delete.',
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// deal:duplicate
|
||||
// ----------------------------------
|
||||
{
|
||||
displayName: 'Deal ID',
|
||||
name: 'dealId',
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'duplicate',
|
||||
],
|
||||
resource: [
|
||||
'deal',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: 0,
|
||||
required: true,
|
||||
description: 'ID of the deal to duplicate.',
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
// deal:get
|
||||
// ----------------------------------
|
||||
|
@ -2157,6 +2184,16 @@ export class Pipedrive implements INodeType {
|
|||
const dealId = this.getNodeParameter('dealId', i) as number;
|
||||
endpoint = `/deals/${dealId}`;
|
||||
|
||||
} else if (operation === 'duplicate') {
|
||||
// ----------------------------------
|
||||
// deal:duplicate
|
||||
// ----------------------------------
|
||||
|
||||
requestMethod = 'POST';
|
||||
|
||||
const dealId = this.getNodeParameter('dealId', i) as number;
|
||||
endpoint = `/deals/${dealId}/duplicate`;
|
||||
|
||||
} else if (operation === 'get') {
|
||||
// ----------------------------------
|
||||
// deal:get
|
||||
|
|
Loading…
Reference in a new issue