2021-02-13 08:46:35 -08:00
import { INodeProperties } from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const reportOperations : INodeProperties [ ] = [
2021-02-13 08:46:35 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2021-02-13 08:46:35 -08:00
displayOptions : {
show : {
resource : [
'report' ,
] ,
} ,
} ,
options : [
{
name : 'Get' ,
value : 'get' ,
description : 'Get an event report' ,
} ,
] ,
default : 'get' ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2021-02-13 08:46:35 -08:00
2021-12-03 00:44:16 -08:00
export const reportFields : INodeProperties [ ] = [
2021-02-13 08:46:35 -08:00
/* -------------------------------------------------------------------------- */
/* report:get */
/* -------------------------------------------------------------------------- */
{
2022-06-03 10:23:49 -07:00
displayName : 'Event Name or ID' ,
2021-02-13 08:46:35 -08:00
name : 'eventId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getEvents' ,
} ,
displayOptions : {
show : {
resource : [
'report' ,
] ,
operation : [
'get' ,
] ,
} ,
} ,
default : '' ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Session Name or ID' ,
2021-02-13 08:46:35 -08:00
name : 'dateId' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getEventSessions' ,
loadOptionsDependsOn : [
'eventId' ,
] ,
} ,
default : '' ,
required : true ,
2022-06-03 10:23:49 -07:00
description : 'ID of the session. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2021-02-13 08:46:35 -08:00
displayOptions : {
show : {
resource : [
'report' ,
] ,
operation : [
'get' ,
] ,
} ,
} ,
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Field' ,
default : { } ,
displayOptions : {
show : {
resource : [
'report' ,
] ,
operation : [
'get' ,
] ,
} ,
} ,
options : [
{
displayName : 'Status' ,
name : 'status' ,
type : 'options' ,
options : [
{
name : 'Attended' ,
value : 'attended' ,
} ,
{
name : 'Banned' ,
value : 'banned' ,
} ,
{
name : 'Completed' ,
value : 'completed' ,
} ,
{
name : 'Did Not Attend' ,
value : 'did-not-attend' ,
} ,
{
name : 'Left Early' ,
value : 'left-early' ,
} ,
] ,
default : '' ,
description : 'Filter results by participation status' ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;