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 attendeeOperations : 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 an attendee' ,
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 attendees' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Get Details' ,
value : 'getDetails' ,
2022-07-10 13:50:51 -07:00
action : 'Get details of an attendee' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'attendee' ] ,
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 attendeeFields : INodeProperties [ ] = [
2021-02-21 23:49:00 -08:00
// ----------------------------------
// attendee: 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 that the attendee attended. 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 : [ 'attendee' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Session Key Name or ID' ,
2021-02-21 23:49:00 -08:00
name : 'sessionKey' ,
type : 'options' ,
required : true ,
typeOptions : {
loadOptionsMethod : 'getWebinarSessions' ,
2022-08-17 08:50:24 -07:00
loadOptionsDependsOn : [ 'webinarKey' ] ,
2021-02-21 23:49:00 -08:00
} ,
default : '' ,
2022-08-17 08:50:24 -07:00
description :
'Key of the session that the attendee attended. 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 : [ 'attendee' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
// ----------------------------------
// attendee: get
// ----------------------------------
{
displayName : 'Registrant Key' ,
name : 'registrantKey' ,
type : 'string' ,
required : true ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Registrant key of the attendee at the webinar session' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'attendee' ] ,
operation : [ 'get' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
// ----------------------------------
// attendee: getDetails
// ----------------------------------
{
displayName : 'Registrant Key' ,
name : 'registrantKey' ,
type : 'string' ,
required : true ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Registrant key of the attendee at the webinar session' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'attendee' ] ,
operation : [ 'getDetails' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
displayName : 'Details' ,
name : 'details' ,
type : 'options' ,
required : true ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'The details to retrieve for the attendee' ,
2021-02-21 23:49:00 -08:00
options : [
{
name : 'Polls' ,
value : 'polls' ,
2022-05-06 14:01:25 -07:00
description : 'Poll answers from the attendee in 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 asked by the attendee in a webinar session' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Survey Answers' ,
value : 'surveyAnswers' ,
2022-05-06 14:01:25 -07:00
description : 'Survey answers from the attendee in a webinar session' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'attendee' ] ,
operation : [ 'getDetails' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
// ----------------------------------
// attendee: 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 : [ 'attendee' ] ,
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 : [ 'attendee' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;