diff --git a/packages/nodes-base/nodes/Microsoft/Teams/ChannelDescription.ts b/packages/nodes-base/nodes/Microsoft/Teams/ChannelDescription.ts index 5509c5e871..c771fba354 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/ChannelDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/ChannelDescription.ts @@ -1,6 +1,6 @@ import { INodeProperties, - } from 'n8n-workflow'; +} from 'n8n-workflow'; export const channelOperations = [ { @@ -48,9 +48,9 @@ export const channelOperations = [ export const channelFields = [ -/* -------------------------------------------------------------------------- */ -/* channel:create */ -/* -------------------------------------------------------------------------- */ + /* -------------------------------------------------------------------------- */ + /* channel:create */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', @@ -136,9 +136,10 @@ export const channelFields = [ }, ], }, -/* -------------------------------------------------------------------------- */ -/* channel:delete */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* channel:delete */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', @@ -183,9 +184,10 @@ export const channelFields = [ default: '', description: 'channel ID', }, -/* -------------------------------------------------------------------------- */ -/* channel:get */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* channel:get */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', @@ -230,9 +232,10 @@ export const channelFields = [ default: '', description: 'channel ID', }, -/* -------------------------------------------------------------------------- */ -/* channel:getAll */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* channel:getAll */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', @@ -295,9 +298,10 @@ export const channelFields = [ default: 100, description: 'How many results to return.', }, -/* -------------------------------------------------------------------------- */ -/* channel:update */ -/* -------------------------------------------------------------------------- */ + + /* -------------------------------------------------------------------------- */ + /* channel:update */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', diff --git a/packages/nodes-base/nodes/Microsoft/Teams/ChannelMessageDescription.ts b/packages/nodes-base/nodes/Microsoft/Teams/ChannelMessageDescription.ts index dead663eea..61879542ad 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/ChannelMessageDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/ChannelMessageDescription.ts @@ -1,6 +1,6 @@ import { INodeProperties, - } from 'n8n-workflow'; +} from 'n8n-workflow'; export const channelMessageOperations = [ { @@ -33,9 +33,9 @@ export const channelMessageOperations = [ export const channelMessageFields = [ -/* -------------------------------------------------------------------------- */ -/* channelMessage:create */ -/* -------------------------------------------------------------------------- */ + /* -------------------------------------------------------------------------- */ + /* channelMessage:create */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', @@ -129,9 +129,9 @@ export const channelMessageFields = [ default: '', description: 'The content of the item.', }, -/* -------------------------------------------------------------------------- */ -/* channelMessage:getAll */ -/* -------------------------------------------------------------------------- */ + /* -------------------------------------------------------------------------- */ + /* channelMessage:getAll */ + /* -------------------------------------------------------------------------- */ { displayName: 'Team ID', name: 'teamId', diff --git a/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts b/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts index 01ff3b964b..f807dba6e6 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/GenericFunctions.ts @@ -1,6 +1,6 @@ import { OptionsWithUri, - } from 'request'; +} from 'request'; import { IExecuteFunctions, @@ -38,7 +38,7 @@ export async function microsoftApiRequest(this: IExecuteFunctions | IExecuteSing } } -export async function microsoftApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string ,method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any +export async function microsoftApiRequestAllItems(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any const returnData: IDataObject[] = []; @@ -59,7 +59,7 @@ export async function microsoftApiRequestAllItems(this: IExecuteFunctions | ILoa return returnData; } -export async function microsoftApiRequestAllItemsSkip(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string ,method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any +export async function microsoftApiRequestAllItemsSkip(this: IExecuteFunctions | ILoadOptionsFunctions, propertyName: string, method: string, endpoint: string, body: any = {}, query: IDataObject = {}): Promise { // tslint:disable-line:no-any const returnData: IDataObject[] = []; diff --git a/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts b/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts index b14142e48c..a8677b96ec 100644 --- a/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts +++ b/packages/nodes-base/nodes/Microsoft/Teams/MicrosoftTeams.node.ts @@ -152,11 +152,11 @@ export class MicrosoftTeams implements INodeType { //https://docs.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-beta&tabs=http if (operation === 'getAll') { const teamId = this.getNodeParameter('teamId', i) as string; - const returnAll = this.getNodeParameter('returnAll', 0) as boolean; + const returnAll = this.getNodeParameter('returnAll', i) as boolean; if (returnAll) { responseData = await microsoftApiRequestAllItems.call(this, 'value', 'GET', `/v1.0/teams/${teamId}/channels`); } else { - qs.limit = this.getNodeParameter('limit', 0) as number; + qs.limit = this.getNodeParameter('limit', i) as number; responseData = await microsoftApiRequestAllItems.call(this, 'value', 'GET', `/v1.0/teams/${teamId}/channels`, {}); responseData = responseData.splice(0, qs.limit); } @@ -196,11 +196,11 @@ export class MicrosoftTeams implements INodeType { if (operation === 'getAll') { const teamId = this.getNodeParameter('teamId', i) as string; const channelId = this.getNodeParameter('channelId', i) as string; - const returnAll = this.getNodeParameter('returnAll', 0) as boolean; + const returnAll = this.getNodeParameter('returnAll', i) as boolean; if (returnAll) { responseData = await microsoftApiRequestAllItems.call(this, 'value', 'GET', `/beta/teams/${teamId}/channels/${channelId}/messages`); } else { - qs.limit = this.getNodeParameter('limit', 0) as number; + qs.limit = this.getNodeParameter('limit', i) as number; responseData = await microsoftApiRequestAllItems.call(this, 'value', 'GET', `/beta/teams/${teamId}/channels/${channelId}/messages`, {}); responseData = responseData.splice(0, qs.limit); } diff --git a/packages/nodes-base/nodes/Microsoft/Teams/teams.png b/packages/nodes-base/nodes/Microsoft/Teams/teams.png index 89dcee67ff..6ccb7ac5dd 100644 Binary files a/packages/nodes-base/nodes/Microsoft/Teams/teams.png and b/packages/nodes-base/nodes/Microsoft/Teams/teams.png differ