2021-02-21 23:49:00 -08:00
|
|
|
import {
|
|
|
|
INodeProperties,
|
|
|
|
} from 'n8n-workflow';
|
|
|
|
|
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',
|
|
|
|
default: 'get',
|
|
|
|
description: 'Operation to perform',
|
|
|
|
options: [
|
|
|
|
{
|
|
|
|
name: 'Get',
|
|
|
|
value: 'get',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get All',
|
|
|
|
value: 'getAll',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Get Details',
|
|
|
|
value: 'getDetails',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
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
|
|
|
|
// ----------------------------------
|
|
|
|
{
|
|
|
|
displayName: 'Webinar Key',
|
|
|
|
name: 'webinarKey',
|
|
|
|
type: 'options',
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getWebinars',
|
|
|
|
},
|
|
|
|
required: true,
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Key of the webinar that the attendee attended',
|
2021-02-21 23:49:00 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
displayName: 'Session Key',
|
|
|
|
name: 'sessionKey',
|
|
|
|
type: 'options',
|
|
|
|
required: true,
|
|
|
|
typeOptions: {
|
|
|
|
loadOptionsMethod: 'getWebinarSessions',
|
|
|
|
loadOptionsDependsOn: [
|
|
|
|
'webinarKey',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
default: '',
|
2022-05-06 14:01:25 -07:00
|
|
|
description: 'Key of the session that the attendee attended',
|
2021-02-21 23:49:00 -08:00
|
|
|
displayOptions: {
|
|
|
|
show: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// 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: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'get',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// 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: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getDetails',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getDetails',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// ----------------------------------
|
|
|
|
// 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: {
|
|
|
|
resource: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
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: [
|
|
|
|
'attendee',
|
|
|
|
],
|
|
|
|
operation: [
|
|
|
|
'getAll',
|
|
|
|
],
|
|
|
|
returnAll: [
|
|
|
|
false,
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-12-03 00:44:16 -08:00
|
|
|
];
|