Minor improvements to MessageBird-Node

This commit is contained in:
Jan Oberhauser 2020-06-12 09:39:56 +02:00
parent edd4c7a82f
commit 09862d602e
2 changed files with 27 additions and 27 deletions

View file

@ -1,12 +1,12 @@
import {
OptionsWithUri,
} from 'request';
import {
IExecuteFunctions,
IHookFunctions,
} from 'n8n-core';
import {
OptionsWithUri,
} from 'request';
import {
IDataObject,
} from 'n8n-workflow';
@ -26,7 +26,7 @@ export async function messageBirdApiRequest(
resource: string,
body: IDataObject,
query: IDataObject = {},
): Promise<any> {
): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('messageBirdApi');
if (credentials === undefined) {
throw new Error('No credentials returned!');
@ -41,7 +41,7 @@ export async function messageBirdApiRequest(
qs: query,
body,
uri: `https://rest.messagebird.com${resource}`,
json: true
json: true,
};
try {

View file

@ -64,11 +64,11 @@ export class MessageBird implements INodeType {
{
name: 'Send',
value: 'send',
description: 'Send text messages (SMS)'
description: 'Send text messages (SMS)',
},
],
default: 'send',
description: 'The operation to perform.'
description: 'The operation to perform.',
},
// ----------------------------------
@ -91,7 +91,7 @@ export class MessageBird implements INodeType {
],
},
},
description: 'The number from which to send the message'
description: 'The number from which to send the message.',
},
{
displayName: 'To',
@ -103,10 +103,10 @@ export class MessageBird implements INodeType {
displayOptions: {
show: {
operation: ['send'],
resource: ['sms']
}
resource: ['sms'],
},
description: 'all recipients separated by commas'
},
description: 'All recipients separated by commas.',
},
{
@ -125,7 +125,7 @@ export class MessageBird implements INodeType {
],
},
},
description: 'The message to be send'
description: 'The message to be send.',
},
{
displayName: 'Additional Fields',
@ -160,7 +160,7 @@ export class MessageBird implements INodeType {
},
],
default: '',
description: 'Using unicode will limit the maximum number of characters to 70 instead of 160',
description: 'Using unicode will limit the maximum number of characters to 70 instead of 160.',
},
{
displayName: 'Gateway',
@ -175,7 +175,7 @@ export class MessageBird implements INodeType {
placeholder: '1,2',
type: 'string',
default: '',
description: 'Group IDs separated by commas, If provided recipients can be omitted',
description: 'Group IDs separated by commas, If provided recipients can be omitted.',
},
{
displayName: 'Message Type',
@ -183,14 +183,14 @@ export class MessageBird implements INodeType {
type: 'options',
placeholder: 'Permissible values from 0-3',
options: [
{
name: 'Normal',
value: 0
},
{
name: 'Flash',
value: 1,
},
{
name: 'Normal',
value: 0,
},
],
default: 1,
description: 'Indicated the message type. 1 is a normal message, 0 is a flash message.',
@ -221,10 +221,6 @@ export class MessageBird implements INodeType {
name: 'type',
type: 'options',
options: [
{
name: 'SMS',
value: 'sms'
},
{
name: 'Binary',
value: 'binary'
@ -232,10 +228,14 @@ export class MessageBird implements INodeType {
{
name: 'Flash',
value: 'flash'
}
},
{
name: 'SMS',
value: 'sms'
},
],
default: '',
description: 'The type of message.<br /> Values can be: sms, binary, or flash.'
description: 'The type of message.<br /> Values can be: sms, binary, or flash.',
},
{
displayName: 'Type Details',