mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Format nodes-base package (A-F) (#3800)
* 🔨 prettier formated nodes - A * 🔨 prettier formated nodes - B * ⚡ prettier formated nodes - C * ⚡ prettier formated nodes - D * ⚡ prettier formated nodes - E-F * 🎨 Adjust nodes-base formatting command (#3805) * Format additional files in nodes A-F (#3811) * ⚡ fixes * 🎨 Add Mindee to ignored dirs Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IExecuteFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IBinaryData,
|
||||
@@ -13,11 +11,7 @@ import {
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
getAttachemnts,
|
||||
webexApiRequest,
|
||||
webexApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
import { getAttachemnts, webexApiRequest, webexApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
import {
|
||||
meetingFields,
|
||||
@@ -97,7 +91,12 @@ export class CiscoWebex implements INodeType {
|
||||
},
|
||||
async getSites(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const sites = await webexApiRequestAllItems.call(this, 'sites', 'GET', '/meetingPreferences/sites');
|
||||
const sites = await webexApiRequestAllItems.call(
|
||||
this,
|
||||
'sites',
|
||||
'GET',
|
||||
'/meetingPreferences/sites',
|
||||
);
|
||||
for (const site of sites) {
|
||||
returnData.push({
|
||||
name: site.siteUrl,
|
||||
@@ -118,25 +117,25 @@ export class CiscoWebex implements INodeType {
|
||||
|
||||
let responseData;
|
||||
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
|
||||
try {
|
||||
if (resource === 'message') {
|
||||
|
||||
// **********************************************************************
|
||||
// message
|
||||
// **********************************************************************
|
||||
|
||||
if (operation === 'create') {
|
||||
|
||||
// ----------------------------------------
|
||||
// message: create
|
||||
// ----------------------------------------
|
||||
|
||||
// https://developer.webex.com/docs/api/v1/messages/create-a-message
|
||||
const destination = this.getNodeParameter('destination', i);
|
||||
const file = this.getNodeParameter('additionalFields.fileUi.fileValue', i, {}) as IDataObject;
|
||||
const file = this.getNodeParameter(
|
||||
'additionalFields.fileUi.fileValue',
|
||||
i,
|
||||
{},
|
||||
) as IDataObject;
|
||||
const markdown = this.getNodeParameter('additionalFields.markdown', i, '') as boolean;
|
||||
const body = {} as IDataObject;
|
||||
if (destination === 'room') {
|
||||
@@ -158,22 +157,31 @@ export class CiscoWebex implements INodeType {
|
||||
|
||||
body['text'] = this.getNodeParameter('text', i);
|
||||
|
||||
body.attachments = getAttachemnts(this.getNodeParameter('additionalFields.attachmentsUi.attachmentValues', i, []) as IDataObject[]);
|
||||
body.attachments = getAttachemnts(
|
||||
this.getNodeParameter(
|
||||
'additionalFields.attachmentsUi.attachmentValues',
|
||||
i,
|
||||
[],
|
||||
) as IDataObject[],
|
||||
);
|
||||
|
||||
if (Object.keys(file).length) {
|
||||
|
||||
const isBinaryData = file.fileLocation === 'binaryData' ? true : false;
|
||||
|
||||
if (isBinaryData) {
|
||||
|
||||
if (!items[i].binary) {
|
||||
throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { itemIndex: i });
|
||||
throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', {
|
||||
itemIndex: i,
|
||||
});
|
||||
}
|
||||
|
||||
const binaryPropertyName = file.binaryPropertyName as string;
|
||||
|
||||
const binaryData = items[i].binary![binaryPropertyName] as IBinaryData;
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(i, binaryPropertyName);
|
||||
const binaryDataBuffer = await this.helpers.getBinaryDataBuffer(
|
||||
i,
|
||||
binaryPropertyName,
|
||||
);
|
||||
|
||||
const formData = {
|
||||
files: {
|
||||
@@ -192,14 +200,19 @@ export class CiscoWebex implements INodeType {
|
||||
}
|
||||
|
||||
if (file.fileLocation === 'binaryData') {
|
||||
responseData = await webexApiRequest.call(this, 'POST', '/messages', {}, {}, undefined, { formData: body });
|
||||
responseData = await webexApiRequest.call(
|
||||
this,
|
||||
'POST',
|
||||
'/messages',
|
||||
{},
|
||||
{},
|
||||
undefined,
|
||||
{ formData: body },
|
||||
);
|
||||
} else {
|
||||
responseData = await webexApiRequest.call(this, 'POST', '/messages', body);
|
||||
}
|
||||
|
||||
|
||||
} else if (operation === 'delete') {
|
||||
|
||||
// ----------------------------------------
|
||||
// message: delete
|
||||
// ----------------------------------------
|
||||
@@ -210,9 +223,7 @@ export class CiscoWebex implements INodeType {
|
||||
const endpoint = `/messages/${messageId}`;
|
||||
responseData = await webexApiRequest.call(this, 'DELETE', endpoint);
|
||||
responseData = { success: true };
|
||||
|
||||
} else if (operation === 'get') {
|
||||
|
||||
// ----------------------------------------
|
||||
// message: get
|
||||
// ----------------------------------------
|
||||
@@ -222,10 +233,7 @@ export class CiscoWebex implements INodeType {
|
||||
|
||||
const endpoint = `/messages/${messageId}`;
|
||||
responseData = await webexApiRequest.call(this, 'GET', endpoint);
|
||||
|
||||
|
||||
} else if (operation === 'getAll') {
|
||||
|
||||
// ----------------------------------------
|
||||
// message: getAll
|
||||
// ----------------------------------------
|
||||
@@ -237,22 +245,25 @@ export class CiscoWebex implements INodeType {
|
||||
const filters = this.getNodeParameter('filters', i) as IDataObject;
|
||||
const returnAll = this.getNodeParameter('returnAll', i) as boolean;
|
||||
|
||||
|
||||
if (Object.keys(filters).length) {
|
||||
Object.assign(qs, filters);
|
||||
}
|
||||
|
||||
if (returnAll === true) {
|
||||
responseData = await webexApiRequestAllItems.call(this, 'items', 'GET', '/messages', {}, qs);
|
||||
responseData = await webexApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
'/messages',
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
} else {
|
||||
qs.max = this.getNodeParameter('limit', i) as number;
|
||||
responseData = await webexApiRequest.call(this, 'GET', '/messages', {}, qs);
|
||||
responseData = responseData.items;
|
||||
}
|
||||
|
||||
|
||||
} else if (operation === 'update') {
|
||||
|
||||
// ----------------------------------------
|
||||
// message: update
|
||||
// ----------------------------------------
|
||||
@@ -284,7 +295,11 @@ export class CiscoWebex implements INodeType {
|
||||
const title = this.getNodeParameter('title', i) as string;
|
||||
const start = this.getNodeParameter('start', i) as string;
|
||||
const end = this.getNodeParameter('end', i) as string;
|
||||
const invitees = this.getNodeParameter('additionalFields.inviteesUi.inviteeValues', i, []) as IDataObject[];
|
||||
const invitees = this.getNodeParameter(
|
||||
'additionalFields.inviteesUi.inviteeValues',
|
||||
i,
|
||||
[],
|
||||
) as IDataObject[];
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
|
||||
const body: IDataObject = {
|
||||
@@ -295,8 +310,10 @@ export class CiscoWebex implements INodeType {
|
||||
};
|
||||
|
||||
if (body.requireRegistrationInfo) {
|
||||
body['registration'] = (body.requireRegistrationInfo as string[])
|
||||
.reduce((obj, value) => Object.assign(obj, { [`${value}`]: true }), {});
|
||||
body['registration'] = (body.requireRegistrationInfo as string[]).reduce(
|
||||
(obj, value) => Object.assign(obj, { [`${value}`]: true }),
|
||||
{},
|
||||
);
|
||||
delete body.requireRegistrationInfo;
|
||||
}
|
||||
|
||||
@@ -306,7 +323,6 @@ export class CiscoWebex implements INodeType {
|
||||
}
|
||||
|
||||
responseData = await webexApiRequest.call(this, 'POST', '/meetings', body);
|
||||
|
||||
}
|
||||
|
||||
if (operation === 'delete') {
|
||||
@@ -317,7 +333,13 @@ export class CiscoWebex implements INodeType {
|
||||
...options,
|
||||
};
|
||||
|
||||
responseData = await webexApiRequest.call(this, 'DELETE', `/meetings/${meetingId}`, {}, qs);
|
||||
responseData = await webexApiRequest.call(
|
||||
this,
|
||||
'DELETE',
|
||||
`/meetings/${meetingId}`,
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
responseData = { success: true };
|
||||
}
|
||||
|
||||
@@ -336,7 +358,15 @@ export class CiscoWebex implements INodeType {
|
||||
};
|
||||
}
|
||||
|
||||
responseData = await webexApiRequest.call(this, 'GET', `/meetings/${meetingId}`, {}, qs, undefined, { headers });
|
||||
responseData = await webexApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/meetings/${meetingId}`,
|
||||
{},
|
||||
qs,
|
||||
undefined,
|
||||
{ headers },
|
||||
);
|
||||
}
|
||||
|
||||
if (operation === 'getAll') {
|
||||
@@ -348,15 +378,26 @@ export class CiscoWebex implements INodeType {
|
||||
};
|
||||
|
||||
if (qs.from) {
|
||||
qs.from = moment(qs.from as string).utc(true).format();
|
||||
qs.from = moment(qs.from as string)
|
||||
.utc(true)
|
||||
.format();
|
||||
}
|
||||
|
||||
if (qs.to) {
|
||||
qs.to = moment(qs.to as string).utc(true).format();
|
||||
qs.to = moment(qs.to as string)
|
||||
.utc(true)
|
||||
.format();
|
||||
}
|
||||
|
||||
if (returnAll === true) {
|
||||
responseData = await webexApiRequestAllItems.call(this, 'items', 'GET', '/meetings', {}, qs);
|
||||
responseData = await webexApiRequestAllItems.call(
|
||||
this,
|
||||
'items',
|
||||
'GET',
|
||||
'/meetings',
|
||||
{},
|
||||
qs,
|
||||
);
|
||||
returnData.push(...responseData);
|
||||
} else {
|
||||
qs.max = this.getNodeParameter('limit', i) as number;
|
||||
@@ -367,23 +408,28 @@ export class CiscoWebex implements INodeType {
|
||||
|
||||
if (operation === 'update') {
|
||||
const meetingId = this.getNodeParameter('meetingId', i) as string;
|
||||
const invitees = this.getNodeParameter('updateFields.inviteesUi.inviteeValues', i, []) as IDataObject[];
|
||||
const invitees = this.getNodeParameter(
|
||||
'updateFields.inviteesUi.inviteeValues',
|
||||
i,
|
||||
[],
|
||||
) as IDataObject[];
|
||||
const updateFields = this.getNodeParameter('updateFields', i) as IDataObject;
|
||||
|
||||
const {
|
||||
title,
|
||||
password,
|
||||
start,
|
||||
end,
|
||||
} = await webexApiRequest.call(this, 'GET', `/meetings/${meetingId}`);
|
||||
const { title, password, start, end } = await webexApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/meetings/${meetingId}`,
|
||||
);
|
||||
|
||||
const body: IDataObject = {
|
||||
...updateFields,
|
||||
};
|
||||
|
||||
if (body.requireRegistrationInfo) {
|
||||
body['registration'] = (body.requireRegistrationInfo as string[])
|
||||
.reduce((obj, value) => Object.assign(obj, { [`${value}`]: true }), {});
|
||||
body['registration'] = (body.requireRegistrationInfo as string[]).reduce(
|
||||
(obj, value) => Object.assign(obj, { [`${value}`]: true }),
|
||||
{},
|
||||
);
|
||||
delete body.requireRegistrationInfo;
|
||||
}
|
||||
|
||||
@@ -412,7 +458,6 @@ export class CiscoWebex implements INodeType {
|
||||
}
|
||||
|
||||
responseData = await webexApiRequest.call(this, 'PUT', `/meetings/${meetingId}`, body);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,9 +466,7 @@ export class CiscoWebex implements INodeType {
|
||||
} else if (responseData !== undefined) {
|
||||
returnData.push(responseData as IDataObject);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({ error: error.toString() });
|
||||
continue;
|
||||
@@ -431,7 +474,6 @@ export class CiscoWebex implements INodeType {
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// if (resource === 'meetingTranscript') {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
IHookFunctions,
|
||||
IWebhookFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IHookFunctions, IWebhookFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
IDataObject,
|
||||
@@ -19,9 +16,7 @@ import {
|
||||
webexApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
createHmac,
|
||||
} from 'crypto';
|
||||
import { createHmac } from 'crypto';
|
||||
|
||||
export class CiscoWebexTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -102,14 +97,13 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'attachmentAction',
|
||||
],
|
||||
resource: ['attachmentAction'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-description-boolean-without-whether
|
||||
description: 'By default the response only contain a reference to the data the user inputed. If this option gets activated, it will resolve the data automatically.',
|
||||
description:
|
||||
'By default the response only contain a reference to the data the user inputed. If this option gets activated, it will resolve the data automatically.',
|
||||
},
|
||||
{
|
||||
displayName: 'Filters',
|
||||
@@ -124,13 +118,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'message',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['message'],
|
||||
'/event': ['created', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -142,13 +131,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'room',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
],
|
||||
'/resource': ['room'],
|
||||
'/event': ['created', 'updated'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -160,14 +144,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'membership',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['membership'],
|
||||
'/event': ['created', 'updated', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -179,17 +157,13 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'message',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['message'],
|
||||
'/event': ['created', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Limit to messages which contain these mentioned people, by person ID; accepts me as a shorthand for your own person ID; separate multiple values with commas',
|
||||
description:
|
||||
'Limit to messages which contain these mentioned people, by person ID; accepts me as a shorthand for your own person ID; separate multiple values with commas',
|
||||
},
|
||||
{
|
||||
displayName: 'Message ID',
|
||||
@@ -197,12 +171,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'attachmentAction',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
],
|
||||
'/resource': ['attachmentAction'],
|
||||
'/event': ['created'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -213,9 +183,7 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
name: 'ownedBy',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'meeting',
|
||||
],
|
||||
'/resource': ['meeting'],
|
||||
},
|
||||
},
|
||||
type: 'string',
|
||||
@@ -227,14 +195,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'membership',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['membership'],
|
||||
'/event': ['created', 'updated', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -246,13 +208,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'message',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['message'],
|
||||
'/event': ['created', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -264,12 +221,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'attachmentAction',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
],
|
||||
'/resource': ['attachmentAction'],
|
||||
'/event': ['created'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -281,14 +234,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'membership',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['membership'],
|
||||
'/event': ['created', 'updated', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -300,13 +247,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'message',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['message'],
|
||||
'/event': ['created', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -319,12 +261,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'attachmentAction',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
],
|
||||
'/resource': ['attachmentAction'],
|
||||
'/event': ['created'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -336,14 +274,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'membership',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['membership'],
|
||||
'/event': ['created', 'updated', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -355,13 +287,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'message',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
],
|
||||
'/resource': ['message'],
|
||||
'/event': ['created', 'updated'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -383,13 +310,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'message',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'deleted',
|
||||
],
|
||||
'/resource': ['message'],
|
||||
'/event': ['created', 'deleted'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -411,13 +333,8 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
],
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/resource': [
|
||||
'room',
|
||||
],
|
||||
'/event': [
|
||||
'created',
|
||||
'updated',
|
||||
],
|
||||
'/resource': ['room'],
|
||||
'/event': ['created', 'updated'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -587,10 +504,12 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
// one that is supposed to get created.
|
||||
const data = await webexApiRequestAllItems.call(this, 'items', 'GET', '/webhooks');
|
||||
for (const webhook of data) {
|
||||
if (webhook.url === webhookUrl
|
||||
&& webhook.resource === mapResource(resource)
|
||||
&& webhook.event === event
|
||||
&& webhook.status === 'active') {
|
||||
if (
|
||||
webhook.url === webhookUrl &&
|
||||
webhook.resource === mapResource(resource) &&
|
||||
webhook.event === event &&
|
||||
webhook.status === 'active'
|
||||
) {
|
||||
webhookData.webhookId = webhook.id as string;
|
||||
return true;
|
||||
}
|
||||
@@ -643,7 +562,6 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
async delete(this: IHookFunctions): Promise<boolean> {
|
||||
const webhookData = this.getWorkflowStaticData('node');
|
||||
if (webhookData.webhookId !== undefined) {
|
||||
|
||||
const endpoint = `/webhooks/${webhookData.webhookId}`;
|
||||
try {
|
||||
await webexApiRequest.call(this, 'DELETE', endpoint);
|
||||
@@ -668,20 +586,23 @@ export class CiscoWebexTrigger implements INodeType {
|
||||
const resolveData = this.getNodeParameter('resolveData', false) as boolean;
|
||||
|
||||
//@ts-ignore
|
||||
const computedSignature = createHmac('sha1', webhookData.secret).update(req.rawBody).digest('hex');
|
||||
const computedSignature = createHmac('sha1', webhookData.secret)
|
||||
//@ts-ignore
|
||||
.update(req.rawBody)
|
||||
.digest('hex');
|
||||
if (headers['x-spark-signature'] !== computedSignature) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (resolveData) {
|
||||
const { data: { id } } = bodyData as { data: { id: string } };
|
||||
const {
|
||||
data: { id },
|
||||
} = bodyData as { data: { id: string } };
|
||||
bodyData = await webexApiRequest.call(this, 'GET', `/attachment/actions/${id}`);
|
||||
}
|
||||
|
||||
return {
|
||||
workflowData: [
|
||||
this.helpers.returnJsonArray(bodyData),
|
||||
],
|
||||
workflowData: [this.helpers.returnJsonArray(bodyData)],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import {
|
||||
OptionsWithUri,
|
||||
} from 'request';
|
||||
import { OptionsWithUri } from 'request';
|
||||
|
||||
import {
|
||||
IExecuteFunctions,
|
||||
IHookFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
} from 'n8n-core';
|
||||
import { IExecuteFunctions, IHookFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
||||
|
||||
import {
|
||||
ICredentialDataDecryptedObject,
|
||||
@@ -16,15 +10,21 @@ import {
|
||||
NodeApiError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
upperFirst,
|
||||
} from 'lodash';
|
||||
import { upperFirst } from 'lodash';
|
||||
|
||||
import {
|
||||
createHash,
|
||||
} from 'crypto';
|
||||
import { createHash } from 'crypto';
|
||||
|
||||
export async function webexApiRequest(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions, method: string, resource: string, body: any = {}, qs: IDataObject = {}, uri?: string, option: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
export async function webexApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions | IWebhookFunctions,
|
||||
method: string,
|
||||
resource: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
qs: IDataObject = {},
|
||||
uri?: string,
|
||||
option: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
let options: OptionsWithUri = {
|
||||
method,
|
||||
body,
|
||||
@@ -43,21 +43,35 @@ export async function webexApiRequest(this: IExecuteFunctions | ILoadOptionsFunc
|
||||
delete options.qs;
|
||||
}
|
||||
//@ts-ignore
|
||||
return await this.helpers.requestOAuth2.call(this, 'ciscoWebexOAuth2Api', options, { tokenType: 'Bearer' });
|
||||
return await this.helpers.requestOAuth2.call(this, 'ciscoWebexOAuth2Api', options, {
|
||||
tokenType: 'Bearer',
|
||||
});
|
||||
} catch (error) {
|
||||
throw new NodeApiError(this.getNode(), error);
|
||||
}
|
||||
}
|
||||
|
||||
export async function webexApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, propertyName: string, method: string, endpoint: string, body: any = {}, query: IDataObject = {}, options: IDataObject = {}): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
export async function webexApiRequestAllItems(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions,
|
||||
propertyName: string,
|
||||
method: string,
|
||||
endpoint: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
body: any = {},
|
||||
query: IDataObject = {},
|
||||
options: IDataObject = {},
|
||||
// tslint:disable-next-line:no-any
|
||||
): Promise<any> {
|
||||
const returnData: IDataObject[] = [];
|
||||
|
||||
let responseData;
|
||||
let uri: string | undefined;
|
||||
query.max = 100;
|
||||
do {
|
||||
responseData = await webexApiRequest.call(this, method, endpoint, body, query, uri, { resolveWithFullResponse: true, ...options });
|
||||
responseData = await webexApiRequest.call(this, method, endpoint, body, query, uri, {
|
||||
resolveWithFullResponse: true,
|
||||
...options,
|
||||
});
|
||||
if (responseData.headers.link) {
|
||||
uri = responseData.headers['link'].split(';')[0].replace('<', '').replace('>', '');
|
||||
}
|
||||
@@ -71,13 +85,13 @@ export async function webexApiRequestAllItems(this: IExecuteFunctions | ILoadOpt
|
||||
|
||||
export function getEvents() {
|
||||
const resourceEvents: { [key: string]: string[] } = {
|
||||
'attachmentAction': ['created', 'deleted', 'updated', '*'],
|
||||
'membership': ['created', 'deleted', 'updated', '*'],
|
||||
'message': ['created', 'deleted', 'updated', '*'],
|
||||
'room': ['created', 'deleted', 'updated', '*'],
|
||||
'meeting': ['created', 'deleted', 'updated', 'started', 'ended', '*'],
|
||||
'recording': ['created', 'deleted', 'updated', '*'],
|
||||
'telephonyCall': ['created', 'deleted', 'updated'],
|
||||
attachmentAction: ['created', 'deleted', 'updated', '*'],
|
||||
membership: ['created', 'deleted', 'updated', '*'],
|
||||
message: ['created', 'deleted', 'updated', '*'],
|
||||
room: ['created', 'deleted', 'updated', '*'],
|
||||
meeting: ['created', 'deleted', 'updated', 'started', 'ended', '*'],
|
||||
recording: ['created', 'deleted', 'updated', '*'],
|
||||
telephonyCall: ['created', 'deleted', 'updated'],
|
||||
'*': ['created', 'updated', 'deleted', '*'],
|
||||
};
|
||||
|
||||
@@ -90,12 +104,13 @@ export function getEvents() {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
(resource === '*') ? 'all' : resource,
|
||||
],
|
||||
resource: [resource === '*' ? 'all' : resource],
|
||||
},
|
||||
},
|
||||
options: resourceEvents[resource].map((event) => ({ value: (event === '*' ? 'all' : event), name: upperFirst(event) })),
|
||||
options: resourceEvents[resource].map((event) => ({
|
||||
value: event === '*' ? 'all' : event,
|
||||
name: upperFirst(event),
|
||||
})),
|
||||
default: '',
|
||||
required: true,
|
||||
});
|
||||
@@ -104,16 +119,18 @@ export function getEvents() {
|
||||
}
|
||||
|
||||
export function mapResource(event: string) {
|
||||
return ({
|
||||
'attachmentAction': 'attachmentActions',
|
||||
'membership': 'memberships',
|
||||
'message': 'messages',
|
||||
'room': 'rooms',
|
||||
'meeting': 'meetings',
|
||||
'recording': 'recordings',
|
||||
'telephonyCall': 'telephony_calls',
|
||||
'all': 'all',
|
||||
} as { [key: string]: string })[event];
|
||||
return (
|
||||
{
|
||||
attachmentAction: 'attachmentActions',
|
||||
membership: 'memberships',
|
||||
message: 'messages',
|
||||
room: 'rooms',
|
||||
meeting: 'meetings',
|
||||
recording: 'recordings',
|
||||
telephonyCall: 'telephony_calls',
|
||||
all: 'all',
|
||||
} as { [key: string]: string }
|
||||
)[event];
|
||||
}
|
||||
|
||||
export function getAttachemnts(attachements: IDataObject[]) {
|
||||
@@ -121,18 +138,23 @@ export function getAttachemnts(attachements: IDataObject[]) {
|
||||
for (const attachment of attachements) {
|
||||
const body: IDataObject[] = [];
|
||||
const actions: IDataObject[] = [];
|
||||
for (const element of (attachment?.elementsUi as IDataObject).elementValues as IDataObject[] || []) {
|
||||
for (const element of ((attachment?.elementsUi as IDataObject)
|
||||
.elementValues as IDataObject[]) || []) {
|
||||
// tslint:disable-next-line: no-any
|
||||
const { type, ...rest } = element as { type: string, [key: string]: any };
|
||||
const { type, ...rest } = element as { type: string; [key: string]: any };
|
||||
if (type.startsWith('input')) {
|
||||
body.push({ type: `Input.${upperFirst(type.replace('input', ''))}`, ...removeEmptyProperties(rest) });
|
||||
body.push({
|
||||
type: `Input.${upperFirst(type.replace('input', ''))}`,
|
||||
...removeEmptyProperties(rest),
|
||||
});
|
||||
} else {
|
||||
body.push({ type: upperFirst(type), ...removeEmptyProperties(rest) });
|
||||
}
|
||||
}
|
||||
for (const action of (attachment?.actionsUi as IDataObject).actionValues as IDataObject[] || []) {
|
||||
for (const action of ((attachment?.actionsUi as IDataObject).actionValues as IDataObject[]) ||
|
||||
[]) {
|
||||
// tslint:disable-next-line: no-any
|
||||
const { type, ...rest } = action as { type: string, [key: string]: any };
|
||||
const { type, ...rest } = action as { type: string; [key: string]: any };
|
||||
actions.push({ type: `Action.${upperFirst(type)}`, ...removeEmptyProperties(rest) });
|
||||
}
|
||||
_attachments.push({
|
||||
@@ -164,7 +186,8 @@ export function getActionInheritedProperties(): INodeProperties[] {
|
||||
name: 'iconUrl',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+.',
|
||||
description:
|
||||
'Optional icon to be shown on the action in conjunction with the title. Supports data URI in version 1.2+.',
|
||||
},
|
||||
{
|
||||
displayName: 'Style',
|
||||
@@ -185,7 +208,8 @@ export function getActionInheritedProperties(): INodeProperties[] {
|
||||
},
|
||||
],
|
||||
default: 'default',
|
||||
description: 'Controls the style of an Action, which influences how the action is displayed, spoken, etc',
|
||||
description:
|
||||
'Controls the style of an Action, which influences how the action is displayed, spoken, etc',
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -199,13 +223,12 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
required: true,
|
||||
description: 'Text to display. A subset of markdown is supported (https://aka.ms/ACTextFeatures).',
|
||||
description:
|
||||
'Text to display. A subset of markdown is supported (https://aka.ms/ACTextFeatures).',
|
||||
},
|
||||
{
|
||||
displayName: 'Color',
|
||||
@@ -213,9 +236,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -257,9 +278,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -281,9 +300,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -309,9 +326,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -323,9 +338,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
default: 1,
|
||||
@@ -337,9 +350,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -373,9 +384,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -401,9 +410,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
@@ -415,9 +422,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -440,9 +445,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
description: 'Whether to draw a separating line at the top of the element',
|
||||
@@ -453,9 +456,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -497,9 +498,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -511,9 +510,7 @@ export function getTextBlockProperties(): INodeProperties[] {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'textBlock',
|
||||
],
|
||||
type: ['textBlock'],
|
||||
},
|
||||
},
|
||||
default: true,
|
||||
@@ -531,13 +528,12 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Unique identifier for the value. Used to identify collected input when the Submit action is performed.',
|
||||
description:
|
||||
'Unique identifier for the value. Used to identify collected input when the Submit action is performed.',
|
||||
},
|
||||
{
|
||||
displayName: 'Is Multiline',
|
||||
@@ -545,9 +541,7 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
@@ -559,9 +553,7 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
type: 'number',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
default: 1,
|
||||
@@ -573,9 +565,7 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -587,9 +577,7 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -601,9 +589,7 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
type: 'options',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -633,9 +619,7 @@ export function getInputTextProperties(): INodeProperties[] {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'inputText',
|
||||
],
|
||||
type: ['inputText'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
|
||||
@@ -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: [
|
||||
@@ -58,12 +54,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
description: 'Meeting title. The title can be a maximum of 128 characters long.',
|
||||
@@ -76,15 +68,12 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
description: 'Date and time for the start of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'Date and time for the start of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'End',
|
||||
@@ -94,15 +83,12 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
description: 'Date and time for the end of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'Date and time for the end of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Additional Fields',
|
||||
@@ -110,12 +96,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
type: 'collection',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
@@ -133,21 +115,24 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'allowAnyUserToBeCoHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow any attendee with a host account on the target site to become a co-host when joining the meeting',
|
||||
description:
|
||||
'Whether or not to allow any attendee with a host account on the target site to become a co-host when joining the meeting',
|
||||
},
|
||||
{
|
||||
displayName: 'Allow Authenticated Devices',
|
||||
name: 'allowAuthenticatedDevices',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow authenticated video devices in the meeting\'s organization to start or join the meeting without a prompt',
|
||||
description:
|
||||
"Whether or not to allow authenticated video devices in the meeting's organization to start or join the meeting without a prompt",
|
||||
},
|
||||
{
|
||||
displayName: 'Allow First User To Be Co-Host',
|
||||
name: 'allowFirstUserToBeCoHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow the first attendee of the meeting with a host account on the target site to become a co-host',
|
||||
description:
|
||||
'Whether or not to allow the first attendee of the meeting with a host account on the target site to become a co-host',
|
||||
},
|
||||
{
|
||||
displayName: 'Auto Accept Request',
|
||||
@@ -161,7 +146,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'enableConnectAudioBeforeHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow any attendee to connect audio in the meeting before the host joins the meeting',
|
||||
description:
|
||||
'Whether or not to allow any attendee to connect audio in the meeting before the host joins the meeting',
|
||||
},
|
||||
{
|
||||
displayName: 'Enabled Auto Record Meeting',
|
||||
@@ -175,7 +161,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'enabledJoinBeforeHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow any attendee to join the meeting before the host joins the meeting',
|
||||
description:
|
||||
'Whether or not to allow any attendee to join the meeting before the host joins the meeting',
|
||||
},
|
||||
{
|
||||
displayName: 'Exclude Password',
|
||||
@@ -189,14 +176,15 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'hostEmail',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Email address for the meeting host. Can only be set if you\'re an admin.',
|
||||
description: "Email address for the meeting host. Can only be set if you're an admin.",
|
||||
},
|
||||
{
|
||||
displayName: 'Integration Tags',
|
||||
name: 'integrationTags',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'External keys created by an integration application in its own domain. They could be Zendesk ticket IDs, Jira IDs, Salesforce Opportunity IDs, etc.',
|
||||
description:
|
||||
'External keys created by an integration application in its own domain. They could be Zendesk ticket IDs, Jira IDs, Salesforce Opportunity IDs, etc.',
|
||||
},
|
||||
{
|
||||
displayName: 'Invitees',
|
||||
@@ -262,7 +250,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
},
|
||||
],
|
||||
default: 0,
|
||||
description: 'The number of minutes an attendee can join the meeting before the meeting start time and the host joins',
|
||||
description:
|
||||
'The number of minutes an attendee can join the meeting before the meeting start time and the host joins',
|
||||
},
|
||||
{
|
||||
displayName: 'Public Meeting',
|
||||
@@ -276,7 +265,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'recurrence',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Rule for how the meeting should recur. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'Rule for how the meeting should recur. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Required Registration Info',
|
||||
@@ -345,7 +335,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'reminderTime',
|
||||
type: 'number',
|
||||
default: 1,
|
||||
description: 'The number of minutes before the meeting begins, for sending an email reminder to the host',
|
||||
description:
|
||||
'The number of minutes before the meeting begins, for sending an email reminder to the host',
|
||||
},
|
||||
{
|
||||
displayName: 'Send Email',
|
||||
@@ -363,7 +354,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
loadOptionsMethod: 'getSites',
|
||||
},
|
||||
default: '',
|
||||
description: 'URL of the Webex site which the meeting is created on. If not specified, the meeting is created on user\'s preferred site. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'URL of the Webex site which the meeting is created on. If not specified, the meeting is created on user\'s preferred site. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -379,12 +371,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
description: 'ID of the meeting',
|
||||
@@ -397,12 +385,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -411,7 +395,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'hostEmail',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Email address for the meeting host. This parameter is only used if the user or application calling the API has the admin-level scopes.',
|
||||
description:
|
||||
'Email address for the meeting host. This parameter is only used if the user or application calling the API has the admin-level scopes.',
|
||||
},
|
||||
{
|
||||
displayName: 'Send Email',
|
||||
@@ -434,12 +419,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
description: 'ID of the meeting',
|
||||
@@ -452,12 +433,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -466,21 +443,24 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'hostEmail',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Email address for the meeting host. This parameter is only used if the user or application calling the API has the admin-level scopes.',
|
||||
description:
|
||||
'Email address for the meeting host. This parameter is only used if the user or application calling the API has the admin-level scopes.',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Meeting password. It\'s required when the meeting is protected by a password and the current user is not privileged to view it if they are not a host, co-host or invitee of the meeting.',
|
||||
description:
|
||||
"Meeting password. It's required when the meeting is protected by a password and the current user is not privileged to view it if they are not a host, co-host or invitee of the meeting.",
|
||||
},
|
||||
{
|
||||
displayName: 'Send Email',
|
||||
name: 'sendEmail',
|
||||
type: 'boolean',
|
||||
default: true,
|
||||
description: 'Whether or not to send emails to host and invitees. It is an optional field and default value is true.',
|
||||
description:
|
||||
'Whether or not to send emails to host and invitees. It is an optional field and default value is true.',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -496,12 +476,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -516,15 +492,9 @@ export const meetingFields: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -536,12 +506,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -550,7 +516,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'from',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'Start date and time (inclusive) for the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'Start date and time (inclusive) for the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Host Email',
|
||||
@@ -564,7 +531,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'integrationTag',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'External tag created by another application, e.g. Zendesk ticket ID or Jira ID',
|
||||
description:
|
||||
'External tag created by another application, e.g. Zendesk ticket ID or Jira ID',
|
||||
},
|
||||
{
|
||||
displayName: 'Limit to Current Meetings',
|
||||
@@ -588,7 +556,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
{
|
||||
name: 'Meeting Series',
|
||||
value: 'meetingSeries',
|
||||
description: 'Master of a scheduled series of meetings which consists of one or more scheduled meeting based on a recurrence rule',
|
||||
description:
|
||||
'Master of a scheduled series of meetings which consists of one or more scheduled meeting based on a recurrence rule',
|
||||
},
|
||||
{
|
||||
name: 'Scheduled Meeting',
|
||||
@@ -619,7 +588,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
loadOptionsMethod: 'getSites',
|
||||
},
|
||||
default: '',
|
||||
description: 'URL of the Webex site which the API lists meetings from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'URL of the Webex site which the API lists meetings from. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'State',
|
||||
@@ -667,7 +637,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'to',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'End date and time (inclusive) for the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'End date and time (inclusive) for the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Weblink',
|
||||
@@ -690,12 +661,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
description: 'ID of the meeting',
|
||||
@@ -706,12 +673,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
type: 'collection',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meeting',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['meeting'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
@@ -722,35 +685,39 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'agenda',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The meeting\'s agenda. Cannot be longer that 1300 characters.',
|
||||
description: "The meeting's agenda. Cannot be longer that 1300 characters.",
|
||||
},
|
||||
{
|
||||
displayName: 'Allow Any User To Be Co-Host',
|
||||
name: 'allowAnyUserToBeCoHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow any attendee with a host account on the target site to become a co-host when joining the meeting',
|
||||
description:
|
||||
'Whether or not to allow any attendee with a host account on the target site to become a co-host when joining the meeting',
|
||||
},
|
||||
{
|
||||
displayName: 'Allow Authenticated Devices',
|
||||
name: 'allowAuthenticatedDevices',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow authenticated video devices in the meeting\'s organization to start or join the meeting without a prompt',
|
||||
description:
|
||||
"Whether or not to allow authenticated video devices in the meeting's organization to start or join the meeting without a prompt",
|
||||
},
|
||||
{
|
||||
displayName: 'Allow First User To Be Co-Host',
|
||||
name: 'allowFirstUserToBeCoHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow the first attendee of the meeting with a host account on the target site to become a co-host',
|
||||
description:
|
||||
'Whether or not to allow the first attendee of the meeting with a host account on the target site to become a co-host',
|
||||
},
|
||||
{
|
||||
displayName: 'Enable Connect Audio Before Host',
|
||||
name: 'enableConnectAudioBeforeHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow any attendee to connect audio in the meeting before the host joins the meeting',
|
||||
description:
|
||||
'Whether or not to allow any attendee to connect audio in the meeting before the host joins the meeting',
|
||||
},
|
||||
{
|
||||
displayName: 'Enabled Auto Record Meeting',
|
||||
@@ -764,14 +731,16 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'enabledJoinBeforeHost',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to allow any attendee to join the meeting before the host joins the meeting',
|
||||
description:
|
||||
'Whether or not to allow any attendee to join the meeting before the host joins the meeting',
|
||||
},
|
||||
{
|
||||
displayName: 'End',
|
||||
name: 'end',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'Date and time for the end of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'Date and time for the end of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Exclude Password',
|
||||
@@ -785,7 +754,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'hostEmail',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Email address for the meeting host. This attribute should only be set if the user or application calling the API has the admin-level scopes.',
|
||||
description:
|
||||
'Email address for the meeting host. This attribute should only be set if the user or application calling the API has the admin-level scopes.',
|
||||
},
|
||||
{
|
||||
displayName: 'Invitees',
|
||||
@@ -851,14 +821,16 @@ export const meetingFields: INodeProperties[] = [
|
||||
},
|
||||
],
|
||||
default: 0,
|
||||
description: 'The number of minutes an attendee can join the meeting before the meeting start time and the host joins',
|
||||
description:
|
||||
'The number of minutes an attendee can join the meeting before the meeting start time and the host joins',
|
||||
},
|
||||
{
|
||||
displayName: 'Password',
|
||||
name: 'password',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Meeting password. Must conform to the site\'s password complexity settings. If not specified, a random password conforming to the site\'s password rules will be generated automatically',
|
||||
description:
|
||||
"Meeting password. Must conform to the site's password complexity settings. If not specified, a random password conforming to the site's password rules will be generated automatically",
|
||||
},
|
||||
{
|
||||
displayName: 'Public Meeting',
|
||||
@@ -872,7 +844,8 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'recurrence',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Meeting series recurrence rule (conforming with RFC 2445), applying only to meeting series',
|
||||
description:
|
||||
'Meeting series recurrence rule (conforming with RFC 2445), applying only to meeting series',
|
||||
},
|
||||
{
|
||||
displayName: 'Required Registration Info',
|
||||
@@ -941,14 +914,16 @@ export const meetingFields: INodeProperties[] = [
|
||||
name: 'reminderTime',
|
||||
type: 'number',
|
||||
default: 1,
|
||||
description: 'The number of minutes before the meeting begins, for sending an email reminder to the host',
|
||||
description:
|
||||
'The number of minutes before the meeting begins, for sending an email reminder to the host',
|
||||
},
|
||||
{
|
||||
displayName: 'Send Email',
|
||||
name: 'sendEmail',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Whether or not to send emails to host and invitees. It is an optional field and default value is true.',
|
||||
description:
|
||||
'Whether or not to send emails to host and invitees. It is an optional field and default value is true.',
|
||||
},
|
||||
{
|
||||
// eslint-disable-next-line n8n-nodes-base/node-param-display-name-wrong-for-dynamic-options
|
||||
@@ -959,14 +934,16 @@ export const meetingFields: INodeProperties[] = [
|
||||
loadOptionsMethod: 'getSites',
|
||||
},
|
||||
default: '',
|
||||
description: 'URL of the Webex site which the meeting is created on. If not specified, the meeting is created on user\'s preferred site. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'URL of the Webex site which the meeting is created on. If not specified, the meeting is created on user\'s preferred site. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Start',
|
||||
name: 'start',
|
||||
type: 'dateTime',
|
||||
default: '',
|
||||
description: 'Date and time for the start of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
description:
|
||||
'Date and time for the start of the meeting. Acceptable <a href="https://datatracker.ietf.org/doc/html/rfc2445"> format</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Title',
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
export const meetingTranscriptOperations: INodeProperties[] = [
|
||||
{
|
||||
@@ -10,9 +8,7 @@ export const meetingTranscriptOperations: INodeProperties[] = [
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -43,12 +39,8 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['download'],
|
||||
},
|
||||
},
|
||||
description: 'Unique identifier for the meeting transcript',
|
||||
@@ -61,12 +53,8 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['download'],
|
||||
},
|
||||
},
|
||||
description: 'Unique identifier for the meeting instance which the transcripts belong to',
|
||||
@@ -77,12 +65,8 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
type: 'collection',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'download',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['download'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
@@ -121,12 +105,8 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
description: 'Unique identifier for the meeting instance which the transcripts belong to',
|
||||
@@ -139,12 +119,8 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -159,15 +135,9 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -179,12 +149,8 @@ export const meetingTranscriptFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'meetingTranscript',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['meetingTranscript'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
getActionInheritedProperties, getInputTextProperties, getTextBlockProperties,
|
||||
getActionInheritedProperties,
|
||||
getInputTextProperties,
|
||||
getTextBlockProperties,
|
||||
} from '../GenericFunctions';
|
||||
|
||||
export const messageOperations: INodeProperties[] = [
|
||||
@@ -14,9 +14,7 @@ export const messageOperations: INodeProperties[] = [
|
||||
noDataExpression: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
resource: ['message'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -72,12 +70,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: 'room',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -85,7 +79,8 @@ export const messageFields: INodeProperties[] = [
|
||||
displayName: 'Room Name or ID',
|
||||
name: 'roomId',
|
||||
type: 'options',
|
||||
description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
description:
|
||||
'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getRooms',
|
||||
},
|
||||
@@ -93,15 +88,9 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
destination: [
|
||||
'room',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
destination: ['room'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -123,15 +112,9 @@ export const messageFields: INodeProperties[] = [
|
||||
default: 'email',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
destination: [
|
||||
'person',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
destination: ['person'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -143,15 +126,9 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
specifyPersonBy: [
|
||||
'id',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
specifyPersonBy: ['id'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -163,15 +140,9 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
specifyPersonBy: [
|
||||
'email',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
specifyPersonBy: ['email'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -183,12 +154,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
description: 'The message, in plain text',
|
||||
@@ -199,12 +166,8 @@ export const messageFields: INodeProperties[] = [
|
||||
type: 'collection',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'create',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['create'],
|
||||
},
|
||||
},
|
||||
default: {},
|
||||
@@ -301,9 +264,7 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'openUrl',
|
||||
],
|
||||
type: ['openUrl'],
|
||||
},
|
||||
},
|
||||
description: 'The URL to open',
|
||||
@@ -314,14 +275,12 @@ export const messageFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'submit',
|
||||
'execute',
|
||||
],
|
||||
type: ['submit', 'execute'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
description: 'Any extra data to pass along. These are essentially ‘hidden’ properties.',
|
||||
description:
|
||||
'Any extra data to pass along. These are essentially ‘hidden’ properties.',
|
||||
},
|
||||
{
|
||||
displayName: 'Verb',
|
||||
@@ -329,9 +288,7 @@ export const messageFields: INodeProperties[] = [
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
type: [
|
||||
'execute',
|
||||
],
|
||||
type: ['execute'],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -384,9 +341,7 @@ export const messageFields: INodeProperties[] = [
|
||||
required: true,
|
||||
displayOptions: {
|
||||
show: {
|
||||
fileLocation: [
|
||||
'binaryData',
|
||||
],
|
||||
fileLocation: ['binaryData'],
|
||||
},
|
||||
},
|
||||
description: 'The field in the node input containing the binary file data',
|
||||
@@ -398,9 +353,7 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
fileLocation: [
|
||||
'url',
|
||||
],
|
||||
fileLocation: ['url'],
|
||||
},
|
||||
},
|
||||
description: 'The public URL of the file',
|
||||
@@ -414,7 +367,8 @@ export const messageFields: INodeProperties[] = [
|
||||
name: 'markdown',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'The message in markdown format. When used the text parameter is used to provide alternate text for UI clients that do not support rich text.',
|
||||
description:
|
||||
'The message in markdown format. When used the text parameter is used to provide alternate text for UI clients that do not support rich text.',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -431,12 +385,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'delete',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['delete'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -453,12 +403,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'get',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['get'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -469,7 +415,8 @@ export const messageFields: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Room Name or ID',
|
||||
name: 'roomId',
|
||||
description: 'List messages in a room, by ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'List messages in a room, by ID. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
type: 'options',
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getRooms',
|
||||
@@ -478,12 +425,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -495,12 +438,8 @@ export const messageFields: INodeProperties[] = [
|
||||
description: 'Whether to return all results or only up to a given limit',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -515,15 +454,9 @@ export const messageFields: INodeProperties[] = [
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
returnAll: [
|
||||
false,
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['getAll'],
|
||||
returnAll: [false],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -535,12 +468,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: {},
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'getAll',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['getAll'],
|
||||
},
|
||||
},
|
||||
options: [
|
||||
@@ -570,7 +499,8 @@ export const messageFields: INodeProperties[] = [
|
||||
name: 'mentionedPeople',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'List only messages with certain person mentioned. Enter their ID. You can use \'me\' as a shorthand for yourself',
|
||||
description:
|
||||
"List only messages with certain person mentioned. Enter their ID. You can use 'me' as a shorthand for yourself",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -587,12 +517,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -605,12 +531,8 @@ export const messageFields: INodeProperties[] = [
|
||||
default: false,
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -622,15 +544,9 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
markdown: [
|
||||
false,
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
markdown: [false],
|
||||
},
|
||||
},
|
||||
description: 'The message, in plain text',
|
||||
@@ -644,15 +560,9 @@ export const messageFields: INodeProperties[] = [
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
resource: [
|
||||
'message',
|
||||
],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
markdown: [
|
||||
true,
|
||||
],
|
||||
resource: ['message'],
|
||||
operation: ['update'],
|
||||
markdown: [true],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user