Improvements to Zoom-Node

This commit is contained in:
ricardo 2020-06-24 19:28:08 -04:00
parent 34e05f0f72
commit 4555d6bfc9
4 changed files with 821 additions and 863 deletions

View file

@ -33,6 +33,7 @@ export async function zoomApiRequest(this: IExecuteFunctions | IExecuteSingleFun
if (Object.keys(query).length === 0) { if (Object.keys(query).length === 0) {
delete options.qs; delete options.qs;
} }
try { try {
if (authenticationMethod === 'accessToken') { if (authenticationMethod === 'accessToken') {
const credentials = this.getCredentials('zoomApi'); const credentials = this.getCredentials('zoomApi');

View file

@ -43,31 +43,13 @@ export const meetingOperations = [
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
} },
] as INodeProperties[]; ] as INodeProperties[];
export const meetingFields = [ export const meetingFields = [
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* meeting:create */ /* meeting:create */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
{
displayName: 'User ID',
name: 'userId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meeting',
],
},
},
description: 'User ID or Email Address.',
},
{ {
displayName: 'Additional Fields', displayName: 'Additional Fields',
name: 'additionalFields', name: 'additionalFields',
@ -90,98 +72,29 @@ export const meetingFields = [
displayName: 'Agenda', displayName: 'Agenda',
name: 'agenda', name: 'agenda',
type: 'string', type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '', default: '',
description: 'Meeting agenda.', description: 'Meeting agenda.',
}, },
{
displayName: 'Alternative Hosts',
name: 'alternativeHosts',
type: 'string',
default: '',
description: 'Alternative hosts email IDs.',
},
{
displayName: 'Auto Recording',
name: 'autoRecording',
type: 'options',
options: [
{
name: 'Record on Local',
value: 'local',
},
{
name: 'Record on Cloud',
value: 'cloud',
},
{
name: 'Disabled',
value: 'none',
},
],
default: 'none',
description: 'Auto recording.',
},
{
displayName: 'Audio',
name: 'audio',
type: 'options',
options: [
{
name: 'Both Telephony and VoiP',
value: 'both',
},
{
name: 'Telephony',
value: 'telephony',
},
{
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the meeting.',
},
{ {
displayName: 'Duration', displayName: 'Duration',
name: 'duration', name: 'duration',
type: 'number', type: 'number',
default: '', typeOptions: {
description: 'Duration.', minValue: 0,
}, },
{ default: 0,
displayName: 'Host Meeting in China', description: 'Meeting duration (minutes).',
name: 'cnMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in China.',
},
{
displayName: 'Host Meeting in India',
name: 'inMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in India.',
},
{
displayName: 'Host Video',
name: 'hostVideo',
type: 'boolean',
default: false,
description: 'Start video when host joins the meeting.',
},
{
displayName: 'Join Before Host',
name: 'joinBeforeHost',
type: 'boolean',
default: false,
description: 'Allow participants to join the meeting before host starts it.',
}, },
{ {
displayName: 'Meeting Topic', displayName: 'Meeting Topic',
name: 'topic', name: 'topic',
type: 'string', type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '', default: '',
description: `Meeting topic.`, description: `Meeting topic.`,
}, },
@ -212,7 +125,106 @@ export const meetingFields = [
description: 'Meeting type.', description: 'Meeting type.',
}, },
{ {
displayName: 'Muting before entry', displayName: 'Password',
name: 'password',
type: 'string',
default: '',
description: 'Password to join the meeting with maximum 10 characters.',
},
{
displayName: 'Schedule For',
name: 'scheduleFor',
type: 'string',
default: '',
description: 'Schedule meeting for someone else from your account, provide their email ID.',
},
{
displayName: 'Settings',
name: 'settings',
type: 'collection',
placeholder: 'Add Setting',
default: {},
options: [
{
displayName: 'Audio',
name: 'audio',
type: 'options',
options: [
{
name: 'Both Telephony and VoiP',
value: 'both',
},
{
name: 'Telephony',
value: 'telephony',
},
{
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the meeting.',
},
{
displayName: 'Alternative Hosts',
name: 'alternativeHosts',
type: 'string',
default: '',
description: 'Alternative hosts email IDs.',
},
{
displayName: 'Auto Recording',
name: 'autoRecording',
type: 'options',
options: [
{
name: 'Record on Local',
value: 'local',
},
{
name: 'Record on Cloud',
value: 'cloud',
},
{
name: 'Disabled',
value: 'none',
},
],
default: 'none',
description: 'Auto recording.',
},
{
displayName: 'Host Meeting in China',
name: 'cnMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in China.',
},
{
displayName: 'Host Meeting in India',
name: 'inMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in India.',
},
{
displayName: 'Host Video',
name: 'hostVideo',
type: 'boolean',
default: false,
description: 'Start video when host joins the meeting.',
},
{
displayName: 'Join Before Host',
name: 'joinBeforeHost',
type: 'boolean',
default: false,
description: 'Allow participants to join the meeting before host starts it.',
},
{
displayName: 'Muting Upon Entry',
name: 'muteUponEntry', name: 'muteUponEntry',
type: 'boolean', type: 'boolean',
default: false, default: false,
@ -225,13 +237,6 @@ export const meetingFields = [
default: false, default: false,
description: 'Start video when participant joins the meeting.', description: 'Start video when participant joins the meeting.',
}, },
{
displayName: 'Password',
name: 'password',
type: 'string',
default: '',
description: 'Password to join the meeting with maximum 10 characters.',
},
{ {
displayName: 'Registration Type', displayName: 'Registration Type',
name: 'registrationType', name: 'registrationType',
@ -254,11 +259,13 @@ export const meetingFields = [
description: 'Registration type. Used for recurring meetings with fixed time only', description: 'Registration type. Used for recurring meetings with fixed time only',
}, },
{ {
displayName: 'Schedule For', displayName: 'Watermark',
name: 'scheduleFor', name: 'watermark',
type: 'string', type: 'boolean',
default: '', default: false,
description: 'Schedule meeting for someone else from your account, provide their email ID.', description: 'Adds watermark when viewing a shared screen.',
},
],
}, },
{ {
displayName: 'Start Time', displayName: 'Start Time',
@ -277,13 +284,6 @@ export const meetingFields = [
default: '', default: '',
description: `Time zone used in the response. The default is the time zone of the calendar.`, description: `Time zone used in the response. The default is the time zone of the calendar.`,
}, },
{
displayName: 'Watermark',
name: 'watermark',
type: 'boolean',
default: false,
description: 'Adds watermark when viewing a shared screen.',
},
], ],
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -344,24 +344,6 @@ export const meetingFields = [
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* meeting:getAll */ /* meeting:getAll */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
{
displayName: 'User ID',
name: 'userId',
type: 'string',
default: '',
required: true,
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meeting',
],
},
},
description: 'User ID or email-ID.',
},
{ {
displayName: 'Return All', displayName: 'Return All',
name: 'returnAll', name: 'returnAll',
@ -404,10 +386,10 @@ export const meetingFields = [
description: 'How many results to return.', description: 'How many results to return.',
}, },
{ {
displayName: 'Additional Fields', displayName: 'Filters',
name: 'additionalFields', name: 'filters',
type: 'collection', type: 'collection',
placeholder: 'Add Field', placeholder: 'Add Filter',
default: {}, default: {},
displayOptions: { displayOptions: {
show: { show: {
@ -429,20 +411,23 @@ export const meetingFields = [
{ {
name: 'Scheduled', name: 'Scheduled',
value: 'scheduled', value: 'scheduled',
description: 'This includes all valid past meetings, live meetings and upcoming scheduled meetings'
}, },
{ {
name: 'Live', name: 'Live',
value: 'live', value: 'live',
description: 'All ongoing meetings',
}, },
{ {
name: 'Upcoming', name: 'Upcoming',
value: 'upcoming', value: 'upcoming',
description: 'All upcoming meetings including live meetings',
}, },
], ],
default: 'live', default: 'live',
description: `Meeting type.`, description: `Meeting type.`,
}, },
] ],
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* meeting:delete */ /* meeting:delete */
@ -521,8 +506,8 @@ export const meetingFields = [
description: 'Meeting ID.', description: 'Meeting ID.',
}, },
{ {
displayName: 'Additional Fields', displayName: 'Update Fields',
name: 'additionalFields', name: 'updateFields',
type: 'collection', type: 'collection',
placeholder: 'Add Field', placeholder: 'Add Field',
default: {}, default: {},
@ -541,100 +526,21 @@ export const meetingFields = [
displayName: 'Agenda', displayName: 'Agenda',
name: 'agenda', name: 'agenda',
type: 'string', type: 'string',
typeOptions: {
alwaysOpenEditWindow: true,
},
default: '', default: '',
description: 'Meeting agenda.', description: 'Meeting agenda.',
}, },
{
displayName: 'Alternative Hosts',
name: 'alternativeHosts',
type: 'string',
default: '',
description: 'Alternative hosts email IDs.',
},
{
displayName: 'Audio',
name: 'audio',
type: 'options',
options: [
{
name: 'Both Telephony and VoiP',
value: 'both',
},
{
name: 'Telephony',
value: 'telephony',
},
{
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the meeting.',
},
{
displayName: 'Auto Recording',
name: 'autoRecording',
type: 'options',
options: [
{
name: 'Record on Local',
value: 'local',
},
{
name: 'Record on Cloud',
value: 'cloud',
},
{
name: 'Disabled',
value: 'none',
},
],
default: 'none',
description: 'Auto recording.',
},
{ {
displayName: 'Duration', displayName: 'Duration',
name: 'duration', name: 'duration',
type: 'number', type: 'number',
default: '', typeOptions: {
description: 'Duration.', minValue: 0,
}, },
{ default: 0,
displayName: 'Join Before Host', description: 'Meeting duration (minutes).',
name: 'joinBeforeHost',
type: 'boolean',
default: false,
description: 'Allow participants to join the meeting before host starts it.',
},
{
displayName: 'Host Meeting in China',
name: 'cnMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in China.',
},
{
displayName: 'Host Meeting in India',
name: 'inMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in India.',
},
{
displayName: 'Host Video',
name: 'hostVideo',
type: 'boolean',
default: false,
description: 'Start video when host joins the meeting.',
},
{
displayName: 'Occurrence ID',
name: 'occurrenceId',
type: 'string',
default: '',
description: 'Occurrence ID.',
}, },
{ {
displayName: 'Meeting Topic', displayName: 'Meeting Topic',
@ -669,13 +575,6 @@ export const meetingFields = [
default: 2, default: 2,
description: 'Meeting type.', description: 'Meeting type.',
}, },
{
displayName: 'Muting Before Entry',
name: 'muteUponEntry',
type: 'boolean',
default: false,
description: 'Mute participants upon entry.',
},
{ {
displayName: 'Password', displayName: 'Password',
name: 'password', name: 'password',
@ -683,6 +582,105 @@ export const meetingFields = [
default: '', default: '',
description: 'Password to join the meeting with maximum 10 characters.', description: 'Password to join the meeting with maximum 10 characters.',
}, },
{
displayName: 'Schedule For',
name: 'scheduleFor',
type: 'string',
default: '',
description: 'Schedule meeting for someone else from your account, provide their email ID.',
},
{
displayName: 'Settings',
name: 'settings',
type: 'collection',
placeholder: 'Add Setting',
default: {},
options: [
{
displayName: 'Audio',
name: 'audio',
type: 'options',
options: [
{
name: 'Both Telephony and VoiP',
value: 'both',
},
{
name: 'Telephony',
value: 'telephony',
},
{
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the meeting.',
},
{
displayName: 'Alternative Hosts',
name: 'alternativeHosts',
type: 'string',
default: '',
description: 'Alternative hosts email IDs.',
},
{
displayName: 'Auto Recording',
name: 'autoRecording',
type: 'options',
options: [
{
name: 'Record on Local',
value: 'local',
},
{
name: 'Record on Cloud',
value: 'cloud',
},
{
name: 'Disabled',
value: 'none',
},
],
default: 'none',
description: 'Auto recording.',
},
{
displayName: 'Host Meeting in China',
name: 'cnMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in China.',
},
{
displayName: 'Host Meeting in India',
name: 'inMeeting',
type: 'boolean',
default: false,
description: 'Host Meeting in India.',
},
{
displayName: 'Host Video',
name: 'hostVideo',
type: 'boolean',
default: false,
description: 'Start video when host joins the meeting.',
},
{
displayName: 'Join Before Host',
name: 'joinBeforeHost',
type: 'boolean',
default: false,
description: 'Allow participants to join the meeting before host starts it.',
},
{
displayName: 'Muting Upon Entry',
name: 'muteUponEntry',
type: 'boolean',
default: false,
description: 'Mute participants upon entry.',
},
{ {
displayName: 'Participant Video', displayName: 'Participant Video',
name: 'participantVideo', name: 'participantVideo',
@ -696,7 +694,7 @@ export const meetingFields = [
type: 'options', type: 'options',
options: [ options: [
{ {
name: 'Attendees register once and can attend any of the occurrences', name: 'Attendees register once and can attend any of the occurences',
value: 1, value: 1,
}, },
{ {
@ -712,11 +710,13 @@ export const meetingFields = [
description: 'Registration type. Used for recurring meetings with fixed time only', description: 'Registration type. Used for recurring meetings with fixed time only',
}, },
{ {
displayName: 'Schedule For', displayName: 'Watermark',
name: 'scheduleFor', name: 'watermark',
type: 'string', type: 'boolean',
default: '', default: false,
description: 'Schedule meeting for someone else from your account, provide their email ID.', description: 'Adds watermark when viewing a shared screen.',
},
],
}, },
{ {
displayName: 'Start Time', displayName: 'Start Time',
@ -735,16 +735,6 @@ export const meetingFields = [
default: '', default: '',
description: `Time zone used in the response. The default is the time zone of the calendar.`, description: `Time zone used in the response. The default is the time zone of the calendar.`,
}, },
{
displayName: 'Watermark',
name: 'watermark',
type: 'boolean',
default: false,
description: 'Adds watermark when viewing a shared screen.',
},
], ],
}, },
] as INodeProperties[]; ] as INodeProperties[];

View file

@ -1,6 +1,7 @@
import { import {
INodeProperties, INodeProperties,
} from 'n8n-workflow'; } from 'n8n-workflow';
export const meetingRegistrantOperations = [ export const meetingRegistrantOperations = [
{ {
displayName: 'Operation', displayName: 'Operation',
@ -9,7 +10,7 @@ export const meetingRegistrantOperations = [
displayOptions: { displayOptions: {
show: { show: {
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -38,7 +39,7 @@ export const meetingRegistrantOperations = [
export const meetingRegistrantFields = [ export const meetingRegistrantFields = [
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* meetingRegistrants:create */ /* meetingRegistrant:create */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
{ {
displayName: 'Meeting Id', displayName: 'Meeting Id',
@ -52,7 +53,7 @@ export const meetingRegistrantFields = [
'create', 'create',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -70,7 +71,7 @@ export const meetingRegistrantFields = [
'create', 'create',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -88,7 +89,7 @@ export const meetingRegistrantFields = [
'create', 'create',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -107,7 +108,7 @@ export const meetingRegistrantFields = [
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -248,7 +249,7 @@ export const meetingRegistrantFields = [
], ],
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* meetingRegistrants:getAll */ /* meetingRegistrant:getAll */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
{ {
displayName: 'Meeting ID', displayName: 'Meeting ID',
@ -262,7 +263,7 @@ export const meetingRegistrantFields = [
'getAll', 'getAll',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -278,7 +279,7 @@ export const meetingRegistrantFields = [
'getAll', 'getAll',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -295,7 +296,7 @@ export const meetingRegistrantFields = [
'getAll', 'getAll',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
returnAll: [ returnAll: [
false, false,
@ -322,7 +323,7 @@ export const meetingRegistrantFields = [
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -359,7 +360,7 @@ export const meetingRegistrantFields = [
] ]
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* meetingRegistrants:update */ /* meetingRegistrant:update */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
{ {
displayName: 'Meeting ID', displayName: 'Meeting ID',
@ -373,7 +374,7 @@ export const meetingRegistrantFields = [
'update', 'update',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -390,7 +391,7 @@ export const meetingRegistrantFields = [
'update', 'update',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },
@ -423,7 +424,7 @@ export const meetingRegistrantFields = [
'update', 'update',
], ],
resource: [ resource: [
'meetingRegistrants', 'meetingRegistrant',
], ],
}, },
}, },

File diff suppressed because it is too large Load diff