1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-11-13 05:35:28 +03:00

👕 Fix lint issue

This commit is contained in:
Jan Oberhauser 2020-10-22 18:00:28 +02:00
parent 53162ba462
commit 546b79bea0
54 changed files with 257 additions and 257 deletions

View File

@ -79,14 +79,14 @@ export class Automizy implements INodeType {
// Get all the tags to display them to user so that he can
// select them easily
async getLists(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const lists = await automizyApiRequestAllItems.call(
this,
'smartLists',
'GET',
`/smart-lists`
`/smart-lists`,
);
for (const list of lists) {
returnData.push({
@ -97,14 +97,14 @@ export class Automizy implements INodeType {
return returnData;
},
async getTags(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const tags = await automizyApiRequestAllItems.call(
this,
'contactTags',
'GET',
'/contacts/tag-manager'
'/contacts/tag-manager',
);
for (const tag of tags) {
returnData.push({
@ -115,14 +115,14 @@ export class Automizy implements INodeType {
return returnData;
},
async getCustomFields(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const customFields = await automizyApiRequestAllItems.call(
this,
'customFields',
'GET',
'/custom-fields'
'/custom-fields',
);
for (const customField of customFields) {
returnData.push({
@ -178,7 +178,7 @@ export class Automizy implements INodeType {
this,
'POST',
`/smart-lists/${listId}/contacts`,
body
body,
);
}
@ -188,7 +188,7 @@ export class Automizy implements INodeType {
responseData = await automizyApiRequest.call(
this,
'DELETE',
`/contacts/${contactId}`
`/contacts/${contactId}`,
);
responseData = { success: true };
@ -200,7 +200,7 @@ export class Automizy implements INodeType {
responseData = await automizyApiRequest.call(
this,
'GET',
`/contacts/${contactId}`
`/contacts/${contactId}`,
);
}
@ -227,7 +227,7 @@ export class Automizy implements INodeType {
'GET',
`/smart-lists/${listId}/contacts`,
{},
qs
qs,
);
} else {
@ -238,7 +238,7 @@ export class Automizy implements INodeType {
'GET',
`/smart-lists/${listId}/contacts`,
{},
qs
qs,
);
responseData = responseData.contacts;
@ -272,7 +272,7 @@ export class Automizy implements INodeType {
this,
'PATCH',
`/contacts/${email}`,
body
body,
);
}
}
@ -290,7 +290,7 @@ export class Automizy implements INodeType {
this,
'POST',
`/smart-lists`,
body
body,
);
}
@ -300,7 +300,7 @@ export class Automizy implements INodeType {
responseData = await automizyApiRequest.call(
this,
'DELETE',
`/smart-lists/${listId}`
`/smart-lists/${listId}`,
);
responseData = { success: true };
@ -312,7 +312,7 @@ export class Automizy implements INodeType {
responseData = await automizyApiRequest.call(
this,
'GET',
`/smart-lists/${listId}`
`/smart-lists/${listId}`,
);
}
@ -337,7 +337,7 @@ export class Automizy implements INodeType {
'GET',
`/smart-lists`,
{},
qs
qs,
);
} else {
@ -348,7 +348,7 @@ export class Automizy implements INodeType {
'GET',
`/smart-lists`,
{},
qs
qs,
);
responseData = responseData.smartLists;
@ -368,7 +368,7 @@ export class Automizy implements INodeType {
this,
'PATCH',
`/smart-lists/${listId}`,
body
body,
);
}
}

View File

@ -43,7 +43,7 @@ export async function automizyApiRequest(this: IExecuteFunctions | IExecuteSingl
if (error.response && error.response.body) {
throw new Error(
`Automizy error response [${error.statusCode}]: ${error.response.body.title}`
`Automizy error response [${error.statusCode}]: ${error.response.body.title}`,
);
}

View File

@ -173,7 +173,7 @@ export class AwsLambda implements INodeType {
{
'X-Amz-Invocation-Type': params.InvocationType,
'Content-Type': 'application/x-amz-json-1.0',
}
},
);
} catch (err) {
throw new Error(`AWS Error: ${err}`);

View File

@ -261,7 +261,7 @@ export class Clockify implements INodeType {
'POST',
`/workspaces/${workspaceId}/projects`,
body,
qs
qs,
);
}
@ -276,7 +276,7 @@ export class Clockify implements INodeType {
'DELETE',
`/workspaces/${workspaceId}/projects/${projectId}`,
{},
qs
qs,
);
responseData = { success: true };
@ -293,7 +293,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/projects/${projectId}`,
{},
qs
qs,
);
}
@ -313,7 +313,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/projects`,
{},
qs
qs,
);
} else {
@ -325,7 +325,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/projects`,
{},
qs
qs,
);
responseData = responseData.splice(0, qs.limit);
@ -356,7 +356,7 @@ export class Clockify implements INodeType {
'PUT',
`/workspaces/${workspaceId}/projects/${projectId}`,
body,
qs
qs,
);
}
}
@ -378,7 +378,7 @@ export class Clockify implements INodeType {
'POST',
`/workspaces/${workspaceId}/tags`,
body,
qs
qs,
);
}
@ -393,7 +393,7 @@ export class Clockify implements INodeType {
'DELETE',
`/workspaces/${workspaceId}/tags/${tagId}`,
{},
qs
qs,
);
responseData = { success: true };
@ -415,7 +415,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/tags`,
{},
qs
qs,
);
} else {
@ -427,7 +427,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/tags`,
{},
qs
qs,
);
responseData = responseData.splice(0, qs.limit);
@ -451,7 +451,7 @@ export class Clockify implements INodeType {
'PUT',
`/workspaces/${workspaceId}/tags/${tagId}`,
body,
qs
qs,
);
}
}
@ -490,7 +490,7 @@ export class Clockify implements INodeType {
'POST',
`/workspaces/${workspaceId}/time-entries`,
body,
qs
qs,
);
}
@ -505,7 +505,7 @@ export class Clockify implements INodeType {
'DELETE',
`/workspaces/${workspaceId}/time-entries/${timeEntryId}`,
{},
qs
qs,
);
responseData = { success: true };
@ -522,7 +522,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/time-entries/${timeEntryId}`,
{},
qs
qs,
);
}
@ -555,7 +555,7 @@ export class Clockify implements INodeType {
'GET',
`/workspaces/${workspaceId}/time-entries/${timeEntryId}`,
{},
qs
qs,
);
body.start = start;
@ -566,7 +566,7 @@ export class Clockify implements INodeType {
'PUT',
`/workspaces/${workspaceId}/time-entries/${timeEntryId}`,
body,
qs
qs,
);
}
}

View File

@ -74,7 +74,7 @@ export class CoinGecko implements INodeType {
const currencies = await coinGeckoApiRequest.call(
this,
'GET',
'/simple/supported_vs_currencies'
'/simple/supported_vs_currencies',
);
currencies.sort();
for (const currency of currencies) {
@ -91,7 +91,7 @@ export class CoinGecko implements INodeType {
const coins = await coinGeckoApiRequest.call(
this,
'GET',
'/coins/list'
'/coins/list',
);
for (const coin of coins) {
returnData.push({
@ -112,7 +112,7 @@ export class CoinGecko implements INodeType {
const exchanges = await coinGeckoApiRequest.call(
this,
'GET',
'/exchanges/list'
'/exchanges/list',
);
for (const exchange of exchanges) {
returnData.push({
@ -128,7 +128,7 @@ export class CoinGecko implements INodeType {
const countryCodes = await coinGeckoApiRequest.call(
this,
'GET',
'/events/countries'
'/events/countries',
);
for (const code of countryCodes.data) {
if (!code.code) {
@ -147,7 +147,7 @@ export class CoinGecko implements INodeType {
const eventTypes = await coinGeckoApiRequest.call(
this,
'GET',
'/events/types'
'/events/types',
);
for (const type of eventTypes.data) {
returnData.push({
@ -196,7 +196,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${coinId}`,
{},
qs
qs,
);
}
@ -209,7 +209,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${platformId}/contract/${contractAddress}`,
{},
qs
qs,
);
}
}
@ -225,7 +225,7 @@ export class CoinGecko implements INodeType {
'GET',
'/coins/list',
{},
qs
qs,
);
if (returnAll === false) {
@ -256,7 +256,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/markets`,
{},
qs
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
@ -268,7 +268,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/markets`,
{},
qs
qs,
);
}
}
@ -295,7 +295,7 @@ export class CoinGecko implements INodeType {
'GET',
'/simple/price',
{},
qs
qs,
);
}
@ -310,7 +310,7 @@ export class CoinGecko implements INodeType {
'GET',
`/simple/token_price/${platformId}`,
{},
qs
qs,
);
}
}
@ -336,7 +336,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${coinId}/tickers`,
{},
qs
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
@ -346,7 +346,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${coinId}/tickers`,
{},
qs
qs,
);
responseData = responseData.tickers;
@ -370,7 +370,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${coinId}/history`,
{},
qs
qs,
);
}
@ -395,7 +395,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${coinId}/market_chart`,
{},
qs
qs,
);
}
@ -408,7 +408,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${platformId}/contract/${contractAddress}/market_chart`,
{},
qs
qs,
);
}
@ -436,7 +436,7 @@ export class CoinGecko implements INodeType {
'GET',
`/coins/${baseCurrency}/ohlc`,
{},
qs
qs,
);
for (let idx = 0; idx < responseData.length; idx++) {
@ -462,7 +462,7 @@ export class CoinGecko implements INodeType {
'GET',
'/events',
{},
qs
qs,
);
} else {
const limit = this.getNodeParameter('limit', i) as number;
@ -474,7 +474,7 @@ export class CoinGecko implements INodeType {
'GET',
'/events',
{},
qs
qs,
);
responseData = responseData.data;
}
@ -499,7 +499,7 @@ export class CoinGecko implements INodeType {
'GET',
'/simple/price',
{},
qs
qs,
);
}
@ -521,7 +521,7 @@ export class CoinGecko implements INodeType {
'GET',
`/simple/token_price/${id}`,
{},
qs
qs,
);
}
}

View File

@ -13,7 +13,7 @@ export async function disqusApiRequest(
qs: IDataObject = {},
uri?: string,
body: IDataObject = {},
option: IDataObject = {}
option: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('disqusApi') as IDataObject;
@ -74,7 +74,7 @@ export async function disqusApiRequestAllItems(
qs: IDataObject = {},
uri?: string,
body: IDataObject = {},
option: IDataObject = {}
option: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const returnData: IDataObject[] = [];

View File

@ -59,7 +59,7 @@ export async function dropboxApiRequest(this: IHookFunctions | IExecuteFunctions
if (error.error && error.error.error_summary) {
// Try to return the error prettier
throw new Error(
`Dropbox error response [${error.statusCode}]: ${error.error.error_summary}`
`Dropbox error response [${error.statusCode}]: ${error.error.error_summary}`,
);
}

View File

@ -110,7 +110,7 @@ export class ExecuteCommand implements INodeType {
stderr,
stdout,
},
}
},
);
}

View File

@ -483,7 +483,7 @@ export class GithubTrigger implements INodeType {
body: bodyData,
headers: this.getHeaderData(),
query: this.getQueryData(),
}
},
);
return {

View File

@ -287,7 +287,7 @@ export class GitlabTrigger implements INodeType {
body: bodyData,
headers: this.getHeaderData(),
query: this.getQueryData(),
}
},
);
return {

View File

@ -40,7 +40,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
errors = errors.map((e: IDataObject) => e.message);
// Try to return the error prettier
throw new Error(
`Google Calendar error response [${error.statusCode}]: ${errors.join('|')}`
`Google Calendar error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -72,14 +72,14 @@ export class GoogleCalendar implements INodeType {
// Get all the calendars to display them to user so that he can
// select them easily
async getCalendars(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const calendars = await googleApiRequestAllItems.call(
this,
'items',
'GET',
'/calendar/v3/users/me/calendarList'
'/calendar/v3/users/me/calendarList',
);
for (const calendar of calendars) {
const calendarName = calendar.summary;
@ -94,13 +94,13 @@ export class GoogleCalendar implements INodeType {
// Get all the colors to display them to user so that he can
// select them easily
async getColors(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { event } = await googleApiRequest.call(
this,
'GET',
'/calendar/v3/colors'
'/calendar/v3/colors',
);
for (const key of Object.keys(event)) {
const colorName = `Background: ${event[key].background} - Foreground: ${event[key].foreground}`;
@ -115,7 +115,7 @@ export class GoogleCalendar implements INodeType {
// Get all the timezones to display them to user so that he can
// select them easily
async getTimezones(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
for (const timezone of moment.tz.names()) {
@ -148,11 +148,11 @@ export class GoogleCalendar implements INodeType {
const end = this.getNodeParameter('end', i) as string;
const useDefaultReminders = this.getNodeParameter(
'useDefaultReminders',
i
i,
) as boolean;
const additionalFields = this.getNodeParameter(
'additionalFields',
i
i,
) as IDataObject;
if (additionalFields.maxAttendees) {
qs.maxAttendees = additionalFields.maxAttendees as number;
@ -177,7 +177,7 @@ export class GoogleCalendar implements INodeType {
body.attendees = (additionalFields.attendees as string[]).map(
attendee => {
return { email: attendee };
}
},
);
}
if (additionalFields.color) {
@ -213,7 +213,7 @@ export class GoogleCalendar implements INodeType {
if (!useDefaultReminders) {
const reminders = (this.getNodeParameter(
'remindersUi',
i
i,
) as IDataObject).remindersValues as IDataObject[];
body.reminders = {
useDefault: false,
@ -242,24 +242,24 @@ export class GoogleCalendar implements INodeType {
additionalFields.repeatUntil
) {
throw new Error(
`You can set either 'Repeat How Many Times' or 'Repeat Until' but not both`
`You can set either 'Repeat How Many Times' or 'Repeat Until' but not both`,
);
}
if (additionalFields.repeatFrecuency) {
body.recurrence?.push(
`FREQ=${(additionalFields.repeatFrecuency as string).toUpperCase()};`
`FREQ=${(additionalFields.repeatFrecuency as string).toUpperCase()};`,
);
}
if (additionalFields.repeatHowManyTimes) {
body.recurrence?.push(
`COUNT=${additionalFields.repeatHowManyTimes};`
`COUNT=${additionalFields.repeatHowManyTimes};`,
);
}
if (additionalFields.repeatUntil) {
body.recurrence?.push(
`UNTIL=${moment(additionalFields.repeatUntil as string)
.utc()
.format('YYYYMMDDTHHmmss')}Z`
.format('YYYYMMDDTHHmmss')}Z`,
);
}
if (body.recurrence.length !== 0) {
@ -270,7 +270,7 @@ export class GoogleCalendar implements INodeType {
'POST',
`/calendar/v3/calendars/${calendarId}/events`,
body,
qs
qs,
);
}
//https://developers.google.com/calendar/v3/reference/events/delete
@ -285,7 +285,7 @@ export class GoogleCalendar implements INodeType {
this,
'DELETE',
`/calendar/v3/calendars/${calendarId}/events/${eventId}`,
{}
{},
);
responseData = { success: true };
}
@ -305,7 +305,7 @@ export class GoogleCalendar implements INodeType {
'GET',
`/calendar/v3/calendars/${calendarId}/events/${eventId}`,
{},
qs
qs,
);
}
//https://developers.google.com/calendar/v3/reference/events/list
@ -353,7 +353,7 @@ export class GoogleCalendar implements INodeType {
'GET',
`/calendar/v3/calendars/${calendarId}/events`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -362,7 +362,7 @@ export class GoogleCalendar implements INodeType {
'GET',
`/calendar/v3/calendars/${calendarId}/events`,
{},
qs
qs,
);
responseData = responseData.items;
}
@ -373,11 +373,11 @@ export class GoogleCalendar implements INodeType {
const eventId = this.getNodeParameter('eventId', i) as string;
const useDefaultReminders = this.getNodeParameter(
'useDefaultReminders',
i
i,
) as boolean;
const updateFields = this.getNodeParameter(
'updateFields',
i
i,
) as IDataObject;
if (updateFields.maxAttendees) {
qs.maxAttendees = updateFields.maxAttendees as number;
@ -405,7 +405,7 @@ export class GoogleCalendar implements INodeType {
body.attendees = (updateFields.attendees as string[]).map(
attendee => {
return { email: attendee };
}
},
);
}
if (updateFields.color) {
@ -441,7 +441,7 @@ export class GoogleCalendar implements INodeType {
if (!useDefaultReminders) {
const reminders = (this.getNodeParameter(
'remindersUi',
i
i,
) as IDataObject).remindersValues as IDataObject[];
body.reminders = {
useDefault: false,
@ -467,12 +467,12 @@ export class GoogleCalendar implements INodeType {
body.recurrence = [];
if (updateFields.repeatHowManyTimes && updateFields.repeatUntil) {
throw new Error(
`You can set either 'Repeat How Many Times' or 'Repeat Until' but not both`
`You can set either 'Repeat How Many Times' or 'Repeat Until' but not both`,
);
}
if (updateFields.repeatFrecuency) {
body.recurrence?.push(
`FREQ=${(updateFields.repeatFrecuency as string).toUpperCase()};`
`FREQ=${(updateFields.repeatFrecuency as string).toUpperCase()};`,
);
}
if (updateFields.repeatHowManyTimes) {
@ -482,7 +482,7 @@ export class GoogleCalendar implements INodeType {
body.recurrence?.push(
`UNTIL=${moment(updateFields.repeatUntil as string)
.utc()
.format('YYYYMMDDTHHmmss')}Z`
.format('YYYYMMDDTHHmmss')}Z`,
);
}
if (body.recurrence.length !== 0) {
@ -495,7 +495,7 @@ export class GoogleCalendar implements INodeType {
'PATCH',
`/calendar/v3/calendars/${calendarId}/events/${eventId}`,
body,
qs
qs,
);
}
}

View File

@ -50,7 +50,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
// Try to return the error prettier
throw new Error(
`Google Contacts error response [${error.statusCode}]: ${errors}`
`Google Contacts error response [${error.statusCode}]: ${errors}`,
);
}
throw error;

View File

@ -70,14 +70,14 @@ export class GoogleContacts implements INodeType {
// Get all the calendars to display them to user so that he can
// select them easily
async getGroups(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const groups = await googleApiRequestAllItems.call(
this,
'contactGroups',
'GET',
`/contactGroups`
`/contactGroups`,
);
for (const group of groups) {
const groupName = group.name;
@ -219,7 +219,7 @@ export class GoogleContacts implements INodeType {
'POST',
`/people:createContact`,
body,
qs
qs,
);
responseData.contactId = responseData.resourceName.split('/')[1];
@ -232,7 +232,7 @@ export class GoogleContacts implements INodeType {
this,
'DELETE',
`/people/${contactId}:deleteContact`,
{}
{},
);
responseData = { success: true };
}
@ -253,7 +253,7 @@ export class GoogleContacts implements INodeType {
'GET',
`/people/${contactId}`,
{},
qs
qs,
);
if (!rawData) {
@ -286,7 +286,7 @@ export class GoogleContacts implements INodeType {
'GET',
`/people/me/connections`,
{},
qs
qs,
);
} else {
qs.pageSize = this.getNodeParameter('limit', i) as number;
@ -295,7 +295,7 @@ export class GoogleContacts implements INodeType {
'GET',
`/people/me/connections`,
{},
qs
qs,
);
responseData = responseData.connections;
}
@ -331,7 +331,7 @@ export class GoogleContacts implements INodeType {
'GET',
`/people/${contactId}`,
{},
{ personFields: 'Names' }
{ personFields: 'Names' },
);
etag = data.etag;
@ -479,7 +479,7 @@ export class GoogleContacts implements INodeType {
'PATCH',
`/people/${contactId}:updateContact`,
body,
qs
qs,
);
responseData.contactId = responseData.resourceName.split('/')[1];

View File

@ -121,7 +121,7 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
'typ': 'JWT',
'alg': 'RS256',
},
}
},
);
const options: OptionsWithUri = {

View File

@ -66,14 +66,14 @@ export class GSuiteAdmin implements INodeType {
// Get all the domains to display them to user so that he can
// select them easily
async getDomains(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const domains = await googleApiRequestAllItems.call(
this,
'domains',
'GET',
'/directory/v1/customer/my_customer/domains'
'/directory/v1/customer/my_customer/domains',
);
for (const domain of domains) {
const domainName = domain.domainName;
@ -88,14 +88,14 @@ export class GSuiteAdmin implements INodeType {
// Get all the schemas to display them to user so that he can
// select them easily
async getSchemas(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const schemas = await googleApiRequestAllItems.call(
this,
'schemas',
'GET',
'/directory/v1/customer/my_customer/schemas'
'/directory/v1/customer/my_customer/schemas',
);
for (const schema of schemas) {
const schemaName = schema.displayName;
@ -173,7 +173,7 @@ export class GSuiteAdmin implements INodeType {
'POST',
`/directory/v1/users`,
body,
qs
qs,
);
if (makeAdmin) {
@ -182,7 +182,7 @@ export class GSuiteAdmin implements INodeType {
this,
'POST',
`/directory/v1/users/${responseData.id}/makeAdmin`,
{ status: true }
{ status: true },
);
responseData.isAdmin = true;
@ -198,7 +198,7 @@ export class GSuiteAdmin implements INodeType {
this,
'DELETE',
`/directory/v1/users/${userId}`,
{}
{},
);
responseData = { success: true };
@ -230,7 +230,7 @@ export class GSuiteAdmin implements INodeType {
'GET',
`/directory/v1/users/${userId}`,
{},
qs
qs,
);
}
@ -267,7 +267,7 @@ export class GSuiteAdmin implements INodeType {
'GET',
`/directory/v1/users`,
{},
qs
qs,
);
} else {
@ -279,7 +279,7 @@ export class GSuiteAdmin implements INodeType {
'GET',
`/directory/v1/users`,
{},
qs
qs,
);
responseData = responseData.users;
@ -342,7 +342,7 @@ export class GSuiteAdmin implements INodeType {
'PUT',
`/directory/v1/users/${userId}`,
body,
qs
qs,
);
}
}

View File

@ -40,7 +40,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
errors = errors.map((e: IDataObject) => e.message);
// Try to return the error prettier
throw new Error(
`G Suite Admin error response [${error.statusCode}]: ${errors.join('|')}`
`G Suite Admin error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -136,14 +136,14 @@ export class Gmail implements INodeType {
// Get all the labels to display them to user so that he can
// select them easily
async getLabels(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const labels = await googleApiRequestAllItems.call(
this,
'labels',
'GET',
'/gmail/v1/users/me/labels'
'/gmail/v1/users/me/labels',
);
for (const label of labels) {
const labelName = label.name;
@ -216,7 +216,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/labels`,
{},
qs
qs,
);
responseData = responseData.labels;
@ -486,7 +486,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/messages`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -495,7 +495,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/messages`,
{},
qs
qs,
);
responseData = responseData.messages;
}
@ -520,7 +520,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/messages/${responseData[i].id}`,
body,
qs
qs,
);
if (format === 'resolved') {
@ -692,7 +692,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/drafts`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -701,7 +701,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/drafts`,
{},
qs
qs,
);
responseData = responseData.drafts;
}
@ -726,7 +726,7 @@ export class Gmail implements INodeType {
'GET',
`/gmail/v1/users/me/drafts/${responseData[i].id}`,
body,
qs
qs,
);
if (format === 'resolved') {

View File

@ -108,7 +108,7 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
'typ': 'JWT',
'alg': 'RS256',
},
}
},
);
const options: OptionsWithUri = {

View File

@ -19,7 +19,7 @@ export async function googleApiRequest(
body: IDataObject = {},
qs: IDataObject = {},
uri?: string,
headers: IDataObject = {}
headers: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const options: OptionsWithUri = {
headers: {
@ -43,7 +43,7 @@ export async function googleApiRequest(
return await this.helpers.requestOAuth2.call(
this,
'googleTasksOAuth2Api',
options
options,
);
} catch (error) {
if (error.response && error.response.body && error.response.body.error) {
@ -53,7 +53,7 @@ export async function googleApiRequest(
errors = errors.map((e: IDataObject) => e.message);
// Try to return the error prettier
throw new Error(
`Google Tasks error response [${error.statusCode}]: ${errors.join('|')}`
`Google Tasks error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;
@ -66,7 +66,7 @@ export async function googleApiRequestAllItems(
method: string,
endpoint: string,
body: IDataObject = {},
query: IDataObject = {}
query: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const returnData: IDataObject[] = [];
@ -79,7 +79,7 @@ export async function googleApiRequestAllItems(
method,
endpoint,
body,
query
query,
);
query.pageToken = responseData['nextPageToken'];
returnData.push.apply(returnData, responseData[propertyName]);

View File

@ -65,14 +65,14 @@ export class GoogleTasks implements INodeType {
// Get all the tasklists to display them to user so that he can select them easily
async getTasks(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const tasks = await googleApiRequestAllItems.call(
this,
'items',
'GET',
'/tasks/v1/users/@me/lists'
'/tasks/v1/users/@me/lists',
);
for (const task of tasks) {
const taskName = task.title;
@ -105,7 +105,7 @@ export class GoogleTasks implements INodeType {
body.title = this.getNodeParameter('title', i) as string;
const additionalFields = this.getNodeParameter(
'additionalFields',
i
i,
) as IDataObject;
if (additionalFields.parent) {
@ -139,7 +139,7 @@ export class GoogleTasks implements INodeType {
'POST',
`/tasks/v1/lists/${taskId}/tasks`,
body,
qs
qs,
);
}
if (operation === 'delete') {
@ -151,7 +151,7 @@ export class GoogleTasks implements INodeType {
this,
'DELETE',
`/tasks/v1/lists/${taskListId}/tasks/${taskId}`,
{}
{},
);
responseData = { success: true };
}
@ -164,7 +164,7 @@ export class GoogleTasks implements INodeType {
'GET',
`/tasks/v1/lists/${taskListId}/tasks/${taskId}`,
{},
qs
qs,
);
}
if (operation === 'getAll') {
@ -173,7 +173,7 @@ export class GoogleTasks implements INodeType {
const taskListId = this.getNodeParameter('task', i) as string;
const options = this.getNodeParameter(
'additionalFields',
i
i,
) as IDataObject;
if (options.completedMax) {
qs.completedMax = options.completedMax as string;
@ -207,7 +207,7 @@ export class GoogleTasks implements INodeType {
'GET',
`/tasks/v1/lists/${taskListId}/tasks`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -216,7 +216,7 @@ export class GoogleTasks implements INodeType {
'GET',
`/tasks/v1/lists/${taskListId}/tasks`,
{},
qs
qs,
);
responseData = responseData.items;
}
@ -228,7 +228,7 @@ export class GoogleTasks implements INodeType {
const taskId = this.getNodeParameter('taskId', i) as string;
const updateFields = this.getNodeParameter(
'updateFields',
i
i,
) as IDataObject;
if (updateFields.previous) {
@ -264,7 +264,7 @@ export class GoogleTasks implements INodeType {
'PATCH',
`/tasks/v1/lists/${taskListId}/tasks/${taskId}`,
body,
qs
qs,
);
}
}

View File

@ -107,7 +107,7 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
'typ': 'JWT',
'alg': 'RS256',
},
}
},
);
const options: OptionsWithUri = {

View File

@ -152,13 +152,13 @@ export class GoogleTranslate implements INodeType {
methods = {
loadOptions: {
async getLanguages(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const { data: { languages } } = await googleApiRequest.call(
this,
'GET',
'/language/translate/v2/languages'
'/language/translate/v2/languages',
);
for (const language of languages) {
returnData.push({

View File

@ -51,7 +51,7 @@ export async function googleApiRequest(this: IExecuteFunctions | IExecuteSingleF
// Try to return the error prettier
throw new Error(
`YouTube error response [${error.statusCode}]: ${errors.join('|')}`
`YouTube error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -119,14 +119,14 @@ export class YouTube implements INodeType {
// Get all the languages to display them to user so that he can
// select them easily
async getLanguages(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const languages = await googleApiRequestAllItems.call(
this,
'items',
'GET',
'/youtube/v3/i18nLanguages'
'/youtube/v3/i18nLanguages',
);
for (const language of languages) {
const languageName = language.id.toUpperCase();
@ -155,7 +155,7 @@ export class YouTube implements INodeType {
// Get all the video categories to display them to user so that he can
// select them easily
async getVideoCategories(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const countryCode = this.getCurrentNodeParameter('regionCode') as string;
@ -169,7 +169,7 @@ export class YouTube implements INodeType {
'GET',
'/youtube/v3/videoCategories',
{},
qs
qs,
);
for (const category of categories) {
const categoryName = category.snippet.title;
@ -184,7 +184,7 @@ export class YouTube implements INodeType {
// Get all the playlists to display them to user so that he can
// select them easily
async getPlaylists(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
const qs: IDataObject = {};
@ -196,7 +196,7 @@ export class YouTube implements INodeType {
'GET',
'/youtube/v3/playlists',
{},
qs
qs,
);
for (const playlist of playlists) {
const playlistName = playlist.snippet.title;
@ -249,7 +249,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/channels`,
{},
qs
qs,
);
responseData = responseData.items;
@ -292,7 +292,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/channels`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -301,7 +301,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/channels`,
{},
qs
qs,
);
responseData = responseData.items;
}
@ -400,7 +400,7 @@ export class YouTube implements INodeType {
'PUT',
'/youtube/v3/channels',
body,
qs
qs,
);
}
//https://developers.google.com/youtube/v3/docs/channelBanners/insert
@ -452,7 +452,7 @@ export class YouTube implements INodeType {
},
},
},
qs
qs,
);
}
}
@ -485,7 +485,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/playlists`,
{},
qs
qs,
);
responseData = responseData.items;
@ -525,7 +525,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/playlists`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -534,7 +534,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/playlists`,
{},
qs
qs,
);
responseData = responseData.items;
}
@ -580,7 +580,7 @@ export class YouTube implements INodeType {
'POST',
'/youtube/v3/playlists',
body,
qs
qs,
);
}
//https://developers.google.com/youtube/v3/docs/playlists/update
@ -629,7 +629,7 @@ export class YouTube implements INodeType {
'PUT',
'/youtube/v3/playlists',
body,
qs
qs,
);
}
//https://developers.google.com/youtube/v3/docs/playlists/delete
@ -649,7 +649,7 @@ export class YouTube implements INodeType {
this,
'DELETE',
'/youtube/v3/playlists',
body
body,
);
responseData = { success: true };
@ -682,7 +682,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/playlistItems`,
{},
qs
qs,
);
responseData = responseData.items;
@ -717,7 +717,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/playlistItems`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -726,7 +726,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/playlistItems`,
{},
qs
qs,
);
responseData = responseData.items;
}
@ -781,7 +781,7 @@ export class YouTube implements INodeType {
'POST',
'/youtube/v3/playlistItems',
body,
qs
qs,
);
}
//https://developers.google.com/youtube/v3/docs/playlistItems/delete
@ -801,7 +801,7 @@ export class YouTube implements INodeType {
this,
'DELETE',
'/youtube/v3/playlistItems',
body
body,
);
responseData = { success: true };
@ -837,7 +837,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/search`,
{},
qs
qs,
);
} else {
qs.maxResults = this.getNodeParameter('limit', i) as number;
@ -846,7 +846,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/search`,
{},
qs
qs,
);
responseData = responseData.items;
}
@ -883,7 +883,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/videos`,
{},
qs
qs,
);
responseData = responseData.items;
@ -999,7 +999,7 @@ export class YouTube implements INodeType {
'PUT',
`/youtube/v3/videos`,
data,
qs
qs,
);
}
//https://developers.google.com/youtube/v3/docs/playlists/update
@ -1078,7 +1078,7 @@ export class YouTube implements INodeType {
'PUT',
'/youtube/v3/videos',
body,
qs
qs,
);
}
//https://developers.google.com/youtube/v3/docs/videos/delete?hl=en
@ -1098,7 +1098,7 @@ export class YouTube implements INodeType {
this,
'DELETE',
'/youtube/v3/videos',
body
body,
);
responseData = { success: true };
@ -1117,7 +1117,7 @@ export class YouTube implements INodeType {
this,
'POST',
'/youtube/v3/videos/rate',
body
body,
);
responseData = { success: true };
@ -1138,7 +1138,7 @@ export class YouTube implements INodeType {
'GET',
`/youtube/v3/videoCategories`,
{},
qs
qs,
);
responseData = responseData.items;

View File

@ -13,7 +13,7 @@ export async function harvestApiRequest(
qs: IDataObject = {},
uri: string,
body: IDataObject = {},
option: IDataObject = {}
option: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('harvestApi') as IDataObject;
@ -82,7 +82,7 @@ export async function harvestApiRequestAllItems(
uri: string,
resource: string,
body: IDataObject = {},
option: IDataObject = {}
option: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const returnData: IDataObject[] = [];

View File

@ -850,7 +850,7 @@ export class HttpRequest implements INodeType {
json: {
error: response.reason,
},
}
},
);
continue;
}

View File

@ -216,7 +216,7 @@ export class Jira implements INodeType {
const users = await jiraSoftwareCloudApiRequest.call(this, '/api/2/user/search', 'GET', {},
{
username: "'",
}
},
);
for (const user of users) {
const userName = user.displayName;

View File

@ -407,7 +407,7 @@ export class Medium implements INodeType {
const user = await mediumApiRequest.call(
this,
'GET',
`/me`
`/me`,
);
const userId = user.data.id;
@ -415,7 +415,7 @@ export class Medium implements INodeType {
const publications = await mediumApiRequest.call(
this,
'GET',
`/users/${userId}/publications`
`/users/${userId}/publications`,
);
const publicationsList = publications.data;
for (const publication of publicationsList) {
@ -510,7 +510,7 @@ export class Medium implements INodeType {
'POST',
`/publications/${publicationId}/posts`,
bodyRequest,
qs
qs,
);
}
else {
@ -519,7 +519,7 @@ export class Medium implements INodeType {
'GET',
'/me',
{},
qs
qs,
);
const authorId = responseAuthorId.data.id;
@ -528,7 +528,7 @@ export class Medium implements INodeType {
'POST',
`/users/${authorId}/posts`,
bodyRequest,
qs
qs,
);
responseData = responseData.data;
@ -547,7 +547,7 @@ export class Medium implements INodeType {
const user = await mediumApiRequest.call(
this,
'GET',
`/me`
`/me`,
);
const userId = user.data.id;
@ -555,7 +555,7 @@ export class Medium implements INodeType {
responseData = await mediumApiRequest.call(
this,
'GET',
`/users/${userId}/publications`
`/users/${userId}/publications`,
);
responseData = responseData.data;

View File

@ -25,7 +25,7 @@ export async function messageBirdApiRequest(
method: string,
resource: string,
body: IDataObject,
query: IDataObject = {}
query: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const credentials = this.getCredentials('messageBirdApi');
if (credentials === undefined) {

View File

@ -299,7 +299,7 @@ export class MessageBird implements INodeType {
};
const additionalFields = this.getNodeParameter(
'additionalFields',
i
i,
) as IDataObject;
if (additionalFields.groupIds) {
@ -353,7 +353,7 @@ export class MessageBird implements INodeType {
requestMethod,
'/messages',
bodyRequest,
qs
qs,
);
returnData.push(responseData as IDataObject);

View File

@ -11,7 +11,7 @@ import { ITables } from './TableInterface';
*/
export function copyInputItem(
item: INodeExecutionData,
properties: string[]
properties: string[],
): IDataObject {
// Prepare the data to insert and copy it to be returned
const newItem: IDataObject = {};
@ -36,7 +36,7 @@ export function createTableStruct(
getNodeParam: Function,
items: INodeExecutionData[],
additionalProperties: string[] = [],
keyName?: string
keyName?: string,
): ITables {
return items.reduce((tables, item, index) => {
const table = getNodeParam('table', index) as string;
@ -69,7 +69,7 @@ export function createTableStruct(
*/
export function executeQueryQueue(
tables: ITables,
buildQueryQueue: Function
buildQueryQueue: Function,
): Promise<any[]> { // tslint:disable-line:no-any
return Promise.all(
Object.keys(tables).map(table => {
@ -79,11 +79,11 @@ export function executeQueryQueue(
table,
columnString,
items: tables[table][columnString],
})
}),
);
});
return Promise.all(columnsResults);
})
}),
);
}
@ -112,7 +112,7 @@ export function extractUpdateSet(item: IDataObject, columns: string[]): string {
column =>
`${column} = ${
typeof item[column] === 'string' ? `'${item[column]}'` : item[column]
}`
}`,
)
.join(',');
}

View File

@ -268,10 +268,10 @@ export class MicrosoftSql implements INodeType {
return pool
.request()
.query(
`INSERT INTO ${table}(${columnString}) VALUES ${values};`
`INSERT INTO ${table}(${columnString}) VALUES ${values};`,
);
});
}
},
);
returnItems = items;
@ -281,13 +281,13 @@ export class MicrosoftSql implements INodeType {
// ----------------------------------
const updateKeys = items.map(
(item, index) => this.getNodeParameter('updateKey', index) as string
(item, index) => this.getNodeParameter('updateKey', index) as string,
);
const tables = createTableStruct(
this.getNodeParameter,
items,
['updateKey'].concat(updateKeys),
'updateKey'
'updateKey',
);
await executeQueryQueue(
tables,
@ -308,14 +308,14 @@ export class MicrosoftSql implements INodeType {
const setValues = extractUpdateSet(item, columns);
const condition = extractUpdateCondition(
item,
item.updateKey as string
item.updateKey as string,
);
return pool
.request()
.query(`UPDATE ${table} SET ${setValues} WHERE ${condition};`);
});
}
},
);
returnItems = items;
@ -343,9 +343,9 @@ export class MicrosoftSql implements INodeType {
deleteKey => {
const deleteItemsList = chunk(
tables[table][deleteKey].map(item =>
copyInputItem(item as INodeExecutionData, [deleteKey])
copyInputItem(item as INodeExecutionData, [deleteKey]),
),
1000
1000,
);
const queryQueue = deleteItemsList.map(deleteValues => {
return pool
@ -353,21 +353,21 @@ export class MicrosoftSql implements INodeType {
.query(
`DELETE FROM ${table} WHERE ${deleteKey} IN ${extractDeleteValues(
deleteValues,
deleteKey
)};`
deleteKey,
)};`,
);
});
return Promise.all(queryQueue);
}
},
);
return Promise.all(deleteKeyResults);
})
}),
);
const rowsDeleted = flatten(queriesResults).reduce(
(acc: number, resp: mssql.IResult<object>): number =>
(acc += resp.rowsAffected.reduce((sum, val) => (sum += val))),
0
0,
);
returnItems = this.helpers.returnJsonArray({

View File

@ -54,7 +54,7 @@ export async function mindeeApiRequest(this: IExecuteFunctions | IExecuteSingleF
errors = errors.map((e: IDataObject) => e.message);
// Try to return the error prettier
throw new Error(
`Mindee error response [${error.statusCode}]: ${errors.join('|')}`
`Mindee error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -159,7 +159,7 @@ export class Mindee implements INodeType {
},
},
},
}
},
);
if (rawData === false) {
@ -201,7 +201,7 @@ export class Mindee implements INodeType {
},
},
},
}
},
);
if (rawData === false) {

View File

@ -17,7 +17,7 @@ export class MongoDb implements INodeType {
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const { database, connectionString } = validateAndResolveMongoCredentials(
this.getCredentials('mongoDb')
this.getCredentials('mongoDb'),
);
const client: MongoClient = await MongoClient.connect(connectionString, {

View File

@ -15,7 +15,7 @@ import {
* @param {ICredentialDataDecryptedObject} credentials MongoDB credentials to use, unless conn string is overridden
*/
function buildParameterizedConnString(
credentials: IMongoParametricCredentials
credentials: IMongoParametricCredentials,
): string {
if (credentials.port) {
return `mongodb://${credentials.user}:${credentials.password}@${credentials.host}:${credentials.port}`;
@ -31,7 +31,7 @@ function buildParameterizedConnString(
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
*/
function buildMongoConnectionParams(
credentials: IMongoCredentialsType
credentials: IMongoCredentialsType,
): IMongoCredentials {
const sanitizedDbName =
credentials.database && credentials.database.trim().length > 0
@ -48,7 +48,7 @@ function buildMongoConnectionParams(
};
} else {
throw new Error(
'Cannot override credentials: valid MongoDB connection string not provided '
'Cannot override credentials: valid MongoDB connection string not provided ',
);
}
} else {
@ -65,13 +65,13 @@ function buildMongoConnectionParams(
* @param {ICredentialDataDecryptedObject} credentials raw/input MongoDB credentials to use
*/
export function validateAndResolveMongoCredentials(
credentials?: ICredentialDataDecryptedObject
credentials?: ICredentialDataDecryptedObject,
): IMongoCredentials {
if (credentials === undefined) {
throw new Error('No credentials got returned!');
} else {
return buildMongoConnectionParams(
credentials as unknown as IMongoCredentialsType
credentials as unknown as IMongoCredentialsType,
);
}
}
@ -86,7 +86,7 @@ export function validateAndResolveMongoCredentials(
*/
export function getItemCopy(
items: INodeExecutionData[],
properties: string[]
properties: string[],
): IDataObject[] {
// Prepare the data to insert and copy it to be returned
let newItem: IDataObject;

View File

@ -44,7 +44,7 @@ export async function philipsHueApiRequest(this: IExecuteFunctions | ILoadOption
// Try to return the error prettier
throw new Error(
`Philip Hue error response [${error.statusCode}]: ${errorMessage}`
`Philip Hue error response [${error.statusCode}]: ${errorMessage}`,
);
}
throw error;

View File

@ -66,7 +66,7 @@ export class PhilipsHue implements INodeType {
// Get all the lights to display them to user so that he can
// select them easily
async getLights(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
@ -75,7 +75,7 @@ export class PhilipsHue implements INodeType {
const lights = await philipsHueApiRequest.call(
this,
'GET',
`/bridge/${user}/lights`
`/bridge/${user}/lights`,
);
for (const light of Object.keys(lights)) {
const lightName = lights[light].name;
@ -132,7 +132,7 @@ export class PhilipsHue implements INodeType {
this,
'PUT',
`/bridge/${user}/lights/${lightId}/state`,
body
body,
);
responseData = {};

View File

@ -39,7 +39,7 @@ export function pgQuery(
getNodeParam: Function,
pgp: pgPromise.IMain<{}, pg.IClient>,
db: pgPromise.IDatabase<{}, pg.IClient>,
input: INodeExecutionData[]
input: INodeExecutionData[],
): Promise<object[]> {
const queries: string[] = [];
for (let i = 0; i < input.length; i++) {
@ -62,7 +62,7 @@ export async function pgInsert(
getNodeParam: Function,
pgp: pgPromise.IMain<{}, pg.IClient>,
db: pgPromise.IDatabase<{}, pg.IClient>,
items: INodeExecutionData[]
items: INodeExecutionData[],
): Promise<IDataObject[][]> {
const table = getNodeParam('table', 0) as string;
const schema = getNodeParam('schema', 0) as string;
@ -102,7 +102,7 @@ export async function pgUpdate(
getNodeParam: Function,
pgp: pgPromise.IMain<{}, pg.IClient>,
db: pgPromise.IDatabase<{}, pg.IClient>,
items: INodeExecutionData[]
items: INodeExecutionData[],
): Promise<IDataObject[]> {
const table = getNodeParam('table', 0) as string;
const schema = getNodeParam('schema', 0) as string;

View File

@ -43,7 +43,7 @@ export async function pushoverApiRequest(this: IExecuteFunctions | IExecuteSingl
errors = errors.map((e: IDataObject) => e);
// Try to return the error prettier
throw new Error(
`PushOver error response [${error.statusCode}]: ${errors.join('|')}`
`PushOver error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -380,7 +380,7 @@ export class Pushover implements INodeType {
this,
'POST',
`/messages.json`,
body
body,
);
}
}

View File

@ -40,7 +40,7 @@ export async function sendyApiRequest(this: IExecuteFunctions | ILoadOptionsFunc
errors = errors.map((e: IDataObject) => e.message);
// Try to return the error prettier
throw new Error(
`Sendy error response [${error.statusCode}]: ${errors.join('|')}`
`Sendy error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -148,7 +148,7 @@ export class Sendy implements INodeType {
this,
'POST',
'/api/campaigns/create.php',
body
body,
);
const success = [
@ -184,7 +184,7 @@ export class Sendy implements INodeType {
this,
'POST',
'/subscribe',
body
body,
);
if (responseData === '1') {
@ -206,7 +206,7 @@ export class Sendy implements INodeType {
this,
'POST',
'/api/subscribers/active-subscriber-count.php',
body
body,
);
const errors = [
@ -239,7 +239,7 @@ export class Sendy implements INodeType {
this,
'POST',
'/api/subscribers/delete.php',
body
body,
);
if (responseData === '1') {
@ -264,7 +264,7 @@ export class Sendy implements INodeType {
this,
'POST',
'/unsubscribe',
body
body,
);
if (responseData === '1') {
@ -289,7 +289,7 @@ export class Sendy implements INodeType {
this,
'POST',
'/api/subscribers/subscription-status.php',
body
body,
);
const status = [

View File

@ -336,7 +336,7 @@ export class Signl4 implements INodeType {
data,
{},
endpoint,
{}
{},
);
}
// Resolve alert
@ -359,7 +359,7 @@ export class Signl4 implements INodeType {
data,
{},
endpoint,
{}
{},
);
}
}

View File

@ -51,7 +51,7 @@ export async function stravaApiRequest(this: IExecuteFunctions | IExecuteSingleF
if (error.statusCode === 402) {
throw new Error(
`Strava error response [${error.statusCode}]: Payment Required`
`Strava error response [${error.statusCode}]: Payment Required`,
);
}
@ -62,7 +62,7 @@ export async function stravaApiRequest(this: IExecuteFunctions | IExecuteSingleF
errors = errors.map((e: IDataObject) => `${e.code} -> ${e.field}`);
// Try to return the error prettier
throw new Error(
`Strava error response [${error.statusCode}]: ${errors.join('|')}`
`Strava error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -197,7 +197,7 @@ export class StravaTrigger implements INodeType {
}
throw new Error(
`Strava error response [${error.statusCode}]: ${errorMessage}`
`Strava error response [${error.statusCode}]: ${errorMessage}`,
);
}
}

View File

@ -21,7 +21,7 @@ import {
export async function getAuthorization(
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IWebhookFunctions,
credentials?: ICredentialDataDecryptedObject
credentials?: ICredentialDataDecryptedObject,
): Promise<string> {
if (credentials === undefined) {
throw new Error('No credentials got returned!');
@ -56,7 +56,7 @@ export async function taigaApiRequest(
body = {},
query = {},
uri?: string | undefined,
option = {}
option = {},
): Promise<any> { // tslint:disable-line:no-any
const version = this.getNodeParameter('version', 0, 'cloud') as string;

View File

@ -20,7 +20,7 @@ export async function todoistApiRequest(
method: string,
resource: string,
body: any = {}, // tslint:disable-line:no-any
qs: IDataObject = {}
qs: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const authentication = this.getNodeParameter('authentication', 0, 'apiKey');

View File

@ -42,7 +42,7 @@ export async function vonageApiRequest(this: IExecuteFunctions | IExecuteSingleF
errors = errors.map((e: IDataObject) => e.message);
// Try to return the error prettier
throw new Error(
`Vonage error response [${error.statusCode}]: ${errors.join('|')}`
`Vonage error response [${error.statusCode}]: ${errors.join('|')}`,
);
}
throw error;

View File

@ -17,7 +17,7 @@ import {
export async function getAuthorization(
this: IHookFunctions | IExecuteFunctions | IExecuteSingleFunctions | ILoadOptionsFunctions | IWebhookFunctions,
credentials?: ICredentialDataDecryptedObject
credentials?: ICredentialDataDecryptedObject,
): Promise<IDataObject> {
if (credentials === undefined) {
throw new Error('No credentials got returned!');

View File

@ -71,7 +71,7 @@ export async function zoomApiRequestAllItems(
method: string,
endpoint: string,
body: IDataObject = {},
query: IDataObject = {}
query: IDataObject = {},
): Promise<any> { // tslint:disable-line:no-any
const returnData: IDataObject[] = [];
let responseData;
@ -82,7 +82,7 @@ export async function zoomApiRequestAllItems(
method,
endpoint,
body,
query
query,
);
query.page_number++;
returnData.push.apply(returnData, responseData[propertyName]);

View File

@ -152,7 +152,7 @@ export class Zoom implements INodeType {
loadOptions: {
// Get all the timezones to display them to user so that he can select them easily
async getTimezones(
this: ILoadOptionsFunctions
this: ILoadOptionsFunctions,
): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
for (const timezone of moment.tz.names()) {
@ -186,7 +186,7 @@ export class Zoom implements INodeType {
const meetingId = this.getNodeParameter('meetingId', i) as string;
const additionalFields = this.getNodeParameter(
'additionalFields',
i
i,
) as IDataObject;
if (additionalFields.showPreviousOccurrences) {
@ -202,7 +202,7 @@ export class Zoom implements INodeType {
'GET',
`/meetings/${meetingId}`,
{},
qs
qs,
);
}
if (operation === 'getAll') {
@ -211,7 +211,7 @@ export class Zoom implements INodeType {
const filters = this.getNodeParameter(
'filters',
i
i,
) as IDataObject;
if (filters.type) {
qs.type = filters.type as string;
@ -231,7 +231,7 @@ export class Zoom implements INodeType {
const meetingId = this.getNodeParameter('meetingId', i) as string;
const additionalFields = this.getNodeParameter(
'additionalFields',
i
i,
) as IDataObject;
if (additionalFields.scheduleForReminder) {
qs.schedule_for_reminder = additionalFields.scheduleForReminder as boolean;
@ -246,7 +246,7 @@ export class Zoom implements INodeType {
'DELETE',
`/meetings/${meetingId}`,
{},
qs
qs,
);
responseData = { success: true };
}
@ -347,7 +347,7 @@ export class Zoom implements INodeType {
'POST',
`/users/me/meetings`,
body,
qs
qs,
);
}
if (operation === 'update') {
@ -355,7 +355,7 @@ export class Zoom implements INodeType {
const meetingId = this.getNodeParameter('meetingId', i) as string;
const updateFields = this.getNodeParameter(
'updateFields',
i
i,
) as IDataObject;
const body: IDataObject = {};
@ -448,7 +448,7 @@ export class Zoom implements INodeType {
'PATCH',
`/meetings/${meetingId}`,
body,
qs
qs,
);
responseData = { success: true };

View File

@ -346,7 +346,7 @@ export function displayParameterPath(nodeValues: INodeParameters, parameter: INo
if (path !== '') {
resolvedNodeValues = get(
nodeValues,
path
path,
) as INodeParameters;
}
@ -355,7 +355,7 @@ export function displayParameterPath(nodeValues: INodeParameters, parameter: INo
if (path && path.split('.').indexOf('parameters') === 0) {
nodeValuesRoot = get(
nodeValues,
'parameters'
'parameters',
) as INodeParameters;
}
@ -998,7 +998,7 @@ export function addToIssuesIfMissing(foundIssues: INodeIssues, nodeProperties: I
export function getParameterValueByPath(nodeValues: INodeParameters, parameterName: string, path: string) {
return get(
nodeValues,
path ? path + '.' + parameterName : parameterName
path ? path + '.' + parameterName : parameterName,
);
}