2022-07-24 08:36:17 -07:00
|
|
|
import { ICredentialType, INodeProperties } from 'n8n-workflow';
|
2021-08-08 00:51:44 -07:00
|
|
|
|
|
|
|
export class MonicaCrmApi implements ICredentialType {
|
|
|
|
name = 'monicaCrmApi';
|
|
|
|
displayName = 'Monica CRM API';
|
|
|
|
documentationUrl = 'monicaCrm';
|
|
|
|
properties: INodeProperties[] = [
|
|
|
|
{
|
|
|
|
displayName: 'Environment',
|
|
|
|
name: 'environment',
|
|
|
|
type: 'options',
|
|
|
|
default: 'cloudHosted',
|
|
|
|
options: [
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Cloud-Hosted',
|
2021-08-08 00:51:44 -07:00
|
|
|
value: 'cloudHosted',
|
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
name: 'Self-Hosted',
|
2021-08-08 00:51:44 -07:00
|
|
|
value: 'selfHosted',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
2022-04-13 23:32:27 -07:00
|
|
|
displayName: 'Self-Hosted Domain',
|
2021-08-08 00:51:44 -07:00
|
|
|
name: 'domain',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
placeholder: 'https://www.mydomain.com',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
2022-07-24 08:36:17 -07:00
|
|
|
environment: ['selfHosted'],
|
2021-08-08 00:51:44 -07:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Token',
|
|
|
|
name: 'apiToken',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|