mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
⚡ Some minior improvements on Zoom-Node
This commit is contained in:
parent
fcfef158cb
commit
af4333f268
|
@ -5,7 +5,7 @@ export class ZoomApi implements ICredentialType {
|
|||
displayName = 'Zoom API';
|
||||
properties = [
|
||||
{
|
||||
displayName: 'Access Token',
|
||||
displayName: 'JTW Token',
|
||||
name: 'accessToken',
|
||||
type: 'string' as NodePropertyTypes,
|
||||
default: ''
|
||||
|
|
|
@ -50,6 +50,27 @@ export const meetingFields = [
|
|||
/* -------------------------------------------------------------------------- */
|
||||
/* meeting:create */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Topic',
|
||||
name: 'topic',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'create',
|
||||
|
||||
],
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
},
|
||||
},
|
||||
description: `Topic of the meeting.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
name: 'additionalFields',
|
||||
|
@ -88,42 +109,6 @@ export const meetingFields = [
|
|||
default: 0,
|
||||
description: 'Meeting duration (minutes).',
|
||||
},
|
||||
{
|
||||
displayName: 'Meeting Topic',
|
||||
name: 'topic',
|
||||
type: 'string',
|
||||
typeOptions: {
|
||||
alwaysOpenEditWindow: true,
|
||||
},
|
||||
default: '',
|
||||
description: `Meeting topic.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Meeting Type',
|
||||
name: 'type',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Instant Meeting',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: 'Scheduled Meeting',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with no fixed time',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with fixed time',
|
||||
value: 8,
|
||||
},
|
||||
|
||||
],
|
||||
default: 2,
|
||||
description: 'Meeting type.',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
|
@ -284,13 +269,39 @@ export const meetingFields = [
|
|||
default: '',
|
||||
description: `Time zone used in the response. The default is the time zone of the calendar.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Type',
|
||||
name: 'type',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Instant Meeting',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: 'Scheduled Meeting',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with no fixed time',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with fixed time',
|
||||
value: 8,
|
||||
},
|
||||
|
||||
],
|
||||
default: 2,
|
||||
description: 'Meeting type.',
|
||||
},
|
||||
],
|
||||
},
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* meeting:get */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Meeting ID',
|
||||
displayName: 'ID',
|
||||
name: 'meetingId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
|
@ -433,7 +444,7 @@ export const meetingFields = [
|
|||
/* meeting:delete */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Meeting ID',
|
||||
displayName: 'ID',
|
||||
name: 'meetingId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
|
@ -488,7 +499,7 @@ export const meetingFields = [
|
|||
/* meeting:update */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
{
|
||||
displayName: 'Meeting ID',
|
||||
displayName: 'ID',
|
||||
name: 'meetingId',
|
||||
type: 'string',
|
||||
default: '',
|
||||
|
@ -542,39 +553,6 @@ export const meetingFields = [
|
|||
default: 0,
|
||||
description: 'Meeting duration (minutes).',
|
||||
},
|
||||
{
|
||||
displayName: 'Meeting Topic',
|
||||
name: 'topic',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: `Meeting topic.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Meeting Type',
|
||||
name: 'type',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Instant Meeting',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: 'Scheduled Meeting',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with no fixed time',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with fixed time',
|
||||
value: 8,
|
||||
},
|
||||
|
||||
],
|
||||
default: 2,
|
||||
description: 'Meeting type.',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
|
@ -735,6 +713,39 @@ export const meetingFields = [
|
|||
default: '',
|
||||
description: `Time zone used in the response. The default is the time zone of the calendar.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Topic',
|
||||
name: 'topic',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: `Meeting topic.`,
|
||||
},
|
||||
{
|
||||
displayName: 'Type',
|
||||
name: 'type',
|
||||
type: 'options',
|
||||
options: [
|
||||
{
|
||||
name: 'Instant Meeting',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
name: 'Scheduled Meeting',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with no fixed time',
|
||||
value: 3,
|
||||
},
|
||||
{
|
||||
name: 'Recurring Meeting with fixed time',
|
||||
value: 8,
|
||||
},
|
||||
|
||||
],
|
||||
default: 2,
|
||||
description: 'Meeting type.',
|
||||
},
|
||||
],
|
||||
},
|
||||
] as INodeProperties[];
|
||||
|
|
|
@ -252,10 +252,7 @@ export class Zoom implements INodeType {
|
|||
}
|
||||
if (operation === 'create') {
|
||||
//https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
|
||||
const additionalFields = this.getNodeParameter(
|
||||
'additionalFields',
|
||||
i
|
||||
) as IDataObject;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
|
||||
const body: IDataObject = {};
|
||||
|
||||
|
@ -310,9 +307,7 @@ export class Zoom implements INodeType {
|
|||
body.settings = settingValues;
|
||||
}
|
||||
|
||||
if (additionalFields.topic) {
|
||||
body.topic = additionalFields.topic as string;
|
||||
}
|
||||
body.topic = this.getNodeParameter('topic', i) as string;
|
||||
|
||||
if (additionalFields.type) {
|
||||
body.type = additionalFields.type as string;
|
||||
|
@ -347,8 +342,6 @@ export class Zoom implements INodeType {
|
|||
body.agenda = additionalFields.agenda as string;
|
||||
}
|
||||
|
||||
console.log(body);
|
||||
|
||||
responseData = await zoomApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
|
|
Loading…
Reference in a new issue