2020-11-25 04:08:59 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const reportOperations: INodeProperties[] = [
|
2020-11-25 04:08:59 -08:00
|
|
|
{
|
|
|
|
displayName: 'Operation',
|
|
|
|
name: 'operation',
|
|
|
|
type: 'options',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
description: 'Get a report',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Run',
|
|
|
|
value: 'run',
|
|
|
|
description: 'Run a report',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
default: 'get',
|
|
|
|
description: 'The operation to perform.',
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|
2020-11-25 04:08:59 -08:00
|
|
|
|
2021-12-03 00:44:16 -08:00
|
|
|
export const reportFields: INodeProperties[] = [
|
2020-11-25 04:08:59 -08:00
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* report:get */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Table ID',
|
|
|
|
name: 'tableId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The table identifier',
|
2020-11-25 04:08:59 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Report ID',
|
|
|
|
name: 'reportId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The identifier of the report, unique to the table',
|
2020-11-25 04:08:59 -08:00
|
|
|
},
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
/* report:run */
|
|
|
|
/* -------------------------------------------------------------------------- */
|
|
|
|
{
|
|
|
|
displayName: 'Table ID',
|
|
|
|
name: 'tableId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'run',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The table identifier',
|
2020-11-25 04:08:59 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Report ID',
|
|
|
|
name: 'reportId',
|
|
|
|
type: 'string',
|
|
|
|
default: '',
|
|
|
|
required: true,
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'run',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'The identifier of the report, unique to the table',
|
2020-11-25 04:08:59 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Return All',
|
|
|
|
name: 'returnAll',
|
|
|
|
type: 'boolean',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'run',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
default: true,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Whether to return all results or only up to a given limit',
|
2020-11-25 04:08:59 -08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Limit',
|
|
|
|
name: 'limit',
|
|
|
|
type: 'number',
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'report',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'run',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
hide: {
|
|
|
|
returnAll: [
|
|
|
|
true,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
typeOptions: {
|
|
|
|
minValue: 1,
|
|
|
|
maxValue: 100,
|
|
|
|
},
|
|
|
|
default: 100,
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Max number of results to return',
|
2020-11-25 04:08:59 -08:00
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|