mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
66acaade29
* added node ui * wip problems with auth * updated authentication * fixed linter error * added haloPSA request function * removed any return type * fixed linter errors * added CRUD functionalities * updating branch from master * updated create case for clients resource, added limit to getAll operation * added required fields when creating clients and sites, added methods for fetching data to dynamicly populate options when creating site or client * added required fields for users and invoices when operation is create * 🔨 Removed some commented code * 🐛 Fix bug in url formating * 🔨 fixed plural resources, fixed main for loop * 🔨 fix trailing coma * 🔨 fix for wrong resource endpoints * 🔨 fixed linter complain in Jenkings node * 🔨 replace custom fields with predefined * 🔨 updating resources optional fields * ⚡ Small improvement * 🔨 replaced fixedCollection to collection in resources description * 🔨 updated site and ticket descriptions, code clean up * 🔨 fixed accordingly to PR review * ⚡ Improvements * ⚡ Improvements * ⚡ Fix capitalization * 👕 Fix trailing comma * 🚧 node changes accordingly to review * ⚡ lint errors fix * ⚡ Activate simplify option by default * ⚡ Fix some more issues Co-authored-by: ricardo <ricardoespinoza105@gmail.com> Co-authored-by: Iván Ovejero <ivov.src@gmail.com> Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
82 lines
1.6 KiB
TypeScript
82 lines
1.6 KiB
TypeScript
import {
|
|
ICredentialType,
|
|
INodeProperties,
|
|
} from 'n8n-workflow';
|
|
|
|
export class HaloPSAApi implements ICredentialType {
|
|
name = 'haloPSAApi';
|
|
displayName = 'HaloPSA API';
|
|
documentationUrl = 'halopsa';
|
|
properties: INodeProperties[] = [
|
|
{
|
|
displayName: 'Hosting Type',
|
|
name: 'hostingType',
|
|
type: 'options',
|
|
options: [
|
|
{
|
|
name: 'On-Premise Solution',
|
|
value: 'onPremise',
|
|
},
|
|
{
|
|
name: 'Hosted Solution Of Halo',
|
|
value: 'hostedHalo',
|
|
},
|
|
],
|
|
default: '',
|
|
description: 'Hosting Type',
|
|
},
|
|
{
|
|
displayName: 'HaloPSA Authorisation Server URL',
|
|
name: 'authUrl',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
},
|
|
{
|
|
displayName: 'Resource Server',
|
|
name: 'resourceApiUrl',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
description: `The Resource server is available at your "Halo Web Application url/api"`,
|
|
},
|
|
{
|
|
displayName: 'Client ID',
|
|
name: 'client_id',
|
|
type: 'string',
|
|
default: '',
|
|
required: true,
|
|
description: 'Must be your application client id',
|
|
},
|
|
{
|
|
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: {
|
|
hostingType: [
|
|
'hostedHalo',
|
|
],
|
|
},
|
|
},
|
|
default: '',
|
|
description: 'An additional tenant parameter for HaloPSA hosted solution',
|
|
},
|
|
{
|
|
displayName: 'Scope',
|
|
name: 'scope',
|
|
type: 'hidden',
|
|
default: 'admin edit:tickets edit:customers',
|
|
required: true,
|
|
},
|
|
];
|
|
}
|