mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 13:57:29 -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',
|
value: 'delete',
|
||||||
description: 'Delete a deal',
|
description: 'Delete a deal',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'Duplicate',
|
||||||
|
value: 'duplicate',
|
||||||
|
description: 'Duplicate a deal',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'Get',
|
name: 'Get',
|
||||||
value: 'get',
|
value: 'get',
|
||||||
|
@ -947,6 +952,28 @@ export class Pipedrive implements INodeType {
|
||||||
description: 'ID of the deal to delete.',
|
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
|
// deal:get
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
@ -2157,6 +2184,16 @@ export class Pipedrive implements INodeType {
|
||||||
const dealId = this.getNodeParameter('dealId', i) as number;
|
const dealId = this.getNodeParameter('dealId', i) as number;
|
||||||
endpoint = `/deals/${dealId}`;
|
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') {
|
} else if (operation === 'get') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// deal:get
|
// deal:get
|
||||||
|
|
Loading…
Reference in a new issue