n8n/packages/nodes-base/credentials/MonicaCrmApi.credentials.ts
Iván Ovejero 1529550b14
Add Monica CRM node (#2045)
*  Create Monica node

*  Fix default values

* 🔥 Remove excess spacing

*  Improvements

*  Improvements

*  Add environment parameter

*  Add sort parameter to contact:getAll

*  Minor improvements

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
2021-08-08 09:51:44 +02:00

49 lines
851 B
TypeScript

import {
ICredentialType,
INodeProperties,
} from 'n8n-workflow';
export class MonicaCrmApi implements ICredentialType {
name = 'monicaCrmApi';
displayName = 'Monica CRM API';
documentationUrl = 'monicaCrm';
properties: INodeProperties[] = [
{
displayName: 'Environment',
name: 'environment',
type: 'options',
default: 'cloudHosted',
options: [
{
name: 'Cloud-hosted',
value: 'cloudHosted',
},
{
name: 'Self-hosted',
value: 'selfHosted',
},
],
},
{
displayName: 'Self-hosted domain',
name: 'domain',
type: 'string',
default: '',
placeholder: 'https://www.mydomain.com',
displayOptions: {
show: {
environment: [
'selfHosted',
],
},
},
},
{
displayName: 'API Token',
name: 'apiToken',
type: 'string',
default: '',
},
];
}