n8n-3867-progressively-apply-prettier-to-all (#3873)

* 🔨 formatting nodes with prettier
This commit is contained in:
Michael Kret
2022-08-17 18:50:24 +03:00
committed by GitHub
parent f2d326c7f0
commit 91d7e16c81
1072 changed files with 42357 additions and 59109 deletions

View File

@@ -1,19 +1,19 @@
import {
OptionsWithUri,
} from 'request';
import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
IExecuteSingleFunctions,
ILoadOptionsFunctions,
} from 'n8n-core';
import { IExecuteFunctions, IExecuteSingleFunctions, ILoadOptionsFunctions } from 'n8n-core';
import {
IDataObject, NodeApiError, NodeOperationError,
} from 'n8n-workflow';
export async function zoomApiRequest(this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions, method: string, resource: string, body: object = {}, query: object = {}, headers: {} | undefined = undefined, option: {} = {}): Promise<any> { // tslint:disable-line:no-any
import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow';
export async function zoomApiRequest(
this: IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions,
method: string,
resource: string,
body: object = {},
query: object = {},
headers: {} | undefined = undefined,
option: {} = {},
// tslint:disable-next-line:no-any
): Promise<any> {
const authenticationMethod = this.getNodeParameter('authentication', 0, 'accessToken') as string;
let options: OptionsWithUri = {
@@ -36,7 +36,7 @@ export async function zoomApiRequest(this: IExecuteFunctions | IExecuteSingleFun
try {
if (authenticationMethod === 'accessToken') {
return await this.helpers.requestWithAuthentication.call(this,'zoomApi',options);
return await this.helpers.requestWithAuthentication.call(this, 'zoomApi', options);
} else {
//@ts-ignore
return await this.helpers.requestOAuth2.call(this, 'zoomOAuth2Api', options);
@@ -46,7 +46,6 @@ export async function zoomApiRequest(this: IExecuteFunctions | IExecuteSingleFun
}
}
export async function zoomApiRequestAllItems(
this: IExecuteFunctions | ILoadOptionsFunctions,
propertyName: string,
@@ -54,26 +53,19 @@ export async function zoomApiRequestAllItems(
endpoint: string,
body: IDataObject = {},
query: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
// tslint:disable-next-line:no-any
): Promise<any> {
const returnData: IDataObject[] = [];
let responseData;
query.page_number = 0;
do {
responseData = await zoomApiRequest.call(
this,
method,
endpoint,
body,
query,
);
responseData = await zoomApiRequest.call(this, method, endpoint, body, query);
query.page_number++;
returnData.push.apply(returnData, responseData[propertyName]);
// zoom free plan rate limit is 1 request/second
// TODO just wait when the plan is free
await wait();
} while (
responseData.page_count !== responseData.page_number
);
} while (responseData.page_count !== responseData.page_number);
return returnData;
}

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const meetingOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const meetingOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'meeting',
],
resource: ['meeting'],
},
},
options: [
@@ -65,13 +61,8 @@ export const meetingFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meeting',
],
operation: ['create'],
resource: ['meeting'],
},
},
description: 'Topic of the meeting',
@@ -84,13 +75,8 @@ export const meetingFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meeting',
],
operation: ['create'],
resource: ['meeting'],
},
},
options: [
@@ -152,7 +138,6 @@ export const meetingFields: INodeProperties[] = [
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the meeting',
@@ -262,7 +247,8 @@ export const meetingFields: INodeProperties[] = [
name: 'startTime',
type: 'dateTime',
default: '',
description: 'Start time should be used only for scheduled or recurring meetings with fixed time',
description:
'Start time should be used only for scheduled or recurring meetings with fixed time',
},
{
displayName: 'Timezone Name or ID',
@@ -272,7 +258,8 @@ export const meetingFields: INodeProperties[] = [
loadOptionsMethod: 'getTimezones',
},
default: '',
description: 'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Type',
@@ -295,7 +282,6 @@ export const meetingFields: INodeProperties[] = [
name: 'Recurring Meeting with Fixed Time',
value: 8,
},
],
default: 2,
description: 'Meeting type',
@@ -313,12 +299,8 @@ export const meetingFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'meeting',
],
operation: ['get'],
resource: ['meeting'],
},
},
description: 'Meeting ID',
@@ -331,13 +313,8 @@ export const meetingFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'meeting',
],
operation: ['get'],
resource: ['meeting'],
},
},
options: [
@@ -353,7 +330,8 @@ export const meetingFields: INodeProperties[] = [
name: 'showPreviousOccurrences',
type: 'boolean',
default: false,
description: 'Whether to view meeting details of all previous occurrences of the recurring meeting',
description:
'Whether to view meeting details of all previous occurrences of the recurring meeting',
},
],
},
@@ -366,12 +344,8 @@ export const meetingFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meeting',
],
operation: ['getAll'],
resource: ['meeting'],
},
},
default: false,
@@ -383,15 +357,9 @@ export const meetingFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meeting',
],
returnAll: [
false,
],
operation: ['getAll'],
resource: ['meeting'],
returnAll: [false],
},
},
typeOptions: {
@@ -409,13 +377,8 @@ export const meetingFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meeting',
],
operation: ['getAll'],
resource: ['meeting'],
},
},
options: [
@@ -427,7 +390,8 @@ export const meetingFields: INodeProperties[] = [
{
name: 'Scheduled',
value: 'scheduled',
description: 'This includes all valid past meetings, live meetings and upcoming scheduled meetings',
description:
'This includes all valid past meetings, live meetings and upcoming scheduled meetings',
},
{
name: 'Live',
@@ -456,12 +420,8 @@ export const meetingFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'meeting',
],
operation: ['delete'],
resource: ['meeting'],
},
},
description: 'Meeting ID',
@@ -474,12 +434,8 @@ export const meetingFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'meeting',
],
operation: ['delete'],
resource: ['meeting'],
},
},
options: [
@@ -495,10 +451,10 @@ export const meetingFields: INodeProperties[] = [
name: 'scheduleForReminder',
type: 'boolean',
default: false,
description: 'Whether to notify hosts and alternative hosts about meeting cancellation via email',
description:
'Whether to notify hosts and alternative hosts about meeting cancellation via email',
},
],
},
/* -------------------------------------------------------------------------- */
/* meeting:update */
@@ -511,12 +467,8 @@ export const meetingFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'meeting',
],
operation: ['update'],
resource: ['meeting'],
},
},
description: 'Meeting ID',
@@ -529,12 +481,8 @@ export const meetingFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'meeting',
],
operation: ['update'],
resource: ['meeting'],
},
},
options: [
@@ -596,7 +544,6 @@ export const meetingFields: INodeProperties[] = [
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the meeting',
@@ -703,7 +650,8 @@ export const meetingFields: INodeProperties[] = [
name: 'startTime',
type: 'dateTime',
default: '',
description: 'Start time should be used only for scheduled or recurring meetings with fixed time',
description:
'Start time should be used only for scheduled or recurring meetings with fixed time',
},
{
displayName: 'Timezone Name or ID',
@@ -713,7 +661,8 @@ export const meetingFields: INodeProperties[] = [
loadOptionsMethod: 'getTimezones',
},
default: '',
description: 'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Topic',
@@ -743,7 +692,6 @@ export const meetingFields: INodeProperties[] = [
name: 'Recurring Meeting with Fixed Time',
value: 8,
},
],
default: 2,
description: 'Meeting type',

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const meetingRegistrantOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const meetingRegistrantOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'meetingRegistrant',
],
resource: ['meetingRegistrant'],
},
},
options: [
@@ -34,7 +30,6 @@ export const meetingRegistrantOperations: INodeProperties[] = [
description: 'Retrieve all Meeting Registrants',
action: 'Get all meeting registrants',
},
],
default: 'create',
},
@@ -52,12 +47,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meetingRegistrant',
],
operation: ['create'],
resource: ['meetingRegistrant'],
},
},
},
@@ -70,12 +61,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meetingRegistrant',
],
operation: ['create'],
resource: ['meetingRegistrant'],
},
},
description: 'Valid Email-ID',
@@ -88,12 +75,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: '',
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meetingRegistrant',
],
operation: ['create'],
resource: ['meetingRegistrant'],
},
},
},
@@ -105,13 +88,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'meetingRegistrant',
],
operation: ['create'],
resource: ['meetingRegistrant'],
},
},
options: [
@@ -228,7 +206,6 @@ export const meetingRegistrantFields: INodeProperties[] = [
name: 'Not Involved',
value: 'Not Involved',
},
],
default: '',
},
@@ -246,7 +223,6 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: '',
description: 'Valid zip-code of registrant',
},
],
},
/* -------------------------------------------------------------------------- */
@@ -260,12 +236,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meetingRegistrant',
],
operation: ['getAll'],
resource: ['meetingRegistrant'],
},
},
},
@@ -275,12 +247,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meetingRegistrant',
],
operation: ['getAll'],
resource: ['meetingRegistrant'],
},
},
default: false,
@@ -292,15 +260,9 @@ export const meetingRegistrantFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meetingRegistrant',
],
returnAll: [
false,
],
operation: ['getAll'],
resource: ['meetingRegistrant'],
returnAll: [false],
},
},
typeOptions: {
@@ -318,13 +280,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'meetingRegistrant',
],
operation: ['getAll'],
resource: ['meetingRegistrant'],
},
},
options: [
@@ -355,7 +312,6 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: 'approved',
description: 'Registrant Status',
},
],
},
/* -------------------------------------------------------------------------- */
@@ -369,12 +325,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'meetingRegistrant',
],
operation: ['update'],
resource: ['meetingRegistrant'],
},
},
},
@@ -385,12 +337,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'meetingRegistrant',
],
operation: ['update'],
resource: ['meetingRegistrant'],
},
},
options: [
@@ -421,12 +369,8 @@ export const meetingRegistrantFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'meetingRegistrant',
],
operation: ['update'],
resource: ['meetingRegistrant'],
},
},
options: [
@@ -436,8 +380,6 @@ export const meetingRegistrantFields: INodeProperties[] = [
type: 'string',
default: '',
},
],
},
];

View File

@@ -1,6 +1,4 @@
import {
INodeProperties,
} from 'n8n-workflow';
import { INodeProperties } from 'n8n-workflow';
export const webinarOperations: INodeProperties[] = [
{
@@ -10,9 +8,7 @@ export const webinarOperations: INodeProperties[] = [
noDataExpression: true,
displayOptions: {
show: {
resource: [
'webinar',
],
resource: ['webinar'],
},
},
options: [
@@ -63,12 +59,8 @@ export const webinarFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'webinar',
],
operation: ['create'],
resource: ['webinar'],
},
},
description: 'User ID or email ID',
@@ -81,13 +73,8 @@ export const webinarFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'create',
],
resource: [
'webinar',
],
operation: ['create'],
resource: ['webinar'],
},
},
options: [
@@ -142,7 +129,6 @@ export const webinarFields: INodeProperties[] = [
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the webinar',
@@ -230,7 +216,8 @@ export const webinarFields: INodeProperties[] = [
name: 'startTime',
type: 'dateTime',
default: '',
description: 'Start time should be used only for scheduled or recurring webinar with fixed time',
description:
'Start time should be used only for scheduled or recurring webinar with fixed time',
},
{
displayName: 'Timezone Name or ID',
@@ -240,7 +227,8 @@ export const webinarFields: INodeProperties[] = [
loadOptionsMethod: 'getTimezones',
},
default: '',
description: 'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Webinar Topic',
@@ -268,7 +256,6 @@ export const webinarFields: INodeProperties[] = [
],
default: 5,
},
],
},
/* -------------------------------------------------------------------------- */
@@ -282,12 +269,8 @@ export const webinarFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'webinar',
],
operation: ['get'],
resource: ['webinar'],
},
},
},
@@ -299,13 +282,8 @@ export const webinarFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'get',
],
resource: [
'webinar',
],
operation: ['get'],
resource: ['webinar'],
},
},
options: [
@@ -321,7 +299,8 @@ export const webinarFields: INodeProperties[] = [
name: 'showPreviousOccurrences',
type: 'boolean',
default: false,
description: 'Whether to view webinar details of all previous occurrences of the recurring webinar',
description:
'Whether to view webinar details of all previous occurrences of the recurring webinar',
},
],
},
@@ -336,12 +315,8 @@ export const webinarFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'webinar',
],
operation: ['getAll'],
resource: ['webinar'],
},
},
description: 'User ID or email-ID',
@@ -352,12 +327,8 @@ export const webinarFields: INodeProperties[] = [
type: 'boolean',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'webinar',
],
operation: ['getAll'],
resource: ['webinar'],
},
},
default: false,
@@ -369,15 +340,9 @@ export const webinarFields: INodeProperties[] = [
type: 'number',
displayOptions: {
show: {
operation: [
'getAll',
],
resource: [
'webinar',
],
returnAll: [
false,
],
operation: ['getAll'],
resource: ['webinar'],
returnAll: [false],
},
},
typeOptions: {
@@ -398,12 +363,8 @@ export const webinarFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'webinarId',
],
operation: ['delete'],
resource: ['webinarId'],
},
},
},
@@ -415,12 +376,8 @@ export const webinarFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'delete',
],
resource: [
'webinar',
],
operation: ['delete'],
resource: ['webinar'],
},
},
options: [
@@ -431,9 +388,7 @@ export const webinarFields: INodeProperties[] = [
default: '',
description: 'Webinar occurrence ID',
},
],
},
/* -------------------------------------------------------------------------- */
/* webinar:update */
@@ -446,12 +401,8 @@ export const webinarFields: INodeProperties[] = [
required: true,
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'webinar',
],
operation: ['update'],
resource: ['webinar'],
},
},
description: 'User ID or email address of user',
@@ -464,13 +415,8 @@ export const webinarFields: INodeProperties[] = [
default: {},
displayOptions: {
show: {
operation: [
'update',
],
resource: [
'webinar',
],
operation: ['update'],
resource: ['webinar'],
},
},
options: [
@@ -545,7 +491,6 @@ export const webinarFields: INodeProperties[] = [
name: 'VOIP',
value: 'voip',
},
],
default: 'both',
description: 'Determine how participants can join audio portion of the webinar',
@@ -617,7 +562,8 @@ export const webinarFields: INodeProperties[] = [
name: 'startTime',
type: 'dateTime',
default: '',
description: 'Start time should be used only for scheduled or recurring webinar with fixed time',
description:
'Start time should be used only for scheduled or recurring webinar with fixed time',
},
{
displayName: 'Timezone Name or ID',
@@ -627,7 +573,8 @@ export const webinarFields: INodeProperties[] = [
loadOptionsMethod: 'getTimezones',
},
default: '',
description: 'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
description:
'Time zone used in the response. The default is the time zone of the calendar. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
},
{
displayName: 'Webinar Topic',
@@ -657,5 +604,4 @@ export const webinarFields: INodeProperties[] = [
},
],
},
];

View File

@@ -1,6 +1,4 @@
import {
IExecuteFunctions,
} from 'n8n-core';
import { IExecuteFunctions } from 'n8n-core';
import {
IDataObject,
@@ -11,15 +9,9 @@ import {
INodeTypeDescription,
} from 'n8n-workflow';
import {
zoomApiRequest,
zoomApiRequestAllItems,
} from './GenericFunctions';
import { zoomApiRequest, zoomApiRequestAllItems } from './GenericFunctions';
import {
meetingFields,
meetingOperations,
} from './MeetingDescription';
import { meetingFields, meetingOperations } from './MeetingDescription';
// import {
// meetingRegistrantOperations,
@@ -74,9 +66,7 @@ export class Zoom implements INodeType {
required: true,
displayOptions: {
show: {
authentication: [
'accessToken',
],
authentication: ['accessToken'],
},
},
},
@@ -87,9 +77,7 @@ export class Zoom implements INodeType {
required: true,
displayOptions: {
show: {
authentication: [
'oAuth2',
],
authentication: ['oAuth2'],
},
},
},
@@ -144,14 +132,11 @@ export class Zoom implements INodeType {
// ...webinarOperations,
// ...webinarFields,
],
};
methods = {
loadOptions: {
// Get all the timezones to display them to user so that he can select them easily
async getTimezones(
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
async getTimezones(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
for (const timezone of moment.tz.names()) {
const timezoneName = timezone;
@@ -179,14 +164,10 @@ export class Zoom implements INodeType {
qs = {};
//https://marketplace.zoom.us/docs/api-reference/zoom-api/
if (resource === 'meeting') {
if (operation === 'get') {
//https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meeting
const meetingId = this.getNodeParameter('meetingId', i) as string;
const additionalFields = this.getNodeParameter(
'additionalFields',
i,
) as IDataObject;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
if (additionalFields.showPreviousOccurrences) {
qs.show_previous_occurrences = additionalFields.showPreviousOccurrences as boolean;
@@ -196,42 +177,36 @@ export class Zoom implements INodeType {
qs.occurrence_id = additionalFields.occurrenceId as string;
}
responseData = await zoomApiRequest.call(
this,
'GET',
`/meetings/${meetingId}`,
{},
qs,
);
responseData = await zoomApiRequest.call(this, 'GET', `/meetings/${meetingId}`, {}, qs);
}
if (operation === 'getAll') {
//https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetings
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
const filters = this.getNodeParameter(
'filters',
i,
) as IDataObject;
const filters = this.getNodeParameter('filters', i) as IDataObject;
if (filters.type) {
qs.type = filters.type as string;
}
if (returnAll) {
responseData = await zoomApiRequestAllItems.call(this, 'meetings', 'GET', '/users/me/meetings', {}, qs);
responseData = await zoomApiRequestAllItems.call(
this,
'meetings',
'GET',
'/users/me/meetings',
{},
qs,
);
} else {
qs.page_size = this.getNodeParameter('limit', i) as number;
responseData = await zoomApiRequest.call(this, 'GET', '/users/me/meetings', {}, qs);
responseData = responseData.meetings;
}
}
if (operation === 'delete') {
//https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingdelete
const meetingId = this.getNodeParameter('meetingId', i) as string;
const additionalFields = this.getNodeParameter(
'additionalFields',
i,
) as IDataObject;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
if (additionalFields.scheduleForReminder) {
qs.schedule_for_reminder = additionalFields.scheduleForReminder as boolean;
}
@@ -314,10 +289,14 @@ export class Zoom implements INodeType {
if (additionalFields.startTime) {
if (additionalFields.timeZone) {
body.start_time = moment(additionalFields.startTime as string).format('YYYY-MM-DDTHH:mm:ss');
body.start_time = moment(additionalFields.startTime as string).format(
'YYYY-MM-DDTHH:mm:ss',
);
} else {
// if none timezone it's defined used n8n timezone
body.start_time = moment.tz(additionalFields.startTime as string, this.getTimezone()).format();
body.start_time = moment
.tz(additionalFields.startTime as string, this.getTimezone())
.format();
}
}
@@ -341,21 +320,12 @@ export class Zoom implements INodeType {
body.agenda = additionalFields.agenda as string;
}
responseData = await zoomApiRequest.call(
this,
'POST',
`/users/me/meetings`,
body,
qs,
);
responseData = await zoomApiRequest.call(this, 'POST', `/users/me/meetings`, body, qs);
}
if (operation === 'update') {
//https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingupdate
const meetingId = this.getNodeParameter('meetingId', i) as string;
const updateFields = this.getNodeParameter(
'updateFields',
i,
) as IDataObject;
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
const body: IDataObject = {};
@@ -451,7 +421,6 @@ export class Zoom implements INodeType {
);
responseData = { success: true };
}
}
// if (resource === 'meetingRegistrant') {
@@ -568,7 +537,6 @@ export class Zoom implements INodeType {
// ) as IDataObject;
// const settings: Settings = {};
// if (additionalFields.audio) {
// settings.audio = additionalFields.audio as string;
@@ -629,7 +597,6 @@ export class Zoom implements INodeType {
// }
// if (additionalFields.timeZone) {
// body.timezone = additionalFields.timeZone as string;
@@ -698,7 +665,6 @@ export class Zoom implements INodeType {
// i
// ) as IDataObject;
// if (additionalFields.occurrenceId) {
// qs.occurrence_id = additionalFields.occurrenceId;
@@ -784,7 +750,6 @@ export class Zoom implements INodeType {
// }
// if (additionalFields.timeZone) {
// body.timezone = additionalFields.timeZone as string;