mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
⚡ Fixed formatting issues on Google Calendar and MessageBird
This commit is contained in:
parent
d261eb5a12
commit
b4da818dbd
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,6 @@
|
|||
import { IDataObject } from "n8n-workflow";
|
||||
import {
|
||||
IDataObject,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export interface IReminder {
|
||||
useDefault?: boolean;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
import { IExecuteFunctions } from 'n8n-core';
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
|
@ -6,14 +8,22 @@ import {
|
|||
INodeTypeDescription,
|
||||
INodeType,
|
||||
ILoadOptionsFunctions,
|
||||
INodePropertyOptions
|
||||
INodePropertyOptions,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';
|
||||
import {
|
||||
googleApiRequest,
|
||||
googleApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { eventOperations, eventFields } from './EventDescription';
|
||||
import {
|
||||
eventOperations,
|
||||
eventFields,
|
||||
} from './EventDescription';
|
||||
|
||||
import { IEvent } from './EventInterface';
|
||||
import {
|
||||
IEvent,
|
||||
} from './EventInterface';
|
||||
|
||||
import * as moment from 'moment-timezone';
|
||||
|
||||
|
@ -28,14 +38,14 @@ export class GoogleCalendar implements INodeType {
|
|||
description: 'Consume Google Calendar API.',
|
||||
defaults: {
|
||||
name: 'Google Calendar',
|
||||
color: '#3E87E4'
|
||||
color: '#3E87E4',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'googleCalendarOAuth2Api',
|
||||
required: true
|
||||
required: true,
|
||||
}
|
||||
],
|
||||
properties: [
|
||||
|
@ -46,15 +56,15 @@ export class GoogleCalendar implements INodeType {
|
|||
options: [
|
||||
{
|
||||
name: 'Event',
|
||||
value: 'event'
|
||||
}
|
||||
value: 'event',
|
||||
},
|
||||
],
|
||||
default: 'event',
|
||||
description: 'The resource to operate on.'
|
||||
},
|
||||
...eventOperations,
|
||||
...eventFields
|
||||
]
|
||||
...eventFields,
|
||||
],
|
||||
};
|
||||
|
||||
methods = {
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
import { IExecuteFunctions } from 'n8n-core';
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
INodeTypeDescription,
|
||||
INodeExecutionData,
|
||||
INodeType
|
||||
INodeType,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { messageBirdApiRequest } from './GenericFunctions';
|
||||
import {
|
||||
messageBirdApiRequest,
|
||||
} from './GenericFunctions';
|
||||
|
||||
export class MessageBird implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
@ -20,15 +24,15 @@ export class MessageBird implements INodeType {
|
|||
description: 'Sending SMS',
|
||||
defaults: {
|
||||
name: 'MessageBird',
|
||||
color: '#2481d7'
|
||||
color: '#2481d7',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
credentials: [
|
||||
{
|
||||
name: 'messageBirdApi',
|
||||
required: true
|
||||
}
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
properties: [
|
||||
{
|
||||
|
@ -38,31 +42,32 @@ export class MessageBird implements INodeType {
|
|||
options: [
|
||||
{
|
||||
name: 'SMS',
|
||||
value: 'sms'
|
||||
}
|
||||
value: 'sms',
|
||||
},
|
||||
],
|
||||
default: 'sms',
|
||||
description: 'The resource to operate on.'
|
||||
description: 'The resource to operate on.',
|
||||
},
|
||||
|
||||
{
|
||||
displayName: 'Operation',
|
||||
name: 'operation',
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: ['sms']
|
||||
}
|
||||
resource: [
|
||||
'sms',
|
||||
],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
{
|
||||
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.',
|
||||
},
|
||||
|
||||
// ----------------------------------
|
||||
|
@ -77,11 +82,15 @@ export class MessageBird implements INodeType {
|
|||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['send'],
|
||||
resource: ['sms']
|
||||
}
|
||||
operation: [
|
||||
'send',
|
||||
],
|
||||
resource: [
|
||||
'sms',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The number from which to send the message.'
|
||||
description: 'The number from which to send the message.',
|
||||
},
|
||||
{
|
||||
displayName: 'To',
|
||||
|
@ -92,13 +101,16 @@ export class MessageBird implements INodeType {
|
|||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['send'],
|
||||
resource: ['sms']
|
||||
}
|
||||
operation: [
|
||||
'send',
|
||||
],
|
||||
resource: [
|
||||
'sms',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'All recipients separated by commas.'
|
||||
description: 'All recipients separated by commas.',
|
||||
},
|
||||
|
||||
{
|
||||
displayName: 'Message',
|
||||
name: 'message',
|
||||
|
@ -107,11 +119,15 @@ export class MessageBird implements INodeType {
|
|||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['send'],
|
||||
resource: ['sms']
|
||||
}
|
||||
operation: [
|
||||
'send',
|
||||
],
|
||||
resource: [
|
||||
'sms',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: 'The message to be send.'
|
||||
description: 'The message to be send.',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
|
@ -125,8 +141,7 @@ export class MessageBird implements INodeType {
|
|||
name: 'createdDatetime',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description:
|
||||
'The date and time of the creation of the message in RFC3339 format (Y-m-dTH:i:sP).'
|
||||
description: 'The date and time of the creation of the message in RFC3339 format (Y-m-dTH:i:sP).',
|
||||
},
|
||||
{
|
||||
displayName: 'Datacoding',
|
||||
|
@ -135,27 +150,26 @@ export class MessageBird implements INodeType {
|
|||
options: [
|
||||
{
|
||||
name: 'Auto',
|
||||
value: 'auto'
|
||||
value: 'auto',
|
||||
},
|
||||
{
|
||||
name: 'Plain',
|
||||
value: 'plain'
|
||||
value: 'plain',
|
||||
},
|
||||
{
|
||||
name: 'Unicode',
|
||||
value: 'unicode'
|
||||
}
|
||||
value: 'unicode',
|
||||
},
|
||||
],
|
||||
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',
|
||||
name: 'gateway',
|
||||
type: 'number',
|
||||
default: '',
|
||||
description: 'The SMS route that is used to send the message.'
|
||||
description: 'The SMS route that is used to send the message.',
|
||||
},
|
||||
{
|
||||
displayName: 'Group IDs',
|
||||
|
@ -163,8 +177,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',
|
||||
|
@ -174,39 +187,36 @@ export class MessageBird implements INodeType {
|
|||
options: [
|
||||
{
|
||||
name: 'Flash',
|
||||
value: 1
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: 'Normal',
|
||||
value: 0
|
||||
}
|
||||
value: 0,
|
||||
},
|
||||
],
|
||||
default: 1,
|
||||
description:
|
||||
'Indicated the message type. 1 is a normal message, 0 is a flash message.'
|
||||
description: 'Indicated the message type. 1 is a normal message, 0 is a flash message.',
|
||||
},
|
||||
{
|
||||
displayName: 'Reference',
|
||||
name: 'reference',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'A client reference.'
|
||||
description: 'A client reference.',
|
||||
},
|
||||
{
|
||||
displayName: 'Report Url',
|
||||
name: 'reportUrl',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'The status report URL to be used on a per-message basis.<br /> Reference is required for a status report webhook to be sent.'
|
||||
description: 'The status report URL to be used on a per-message basis.<br /> Reference is required for a status report webhook to be sent.',
|
||||
},
|
||||
{
|
||||
displayName: 'Scheduled Date-time',
|
||||
name: 'scheduledDatetime',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description:
|
||||
'The scheduled date and time of the message in RFC3339 format (Y-m-dTH:i:sP).'
|
||||
description: 'The scheduled date and time of the message in RFC3339 format (Y-m-dTH:i:sP).',
|
||||
},
|
||||
{
|
||||
displayName: 'Type',
|
||||
|
@ -215,28 +225,26 @@ export class MessageBird implements INodeType {
|
|||
options: [
|
||||
{
|
||||
name: 'Binary',
|
||||
value: 'binary'
|
||||
value: 'binary',
|
||||
},
|
||||
{
|
||||
name: 'Flash',
|
||||
value: 'flash'
|
||||
value: 'flash',
|
||||
},
|
||||
{
|
||||
name: 'SMS',
|
||||
value: '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',
|
||||
name: 'typeDetails',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description:
|
||||
'A hash with extra information.<br /> Is only used when a binary message is sent.'
|
||||
description: 'A hash with extra information.<br /> Is only used when a binary message is sent.',
|
||||
},
|
||||
{
|
||||
displayName: 'Validity',
|
||||
|
@ -244,13 +252,13 @@ export class MessageBird implements INodeType {
|
|||
type: 'number',
|
||||
default: 1,
|
||||
typeOptions: {
|
||||
minValue: 1
|
||||
minValue: 1,
|
||||
},
|
||||
description: 'The amount of seconds that the message is valid.'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
description: 'The amount of seconds that the message is valid.',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
|
|
Loading…
Reference in a new issue