mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 20:29:08 +00:00
refactor: Impose import/order linting rule across nodes packages (no-changelog) (#12314)
This commit is contained in:
committed by
GitHub
parent
8c635993bd
commit
bafac73eb5
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import {
|
||||
type IExecuteFunctions,
|
||||
type IDataObject,
|
||||
@@ -11,13 +12,12 @@ import {
|
||||
NodeConnectionType,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { reportFields, reportOperations } from './ReportDescription';
|
||||
import { userActivityFields, userActivityOperations } from './UserActivityDescription';
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems, merge, simplify } from './GenericFunctions';
|
||||
import type { IData } from './Interfaces';
|
||||
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
import { reportFields, reportOperations } from './ReportDescription';
|
||||
import { userActivityFields, userActivityOperations } from './UserActivityDescription';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google Analytics',
|
||||
|
||||
@@ -5,9 +5,10 @@ import type {
|
||||
INodeTypeBaseDescription,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
import { listSearch, loadOptions } from './methods';
|
||||
|
||||
import { router } from './actions/router';
|
||||
import { versionDescription } from './actions/versionDescription';
|
||||
import { listSearch, loadOptions } from './methods';
|
||||
|
||||
export class GoogleAnalyticsV2 implements INodeType {
|
||||
description: INodeTypeDescription;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import * as getga4 from './get.ga4.operation';
|
||||
import * as getuniversal from './get.universal.operation';
|
||||
|
||||
|
||||
@@ -4,6 +4,13 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
dimensionDropdown,
|
||||
dimensionFilterField,
|
||||
metricDropdown,
|
||||
metricsFilterField,
|
||||
} from './FiltersDescription';
|
||||
import {
|
||||
checkDuplicates,
|
||||
defaultEndDate,
|
||||
@@ -13,12 +20,6 @@ import {
|
||||
simplifyGA4,
|
||||
} from '../../helpers/utils';
|
||||
import { googleApiRequest, googleApiRequestAllItems } from '../../transport';
|
||||
import {
|
||||
dimensionDropdown,
|
||||
dimensionFilterField,
|
||||
metricDropdown,
|
||||
metricsFilterField,
|
||||
} from './FiltersDescription';
|
||||
|
||||
export const description: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import type { IData, IDimension, IMetric } from '../../helpers/Interfaces';
|
||||
import {
|
||||
checkDuplicates,
|
||||
|
||||
@@ -2,8 +2,8 @@ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type { GoogleAnalytics, ReportBasedOnProperty } from './node.type';
|
||||
import * as userActivity from './userActivity/UserActivity.resource';
|
||||
import * as report from './report/Report.resource';
|
||||
import * as userActivity from './userActivity/UserActivity.resource';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import * as search from './search.operation';
|
||||
|
||||
export { search };
|
||||
|
||||
@@ -4,6 +4,7 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems } from '../../transport';
|
||||
|
||||
export const description: INodeProperties[] = [
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow';
|
||||
import * as userActivity from './userActivity/UserActivity.resource';
|
||||
|
||||
import * as report from './report/Report.resource';
|
||||
import * as userActivity from './userActivity/UserActivity.resource';
|
||||
|
||||
export const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google Analytics',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
@@ -6,7 +7,6 @@ import type {
|
||||
INodePropertyOptions,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
export function simplify(responseData: any | [any]) {
|
||||
|
||||
@@ -3,6 +3,7 @@ import type {
|
||||
INodeListSearchItems,
|
||||
INodeListSearchResult,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { sortLoadOptions } from '../helpers/utils';
|
||||
import { googleApiRequest } from '../transport';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
||||
|
||||
import { sortLoadOptions } from '../helpers/utils';
|
||||
import { googleApiRequest } from '../transport';
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
|
||||
|
||||
import nock from 'nock';
|
||||
import * as transport from '../../../v2/transport';
|
||||
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
import { setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import type { WorkflowTestData } from '@test/nodes/types';
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
import * as transport from '../../../v2/transport';
|
||||
|
||||
jest.mock('../../../v2/transport', () => {
|
||||
const originalModule = jest.requireActual('../../../v2/transport');
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
|
||||
|
||||
import nock from 'nock';
|
||||
import * as transport from '../../../v2/transport';
|
||||
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
import { setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import type { WorkflowTestData } from '@test/nodes/types';
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
import * as transport from '../../../v2/transport';
|
||||
|
||||
jest.mock('../../../v2/transport', () => {
|
||||
const originalModule = jest.requireActual('../../../v2/transport');
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import type { IHttpRequestMethods, INodeTypes } from 'n8n-workflow';
|
||||
|
||||
import nock from 'nock';
|
||||
import * as transport from '../../../v2/transport';
|
||||
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
import { setup, workflowToTests } from '@test/nodes/Helpers';
|
||||
import type { WorkflowTestData } from '@test/nodes/types';
|
||||
import { executeWorkflow } from '@test/nodes/ExecuteWorkflow';
|
||||
|
||||
import * as transport from '../../../v2/transport';
|
||||
|
||||
jest.mock('../../../v2/transport', () => {
|
||||
const originalModule = jest.requireActual('../../../v2/transport');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow';
|
||||
import { constructExecutionMetaData } from 'n8n-core';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { constructExecutionMetaData } from 'n8n-core';
|
||||
import type { IDataObject, IExecuteFunctions, INode } from 'n8n-workflow';
|
||||
|
||||
import { prepareOutput } from '../../../v2/helpers/utils';
|
||||
|
||||
describe('Google BigQuery v2 Utils', () => {
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
IRequestOptions,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { getGoogleAccessToken } from '../../GenericFunctions';
|
||||
|
||||
export async function googleApiRequest(
|
||||
|
||||
@@ -10,15 +10,14 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { generatePairedItemData } from '../../../../utils/utilities';
|
||||
import { googleApiRequest, googleApiRequestAllItems, simplify } from './GenericFunctions';
|
||||
|
||||
import { recordFields, recordOperations } from './RecordDescription';
|
||||
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems, simplify } from './GenericFunctions';
|
||||
import { recordFields, recordOperations } from './RecordDescription';
|
||||
import { generatePairedItemData } from '../../../../utils/utilities';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Google BigQuery',
|
||||
name: 'googleBigQuery',
|
||||
|
||||
@@ -6,9 +6,9 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { loadOptions, listSearch } from './methods';
|
||||
import { versionDescription } from './actions/versionDescription';
|
||||
import { router } from './actions/router';
|
||||
import { versionDescription } from './actions/versionDescription';
|
||||
import { loadOptions, listSearch } from './methods';
|
||||
|
||||
export class GoogleBigQueryV2 implements INodeType {
|
||||
description: INodeTypeDescription;
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { datasetRLC, projectRLC, tableRLC } from '../commonDescriptions/RLC.description';
|
||||
import * as insert from './insert.operation';
|
||||
|
||||
import * as executeQuery from './executeQuery.operation';
|
||||
import * as insert from './insert.operation';
|
||||
import { datasetRLC, projectRLC, tableRLC } from '../commonDescriptions/RLC.description';
|
||||
|
||||
export { executeQuery, insert };
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { ApplicationError, NodeOperationError, sleep } from 'n8n-workflow';
|
||||
import type { ResponseWithJobReference } from '../../helpers/interfaces';
|
||||
|
||||
import { getResolvables, updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import type { ResponseWithJobReference } from '../../helpers/interfaces';
|
||||
import { prepareOutput } from '../../helpers/utils';
|
||||
import { googleBigQueryApiRequestAllItems, googleBigQueryApiRequest } from '../../transport';
|
||||
import { getResolvables, updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -6,10 +6,12 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import type { TableSchema } from '../../helpers/interfaces';
|
||||
import { checkSchema, wrapData } from '../../helpers/utils';
|
||||
import { googleBigQueryApiRequest } from '../../transport';
|
||||
import { generatePairedItemData, updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
import type { GoogleBigQuery } from './node.type';
|
||||
|
||||
import * as record from './database/Database.resource';
|
||||
import type { GoogleBigQuery } from './node.type';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const resource = this.getNodeParameter<GoogleBigQuery>('resource', 0);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
||||
import { NodeConnectionType, type INodeTypeDescription } from 'n8n-workflow';
|
||||
|
||||
import * as database from './database/Database.resource';
|
||||
|
||||
export const versionDescription: INodeTypeDescription = {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import type { IDataObject, IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { jsonParse, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type { SchemaField, TableRawData, TableSchema } from './interfaces';
|
||||
|
||||
function getFieldValue(schemaField: SchemaField, field: IDataObject, parseTimestamps = false) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
|
||||
|
||||
import { googleBigQueryApiRequest } from '../transport';
|
||||
|
||||
export async function searchProjects(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
||||
|
||||
import { googleBigQueryApiRequest } from '../transport';
|
||||
|
||||
export async function getDatasets(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { getGoogleAccessToken } from '../../../GenericFunctions';
|
||||
|
||||
export async function googleBigQueryApiRequest(
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
IRequestOptions,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { getGoogleAccessToken } from '../GenericFunctions';
|
||||
|
||||
export async function googleApiRequest(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { TIMEZONE_VALIDATION_REGEX } from './GenericFunctions';
|
||||
|
||||
export const calendarOperations: INodeProperties[] = [
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteFunctions,
|
||||
@@ -10,8 +11,6 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { RRule } from 'rrule';
|
||||
|
||||
export async function googleApiRequest(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
@@ -9,9 +10,11 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
import { calendarFields, calendarOperations } from './CalendarDescription';
|
||||
import { eventFields, eventOperations } from './EventDescription';
|
||||
import type { IEvent } from './EventInterface';
|
||||
import {
|
||||
addNextOccurrence,
|
||||
addTimezoneToDate,
|
||||
@@ -22,12 +25,6 @@ import {
|
||||
googleApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { eventFields, eventOperations } from './EventDescription';
|
||||
|
||||
import { calendarFields, calendarOperations } from './CalendarDescription';
|
||||
|
||||
import type { IEvent } from './EventInterface';
|
||||
|
||||
export class GoogleCalendar implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Google Calendar',
|
||||
@@ -536,7 +533,7 @@ export class GoogleCalendar implements INodeType {
|
||||
body.attendees?.push(attendee);
|
||||
});
|
||||
}
|
||||
(attendees as string[]).forEach((attendee) => {
|
||||
attendees.forEach((attendee) => {
|
||||
body.attendees!.push.apply(
|
||||
body.attendees,
|
||||
attendee
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IDataObject,
|
||||
INodeExecutionData,
|
||||
@@ -7,8 +8,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
import {
|
||||
encodeURIComponentOnce,
|
||||
getCalendars,
|
||||
|
||||
@@ -2,9 +2,8 @@ import type { MockProxy } from 'jest-mock-extended';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import type { INode, IExecuteFunctions } from 'n8n-workflow';
|
||||
|
||||
import { GoogleCalendar } from '../../GoogleCalendar.node';
|
||||
|
||||
import * as genericFunctions from '../../GenericFunctions';
|
||||
import { GoogleCalendar } from '../../GoogleCalendar.node';
|
||||
|
||||
jest.mock('../../GenericFunctions', () => ({
|
||||
getTimezones: jest.fn(),
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import jwt from 'jsonwebtoken';
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ICredentialsDecrypted,
|
||||
@@ -13,10 +15,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import jwt from 'jsonwebtoken';
|
||||
import type { IMessage, IMessageUi } from './MessageInterface';
|
||||
|
||||
import {
|
||||
// attachmentFields,
|
||||
// attachmentOperations,
|
||||
@@ -31,8 +29,8 @@ import {
|
||||
spaceFields,
|
||||
spaceOperations,
|
||||
} from './descriptions';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems, validateJSON } from './GenericFunctions';
|
||||
import type { IMessage, IMessageUi } from './MessageInterface';
|
||||
|
||||
export class GoogleChat implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -6,9 +6,8 @@ import {
|
||||
type INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import type { IData } from './Interface';
|
||||
|
||||
import { googleApiRequest } from './GenericFunctions';
|
||||
import type { IData } from './Interface';
|
||||
|
||||
export class GoogleCloudNaturalLanguage implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { Readable } from 'stream';
|
||||
import FormData from 'form-data';
|
||||
import {
|
||||
BINARY_ENCODING,
|
||||
@@ -6,6 +5,7 @@ import {
|
||||
type INodeExecutionData,
|
||||
type INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
import type { Readable } from 'stream';
|
||||
|
||||
// Define these because we'll be using them in two separate places
|
||||
const metagenerationFilters: INodeProperties[] = [
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
IDataObject,
|
||||
@@ -9,7 +10,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { contactFields, contactOperations } from './ContactDescription';
|
||||
import {
|
||||
allFields,
|
||||
cleanData,
|
||||
@@ -17,8 +18,6 @@ import {
|
||||
googleApiRequestAllItems,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { contactFields, contactOperations } from './ContactDescription';
|
||||
|
||||
export class GoogleContacts implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Google Contacts',
|
||||
|
||||
@@ -10,6 +10,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeConnectionType } from 'n8n-workflow';
|
||||
|
||||
import { documentFields, documentOperations } from './DocumentDescription';
|
||||
import {
|
||||
extractID,
|
||||
googleApiRequest,
|
||||
@@ -17,9 +18,6 @@ import {
|
||||
hasKeys,
|
||||
upperFirst,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { documentFields, documentOperations } from './DocumentDescription';
|
||||
|
||||
import type { IUpdateBody, IUpdateFields } from './interfaces';
|
||||
|
||||
export class GoogleDocs implements INodeType {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IPollFunctions,
|
||||
IDataObject,
|
||||
@@ -9,10 +10,9 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants';
|
||||
import { extractId, googleApiRequest, googleApiRequestAllItems } from './v1/GenericFunctions';
|
||||
import { fileSearch, folderSearch } from './v2/methods/listSearch';
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../constants';
|
||||
|
||||
export class GoogleDriveTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as create from '../../../../v2/actions/drive/create.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as deleteDrive from '../../../../v2/actions/drive/deleteDrive.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as get from '../../../../v2/actions/drive/get.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import * as list from '../../../../v2/actions/drive/list.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as update from '../../../../v2/actions/drive/update.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as copy from '../../../../v2/actions/file/copy.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as createFromText from '../../../../v2/actions/file/createFromText.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as deleteFile from '../../../../v2/actions/file/deleteFile.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as download from '../../../../v2/actions/file/download.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import * as move from '../../../../v2/actions/file/move.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as share from '../../../../v2/actions/file/share.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as update from '../../../../v2/actions/file/update.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import * as upload from '../../../../v2/actions/file/upload.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
import * as utils from '../../../../v2/helpers/utils';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
import { createMockExecuteFunction, createTestStream, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
import nock from 'nock';
|
||||
import type { IHttpRequestMethods } from 'n8n-workflow';
|
||||
import nock from 'nock';
|
||||
|
||||
import * as search from '../../../../v2/actions/fileFolder/search.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as create from '../../../../v2/actions/folder/create.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as deleteFolder from '../../../../v2/actions/folder/deleteFolder.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import nock from 'nock';
|
||||
|
||||
import * as share from '../../../../v2/actions/folder/share.operation';
|
||||
|
||||
import * as transport from '../../../../v2/transport';
|
||||
|
||||
import { createMockExecuteFunction, driveNode } from '../helpers';
|
||||
|
||||
jest.mock('../../../../v2/transport', () => {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';
|
||||
|
||||
import { get } from 'lodash';
|
||||
import { constructExecutionMetaData, returnJsonArray } from 'n8n-core';
|
||||
import type { IDataObject, IExecuteFunctions, IGetNodeParameterOptions, INode } from 'n8n-workflow';
|
||||
import { Readable } from 'stream';
|
||||
|
||||
export const driveNode: INode = {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { Readable } from 'stream';
|
||||
import type {
|
||||
IBinaryKeyData,
|
||||
IDataObject,
|
||||
@@ -9,15 +8,15 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
import { BINARY_ENCODING, NodeConnectionType } from 'n8n-workflow';
|
||||
|
||||
import type { Readable } from 'stream';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../constants';
|
||||
import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
import { driveSearch, fileSearch, folderSearch } from './SearchFunctions';
|
||||
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';
|
||||
import { driveSearch, fileSearch, folderSearch } from './SearchFunctions';
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../constants';
|
||||
|
||||
const UPLOAD_CHUNK_SIZE = 256 * 1024;
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest } from './GenericFunctions';
|
||||
|
||||
interface GoogleDriveFilesItem {
|
||||
|
||||
@@ -5,9 +5,9 @@ import type {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { router } from './actions/router';
|
||||
import { versionDescription } from './actions/versionDescription';
|
||||
import { listSearch } from './methods';
|
||||
import { router } from './actions/router';
|
||||
|
||||
export class GoogleDriveV2 implements INodeType {
|
||||
description: INodeTypeDescription;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { INodeProperties } from 'n8n-workflow';
|
||||
import { DRIVE, RLC_DRIVE_DEFAULT } from '../helpers/interfaces';
|
||||
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_DRIVE_FOLDER_URL_REGEX } from '../../../constants';
|
||||
import { DRIVE, RLC_DRIVE_DEFAULT } from '../helpers/interfaces';
|
||||
|
||||
export const fileRLC: INodeProperties = {
|
||||
displayName: 'File',
|
||||
|
||||
@@ -4,11 +4,12 @@ import type {
|
||||
INodeExecutionData,
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Name',
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { sharedDriveRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,9 +5,10 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { sharedDriveRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,9 +5,10 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems } from '../../transport';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems } from '../../transport';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: 'Return All',
|
||||
|
||||
@@ -5,9 +5,10 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { sharedDriveRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -6,10 +6,11 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { setParentFolder } from '../../helpers/utils';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, fileRLC, folderRLC } from '../common.descriptions';
|
||||
import { setParentFolder } from '../../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,11 +5,12 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { DRIVE } from '../../helpers/interfaces';
|
||||
import { setFileProperties, setParentFolder, setUpdateCommonParams } from '../../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { fileRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -6,9 +6,10 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { fileRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,11 +5,12 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { driveRLC, fileRLC, folderRLC } from '../common.descriptions';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { setParentFolder } from '../../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { setParentFolder } from '../../helpers/utils';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, fileRLC, folderRLC } from '../common.descriptions';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
...fileRLC,
|
||||
|
||||
@@ -5,9 +5,10 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { fileRLC, permissionsOptions, shareOptions } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -6,6 +6,8 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import {
|
||||
getItemBinaryData,
|
||||
prepareQueryString,
|
||||
@@ -14,7 +16,6 @@ import {
|
||||
} from '../../helpers/utils';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { fileRLC, updateCommonOptions } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import {
|
||||
getItemBinaryData,
|
||||
setFileProperties,
|
||||
@@ -14,7 +14,8 @@ import {
|
||||
setParentFolder,
|
||||
processInChunks,
|
||||
} from '../../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, folderRLC, updateCommonOptions } from '../common.descriptions';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,12 +5,13 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { driveRLC, fileTypesOptions, folderRLC } from '../common.descriptions';
|
||||
import { googleApiRequest, googleApiRequestAllItems } from '../../transport';
|
||||
import { prepareQueryString, updateDriveScopes } from '../../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import type { SearchFilter } from '../../helpers/interfaces';
|
||||
import { DRIVE, RLC_FOLDER_DEFAULT } from '../../helpers/interfaces';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
import { prepareQueryString, updateDriveScopes } from '../../helpers/utils';
|
||||
import { googleApiRequest, googleApiRequestAllItems } from '../../transport';
|
||||
import { driveRLC, fileTypesOptions, folderRLC } from '../common.descriptions';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,11 +5,12 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, folderRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { DRIVE } from '../../helpers/interfaces';
|
||||
import { setParentFolder } from '../../helpers/utils';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { driveRLC, folderRLC } from '../common.descriptions';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { folderNoRootRLC } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -5,9 +5,10 @@ import type {
|
||||
INodeProperties,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
import { googleApiRequest } from '../../transport';
|
||||
import { folderNoRootRLC, permissionsOptions, shareOptions } from '../common.descriptions';
|
||||
import { updateDisplayOptions } from '@utils/utilities';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
{
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import type { GoogleDriveType } from './node.type';
|
||||
|
||||
import * as drive from './drive/Drive.resource';
|
||||
import * as file from './file/File.resource';
|
||||
import * as fileFolder from './fileFolder/FileFolder.resource';
|
||||
import * as folder from './folder/Folder.resource';
|
||||
import type { GoogleDriveType } from './node.type';
|
||||
|
||||
export async function router(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Readable } from 'stream';
|
||||
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
|
||||
import { BINARY_ENCODING, NodeOperationError } from 'n8n-workflow';
|
||||
import type { Readable } from 'stream';
|
||||
|
||||
import { RLC_DRIVE_DEFAULT, RLC_FOLDER_DEFAULT, UPLOAD_CHUNK_SIZE } from './interfaces';
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@ import type {
|
||||
INodeListSearchItems,
|
||||
INodeListSearchResult,
|
||||
} from 'n8n-workflow';
|
||||
import { googleApiRequest } from '../transport';
|
||||
|
||||
import type { SearchFilter } from '../helpers/interfaces';
|
||||
import { DRIVE, RLC_DRIVE_DEFAULT, RLC_FOLDER_DEFAULT } from '../helpers/interfaces';
|
||||
import { updateDriveScopes } from '../helpers/utils';
|
||||
import { googleApiRequest } from '../transport';
|
||||
|
||||
interface FilesItem {
|
||||
id: string;
|
||||
|
||||
@@ -8,6 +8,7 @@ import type {
|
||||
IHttpRequestMethods,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { getGoogleAccessToken } from '../../../GenericFunctions';
|
||||
|
||||
export async function googleApiRequest(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import moment from 'moment-timezone';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
@@ -8,7 +9,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import { getGoogleAccessToken } from '../../GenericFunctions';
|
||||
|
||||
export async function googleApiRequest(
|
||||
|
||||
@@ -9,17 +9,15 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, jsonParse } from 'n8n-workflow';
|
||||
|
||||
import { generatePairedItemData } from '../../../../utils/utilities';
|
||||
import { collectionFields, collectionOperations } from './CollectionDescription';
|
||||
import { documentFields, documentOperations } from './DocumentDescription';
|
||||
import {
|
||||
fullDocumentToJson,
|
||||
googleApiRequest,
|
||||
googleApiRequestAllItems,
|
||||
jsonToDocument,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import { collectionFields, collectionOperations } from './CollectionDescription';
|
||||
|
||||
import { documentFields, documentOperations } from './DocumentDescription';
|
||||
import { generatePairedItemData } from '../../../../utils/utilities';
|
||||
|
||||
export class GoogleFirebaseCloudFirestore implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -10,10 +10,8 @@ import type {
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { googleApiRequest, googleApiRequestAllItems } from './GenericFunctions';
|
||||
|
||||
import { userFields, userOperations } from './UserDescription';
|
||||
|
||||
import { groupFields, groupOperations } from './GroupDescripion';
|
||||
import { userFields, userOperations } from './UserDescription';
|
||||
|
||||
export class GSuiteAdmin implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import * as jwt from 'jsonwebtoken';
|
||||
import { DateTime } from 'luxon';
|
||||
import moment from 'moment-timezone';
|
||||
import {
|
||||
type IExecuteFunctions,
|
||||
type ILoadOptionsFunctions,
|
||||
@@ -8,11 +11,7 @@ import {
|
||||
NodeOperationError,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import moment from 'moment-timezone';
|
||||
import * as jwt from 'jsonwebtoken';
|
||||
|
||||
import { formatPrivateKey } from '@utils/utilities';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
const googleServiceAccountScopes = {
|
||||
bigquery: ['https://www.googleapis.com/auth/bigquery'],
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { DateTime } from 'luxon';
|
||||
import { simpleParser } from 'mailparser';
|
||||
|
||||
import type {
|
||||
IBinaryKeyData,
|
||||
IDataObject,
|
||||
@@ -13,10 +14,11 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError, NodeOperationError } from 'n8n-workflow';
|
||||
import MailComposer from 'nodemailer/lib/mail-composer';
|
||||
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import type { IEmail } from '../../../utils/sendAndWait/interfaces';
|
||||
import { escapeHtml } from '../../../utils/utilities';
|
||||
import { getGoogleAccessToken } from '../GenericFunctions';
|
||||
|
||||
export interface IAttachments {
|
||||
type: string;
|
||||
@@ -24,11 +26,6 @@ export interface IAttachments {
|
||||
content: string;
|
||||
}
|
||||
|
||||
import MailComposer from 'nodemailer/lib/mail-composer';
|
||||
import { getGoogleAccessToken } from '../GenericFunctions';
|
||||
import { escapeHtml } from '../../../utils/utilities';
|
||||
import type { IEmail } from '../../../utils/sendAndWait/interfaces';
|
||||
|
||||
export async function googleApiRequest(
|
||||
this: IExecuteFunctions | ILoadOptionsFunctions | IPollFunctions,
|
||||
method: IHttpRequestMethods,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { DateTime } from 'luxon';
|
||||
import type {
|
||||
IPollFunctions,
|
||||
IDataObject,
|
||||
@@ -9,7 +10,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType } from 'n8n-workflow';
|
||||
|
||||
import { DateTime } from 'luxon';
|
||||
import {
|
||||
googleApiRequest,
|
||||
googleApiRequestAllItems,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import nock from 'nock';
|
||||
import * as mailparser from 'mailparser';
|
||||
import nock from 'nock';
|
||||
|
||||
import { testPollingTriggerNode } from '@test/nodes/TriggerHelpers';
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { IExecuteFunctions, INode } from 'n8n-workflow';
|
||||
import { DateTime } from 'luxon';
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import { DateTime } from 'luxon';
|
||||
import type { IExecuteFunctions, INode } from 'n8n-workflow';
|
||||
|
||||
import { parseRawEmail, prepareTimestamp } from '../../GenericFunctions';
|
||||
|
||||
const node: INode = {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import {
|
||||
NodeConnectionType,
|
||||
type IBinaryKeyData,
|
||||
@@ -12,7 +13,12 @@ import {
|
||||
type INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
import { draftFields, draftOperations } from './DraftDescription';
|
||||
import { labelFields, labelOperations } from './LabelDescription';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
import { messageLabelFields, messageLabelOperations } from './MessageLabelDescription';
|
||||
import type { IEmail } from '../../../../utils/sendAndWait/interfaces';
|
||||
import {
|
||||
encodeEmail,
|
||||
@@ -22,16 +28,6 @@ import {
|
||||
parseRawEmail,
|
||||
} from '../GenericFunctions';
|
||||
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
|
||||
import { messageLabelFields, messageLabelOperations } from './MessageLabelDescription';
|
||||
|
||||
import { labelFields, labelOperations } from './LabelDescription';
|
||||
|
||||
import { draftFields, draftOperations } from './DraftDescription';
|
||||
|
||||
import { oldVersionNotice } from '@utils/descriptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Gmail',
|
||||
name: 'gmail',
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
|
||||
import { draftFields, draftOperations } from './DraftDescription';
|
||||
import { labelFields, labelOperations } from './LabelDescription';
|
||||
import { getGmailAliases, getLabels, getThreadMessages } from './loadOptions';
|
||||
import { messageFields, messageOperations } from './MessageDescription';
|
||||
import { threadFields, threadOperations } from './ThreadDescription';
|
||||
import type { IEmail } from '../../../../utils/sendAndWait/interfaces';
|
||||
@@ -36,7 +37,6 @@ import {
|
||||
simplifyOutput,
|
||||
unescapeSnippets,
|
||||
} from '../GenericFunctions';
|
||||
import { getGmailAliases, getLabels, getThreadMessages } from './loadOptions';
|
||||
|
||||
const versionDescription: INodeTypeDescription = {
|
||||
displayName: 'Gmail',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { SEND_AND_WAIT_OPERATION, type INodeProperties } from 'n8n-workflow';
|
||||
|
||||
import { appendAttributionOption } from '../../../../utils/descriptions';
|
||||
|
||||
export const messageOperations: INodeProperties[] = [
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import ISO6391 from 'iso-639-1';
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
ILoadOptionsFunctions,
|
||||
@@ -9,7 +10,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import ISO6391 from 'iso-639-1';
|
||||
import { googleApiRequest } from './GenericFunctions';
|
||||
import type {
|
||||
AttributesValuesUi,
|
||||
CommentAnalyzeBody,
|
||||
@@ -17,8 +18,6 @@ import type {
|
||||
RequestedAttributes,
|
||||
} from './types';
|
||||
|
||||
import { googleApiRequest } from './GenericFunctions';
|
||||
|
||||
export class GooglePerspective implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
displayName: 'Google Perspective',
|
||||
|
||||
@@ -7,13 +7,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeConnectionType, NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../constants';
|
||||
import { apiRequest } from './v2/transport';
|
||||
import { sheetsSearch, spreadSheetsSearch } from './v2/methods/listSearch';
|
||||
import { GoogleSheet } from './v2/helpers/GoogleSheet';
|
||||
import { getSheetHeaderRowAndSkipEmpty } from './v2/methods/loadOptions';
|
||||
import type { ResourceLocator, ValueRenderOption } from './v2/helpers/GoogleSheets.types';
|
||||
|
||||
import {
|
||||
arrayOfArraysToJson,
|
||||
BINARY_MIME_TYPE,
|
||||
@@ -21,6 +14,12 @@ import {
|
||||
getRevisionFile,
|
||||
sheetBinaryToArrayOfArrays,
|
||||
} from './GoogleSheetsTrigger.utils';
|
||||
import { GoogleSheet } from './v2/helpers/GoogleSheet';
|
||||
import type { ResourceLocator, ValueRenderOption } from './v2/helpers/GoogleSheets.types';
|
||||
import { sheetsSearch, spreadSheetsSearch } from './v2/methods/listSearch';
|
||||
import { getSheetHeaderRowAndSkipEmpty } from './v2/methods/loadOptions';
|
||||
import { apiRequest } from './v2/transport';
|
||||
import { GOOGLE_DRIVE_FILE_URL_REGEX, GOOGLE_SHEETS_SHEET_URL_REGEX } from '../constants';
|
||||
|
||||
export class GoogleSheetsTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { IDataObject, IPollFunctions } from 'n8n-workflow';
|
||||
|
||||
import * as XLSX from 'xlsx';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import zip from 'lodash/zip';
|
||||
import type { IDataObject, IPollFunctions } from 'n8n-workflow';
|
||||
import * as XLSX from 'xlsx';
|
||||
|
||||
import type { SheetDataRow, SheetRangeData } from './v2/helpers/GoogleSheets.types';
|
||||
import { apiRequest } from './v2/transport';
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
JsonObject,
|
||||
} from 'n8n-workflow';
|
||||
import { NodeApiError } from 'n8n-workflow';
|
||||
|
||||
import { getGoogleAccessToken } from '../../GenericFunctions';
|
||||
|
||||
export interface IGoogleAuthCredentials {
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import get from 'lodash/get';
|
||||
import type { IExecuteFunctions, ILoadOptionsFunctions, IDataObject } from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { utils as xlsxUtils } from 'xlsx';
|
||||
|
||||
import get from 'lodash/get';
|
||||
import { googleApiRequest } from './GenericFunctions';
|
||||
|
||||
export interface ISheetOptions {
|
||||
|
||||
@@ -13,8 +13,7 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { NodeOperationError } from 'n8n-workflow';
|
||||
|
||||
import { getGoogleAccessToken } from '../../GenericFunctions';
|
||||
import { generatePairedItemData } from '../../../../utils/utilities';
|
||||
import { googleApiRequest, hexToRgb } from './GenericFunctions';
|
||||
import type {
|
||||
ILookupValues,
|
||||
ISheetUpdateData,
|
||||
@@ -23,10 +22,9 @@ import type {
|
||||
ValueRenderOption,
|
||||
} from './GoogleSheet';
|
||||
import { GoogleSheet } from './GoogleSheet';
|
||||
|
||||
import { googleApiRequest, hexToRgb } from './GenericFunctions';
|
||||
|
||||
import { versionDescription } from './versionDescription';
|
||||
import { generatePairedItemData } from '../../../../utils/utilities';
|
||||
import { getGoogleAccessToken } from '../../GenericFunctions';
|
||||
|
||||
export class GoogleSheetsV1 implements INodeType {
|
||||
description: INodeTypeDescription;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user