mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 00:24:07 -08:00
0fdae7fec3
* ⚡ Add API key to Twilio credentials * ⚡ Minor simplification Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
78 lines
1.2 KiB
TypeScript
78 lines
1.2 KiB
TypeScript
import {
|
|
ICredentialType,
|
|
NodePropertyTypes,
|
|
} from 'n8n-workflow';
|
|
|
|
|
|
export class TwilioApi implements ICredentialType {
|
|
name = 'twilioApi';
|
|
displayName = 'Twilio API';
|
|
documentationUrl = 'twilio';
|
|
properties = [
|
|
{
|
|
displayName: 'Auth Type',
|
|
name: 'authType',
|
|
type: 'options' as NodePropertyTypes,
|
|
default: 'authToken',
|
|
options: [
|
|
{
|
|
name: 'Auth Token',
|
|
value: 'authToken',
|
|
},
|
|
{
|
|
name: 'API Key',
|
|
value: 'apiKey',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
displayName: 'Account SID',
|
|
name: 'accountSid',
|
|
type: 'string' as NodePropertyTypes,
|
|
default: '',
|
|
},
|
|
{
|
|
displayName: 'Auth Token',
|
|
name: 'authToken',
|
|
type: 'string' as NodePropertyTypes,
|
|
default: '',
|
|
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',
|
|
],
|
|
},
|
|
},
|
|
},
|
|
];
|
|
}
|