2021-02-21 23:49:00 -08:00
import {
INodeProperties ,
} from 'n8n-workflow' ;
2021-12-03 00:44:16 -08:00
export const sessionOperations : INodeProperties [ ] = [
2021-02-21 23:49:00 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2021-02-21 23:49:00 -08:00
default : 'get' ,
options : [
{
name : 'Get' ,
value : 'get' ,
} ,
{
name : 'Get All' ,
value : 'getAll' ,
} ,
{
name : 'Get Details' ,
value : 'getDetails' ,
} ,
] ,
displayOptions : {
show : {
resource : [
'session' ,
] ,
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2021-02-21 23:49:00 -08:00
2021-12-03 00:44:16 -08:00
export const sessionFields : INodeProperties [ ] = [
2021-02-21 23:49:00 -08:00
// ----------------------------------
// session: getAll
// ----------------------------------
{
displayName : 'Return All' ,
name : 'returnAll' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether to return all results or only up to a given limit' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
resource : [
'session' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
default : 10 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2021-02-21 23:49:00 -08:00
typeOptions : {
minValue : 1 ,
maxValue : 100 ,
} ,
displayOptions : {
show : {
resource : [
'session' ,
] ,
operation : [
'getAll' ,
] ,
returnAll : [
false ,
] ,
} ,
} ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
resource : [
'session' ,
] ,
operation : [
'getAll' ,
] ,
} ,
} ,
default : { } ,
options : [
{
displayName : 'Time Range' ,
name : 'times' ,
type : 'fixedCollection' ,
placeholder : 'Add Time Range' ,
required : true ,
default : { } ,
options : [
{
displayName : 'Times Properties' ,
name : 'timesProperties' ,
values : [
{
displayName : 'Start Time' ,
name : 'fromTime' ,
type : 'dateTime' ,
2022-05-06 14:01:25 -07:00
description : 'Start of the datetime range for the session' ,
2021-02-21 23:49:00 -08:00
default : '' ,
} ,
{
displayName : 'End Time' ,
name : 'toTime' ,
type : 'dateTime' ,
2022-05-06 14:01:25 -07:00
description : 'End of the datetime range for the session' ,
2021-02-21 23:49:00 -08:00
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Webinar Key Name or ID' ,
2021-02-21 23:49:00 -08:00
name : 'webinarKey' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getWebinars' ,
} ,
default : { } ,
2022-06-03 10:23:49 -07:00
description : 'Webinar by which to filter the sessions to retrieve. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
} ,
// ----------------------------------
// session: shared fields
// ----------------------------------
{
2022-06-03 10:23:49 -07:00
displayName : 'Webinar Key Name or ID' ,
2021-02-21 23:49:00 -08:00
name : 'webinarKey' ,
type : 'options' ,
typeOptions : {
loadOptionsMethod : 'getWebinars' ,
} ,
required : true ,
default : [ ] ,
2022-06-03 10:23:49 -07:00
description : 'Key of the webinar to which the session belongs. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/nodes/expressions.html#expressions">expression</a>.' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
resource : [
'session' ,
] ,
operation : [
'get' ,
'getDetails' ,
] ,
} ,
} ,
} ,
{
displayName : 'Session Key' ,
name : 'sessionKey' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
resource : [
'session' ,
] ,
operation : [
'get' ,
'getDetails' ,
] ,
} ,
} ,
} ,
// ----------------------------------
// session: getDetails
// ----------------------------------
{
displayName : 'Details' ,
name : 'details' ,
type : 'options' ,
default : 'performance' ,
options : [
{
name : 'Performance' ,
value : 'performance' ,
2022-05-06 14:01:25 -07:00
description : 'Performance details for a webinar session' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Polls' ,
value : 'polls' ,
2022-05-06 14:01:25 -07:00
description : 'Questions and answers for polls from a webinar session' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Questions' ,
value : 'questions' ,
2022-05-06 14:01:25 -07:00
description : 'Questions and answers for a past webinar session' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Surveys' ,
value : 'surveys' ,
2022-05-06 14:01:25 -07:00
description : 'Surveys for a past webinar session' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
displayOptions : {
show : {
resource : [
'session' ,
] ,
operation : [
'getDetails' ,
] ,
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;