Zendesk improvements

This commit is contained in:
ricardo
2020-04-06 19:11:50 -04:00
parent 931b73e1bd
commit adf3f62aab
7 changed files with 228 additions and 37 deletions

View File

@@ -1,4 +1,6 @@
import { INodeProperties } from 'n8n-workflow';
import {
INodeProperties,
} from 'n8n-workflow';
export const ticketOperations = [
{
@@ -70,6 +72,23 @@ export const ticketFields = [
required: true,
description: 'The first comment on the ticket',
},
{
displayName: 'JSON Parameters',
name: 'jsonParameters',
type: 'boolean',
default: false,
description: '',
displayOptions: {
show: {
resource: [
'ticket'
],
operation: [
'create',
],
},
},
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
@@ -184,6 +203,30 @@ export const ticketFields = [
}
],
},
{
displayName: ' Custom Fields',
name: 'customFieldsJson',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'create',
],
jsonParameters: [
true,
],
},
},
required: true,
description: `Array of customs fields <a href='https://developer.zendesk.com/rest_api/docs/support/tickets#setting-custom-field-values'>Details</a>`,
},
/* -------------------------------------------------------------------------- */
/* ticket:update */
/* -------------------------------------------------------------------------- */
@@ -205,6 +248,23 @@ export const ticketFields = [
},
description: 'Ticket ID',
},
{
displayName: 'JSON Parameters',
name: 'jsonParameters',
type: 'boolean',
default: false,
description: '',
displayOptions: {
show: {
resource: [
'ticket'
],
operation: [
'update',
],
},
},
},
{
displayName: 'Update Fields',
name: 'updateFields',
@@ -319,6 +379,30 @@ export const ticketFields = [
}
],
},
{
displayName: ' Custom Fields',
name: 'customFieldsJson',
type: 'json',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '',
displayOptions: {
show: {
resource: [
'ticket',
],
operation: [
'update',
],
jsonParameters: [
true,
],
},
},
required: true,
description: `Array of customs fields <a href='https://developer.zendesk.com/rest_api/docs/support/tickets#setting-custom-field-values'>Details</a>`,
},
/* -------------------------------------------------------------------------- */
/* ticket:get */
/* -------------------------------------------------------------------------- */