2023-01-20 07:00:47 -08:00
|
|
|
/* eslint-disable n8n-nodes-base/node-filename-against-convention */
|
2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeTypeDescription } from 'n8n-workflow';
|
2023-01-20 07:00:47 -08:00
|
|
|
import * as userActivity from './userActivity/UserActivity.resource';
|
|
|
|
import * as report from './report/Report.resource';
|
|
|
|
|
|
|
|
export const versionDescription: INodeTypeDescription = {
|
|
|
|
displayName: 'Google Analytics',
|
|
|
|
name: 'googleAnalytics',
|
|
|
|
icon: 'file:analytics.svg',
|
|
|
|
group: ['transform'],
|
|
|
|
version: 2,
|
|
|
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
|
|
description: 'Use the Google Analytics API',
|
|
|
|
defaults: {
|
|
|
|
name: 'Google Analytics',
|
|
|
|
},
|
|
|
|
inputs: ['main'],
|
|
|
|
outputs: ['main'],
|
|
|
|
credentials: [
|
|
|
|
{
|
|
|
|
name: 'googleAnalyticsOAuth2',
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
properties: [
|
|
|
|
{
|
|
|
|
displayName: 'Resource',
|
|
|
|
name: 'resource',
|
|
|
|
type: 'options',
|
|
|
|
noDataExpression: true,
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Report',
|
|
|
|
value: 'report',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'User Activity',
|
|
|
|
value: 'userActivity',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'report',
|
|
|
|
},
|
|
|
|
...report.description,
|
|
|
|
...userActivity.description,
|
|
|
|
],
|
|
|
|
};
|