2019-06-23 03:35:23 -07:00
|
|
|
import {
|
|
|
|
ICredentialType,
|
|
|
|
NodePropertyTypes,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
|
|
|
|
|
|
export class TwilioApi implements ICredentialType {
|
|
|
|
name = 'twilioApi';
|
|
|
|
displayName = 'Twilio API';
|
2020-08-17 05:42:09 -07:00
|
|
|
documentationUrl = 'twilio';
|
2019-06-23 03:35:23 -07:00
|
|
|
properties = [
|
2021-05-18 17:05:49 -07:00
|
|
|
{
|
|
|
|
displayName: 'Auth Type',
|
|
|
|
name: 'authType',
|
|
|
|
type: 'options' as NodePropertyTypes,
|
|
|
|
default: 'authToken',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Auth Token',
|
|
|
|
value: 'authToken',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'API Key',
|
|
|
|
value: 'apiKey',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
{
|
|
|
|
displayName: 'Account SID',
|
|
|
|
name: 'accountSid',
|
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Auth Token',
|
|
|
|
name: 'authToken',
|
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
2021-05-18 17:05:49 -07:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
authType: [
|
|
|
|
'authToken',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Key SID',
|
|
|
|
name: 'apiKeySid',
|
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
authType: [
|
|
|
|
'apiKey',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'API Key Secret',
|
|
|
|
name: 'apiKeySecret',
|
|
|
|
type: 'string' as NodePropertyTypes,
|
|
|
|
typeOptions: {
|
|
|
|
password: true,
|
|
|
|
},
|
|
|
|
default: '',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
authType: [
|
|
|
|
'apiKey',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2019-06-23 03:35:23 -07:00
|
|
|
},
|
|
|
|
];
|
|
|
|
}
|