2022-08-17 08:50:24 -07:00
import { INodeProperties } from 'n8n-workflow' ;
2021-02-21 23:49:00 -08:00
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' ,
2022-07-10 13:50:51 -07:00
action : 'Get a session' ,
2021-02-21 23:49:00 -08:00
} ,
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2021-02-21 23:49:00 -08:00
value : 'getAll' ,
2022-09-08 08:10:13 -07:00
action : 'Get many sessions' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Get Details' ,
value : 'getDetails' ,
2022-07-10 13:50:51 -07:00
action : 'Get details on a session' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
operation : [ 'getAll' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
operation : [ 'getAll' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
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-08-17 08:50:24 -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/code-examples/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-08-17 08:50:24 -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/code-examples/expressions/">expression</a>.' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
operation : [ 'get' , 'getDetails' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
displayName : 'Session Key' ,
name : 'sessionKey' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
operation : [ 'get' , 'getDetails' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
// ----------------------------------
// 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 : {
2022-08-17 08:50:24 -07:00
resource : [ 'session' ] ,
operation : [ 'getDetails' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;