Improvements to Zendesk-Node

This commit is contained in:
ricardo 2020-06-14 18:04:22 -04:00
parent 38c5eefb48
commit 8d778bf06e

View file

@ -3,6 +3,10 @@ import {
NodePropertyTypes, NodePropertyTypes,
} from 'n8n-workflow'; } from 'n8n-workflow';
const scopes = [
'read',
'write',
];
export class ZendeskOAuth2Api implements ICredentialType { export class ZendeskOAuth2Api implements ICredentialType {
name = 'zendeskOAuth2Api'; name = 'zendeskOAuth2Api';
@ -15,7 +19,8 @@ export class ZendeskOAuth2Api implements ICredentialType {
displayName: 'Subdomain', displayName: 'Subdomain',
name: 'subdomain', name: 'subdomain',
type: 'string' as NodePropertyTypes, type: 'string' as NodePropertyTypes,
default: 'n8n', default: '',
placeholder: 'n8n',
description: 'The subdomain of your Zendesk work environment.', description: 'The subdomain of your Zendesk work environment.',
required: true, required: true,
}, },
@ -52,8 +57,8 @@ export class ZendeskOAuth2Api implements ICredentialType {
{ {
displayName: 'Scope', displayName: 'Scope',
name: 'scope', name: 'scope',
type: 'string' as NodePropertyTypes, type: 'hidden' as NodePropertyTypes,
default: 'write read', default: scopes.join(' '),
}, },
{ {
displayName: 'Auth URI Query Parameters', displayName: 'Auth URI Query Parameters',