2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2022-02-11 10:00:30 -08:00
|
|
|
|
|
|
|
export class HaloPSAApi implements ICredentialType {
|
|
|
|
name = 'haloPSAApi';
|
|
|
|
displayName = 'HaloPSA API';
|
|
|
|
documentationUrl = 'halopsa';
|
2022-07-24 08:36:17 -07:00
|
|
|
properties: INodeProperties[] = [
|
2022-02-11 10:00:30 -08:00
|
|
|
{
|
|
|
|
displayName: 'Hosting Type',
|
|
|
|
name: 'hostingType',
|
|
|
|
type: 'options',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'On-Premise Solution',
|
|
|
|
value: 'onPremise',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Hosted Solution Of Halo',
|
|
|
|
value: 'hostedHalo',
|
|
|
|
},
|
|
|
|
],
|
2022-04-13 23:32:27 -07:00
|
|
|
default: 'onPremise',
|
2022-02-11 10:00:30 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'HaloPSA Authorisation Server URL',
|
|
|
|
name: 'authUrl',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Resource Server',
|
|
|
|
name: 'resourceApiUrl',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
2022-06-20 07:54:01 -07:00
|
|
|
description: 'The Resource server is available at your "Halo Web Application URL/api"',
|
2022-02-11 10:00:30 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Client ID',
|
|
|
|
name: 'client_id',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
2022-04-13 23:32:27 -07:00
|
|
|
description: 'Must be your application client ID',
|
2022-02-11 10:00:30 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Client Secret',
|
|
|
|
name: 'client_secret',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
description: 'Must be your application client secret',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Tenant',
|
|
|
|
name: 'tenant',
|
|
|
|
type: 'string',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
hostingType: ['hostedHalo'],
|
2022-02-11 10:00:30 -08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
description: 'An additional tenant parameter for HaloPSA hosted solution',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Scope',
|
|
|
|
name: 'scope',
|
|
|
|
type: 'hidden',
|
|
|
|
default: 'admin edit:tickets edit:customers',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|