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 webinarOperations : 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 : 'Create' ,
value : 'create' ,
2022-07-10 13:50:51 -07:00
action : 'Create a webinar' ,
2021-02-21 23:49:00 -08:00
} ,
// {
// name: 'Delete',
// value: 'delete',
// },
{
name : 'Get' ,
value : 'get' ,
2022-07-10 13:50:51 -07:00
action : 'Get a webinar' ,
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-07-10 13:50:51 -07:00
action : 'Get all webinars' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Update' ,
value : 'update' ,
2022-07-10 13:50:51 -07:00
action : 'Update a webinar' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
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 webinarFields : INodeProperties [ ] = [
2021-02-21 23:49:00 -08:00
// ----------------------------------
// webinar: create
// ----------------------------------
{
displayName : 'Subject' ,
name : 'subject' ,
type : 'string' ,
required : true ,
default : '' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'create' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
displayName : 'Time Range' ,
name : 'times' ,
type : 'fixedCollection' ,
required : true ,
placeholder : 'Add Time Range' ,
typeOptions : {
multipleValues : true ,
} ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'create' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
options : [
{
displayName : 'Times Properties' ,
name : 'timesProperties' ,
values : [
{
displayName : 'Start Time' ,
name : 'startTime' ,
type : 'dateTime' ,
required : true ,
default : '' ,
} ,
{
displayName : 'End Time' ,
name : 'endTime' ,
type : 'dateTime' ,
required : true ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Additional Fields' ,
name : 'additionalFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'create' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
} ,
{
displayName : 'Experience Type' ,
name : 'experienceType' ,
type : 'options' ,
default : 'CLASSIC' ,
options : [
{
name : 'Classic' ,
value : 'CLASSIC' ,
} ,
{
name : 'Broadcast' ,
value : 'BROADCAST' ,
} ,
{
name : 'Simulive' ,
value : 'SIMULIVE' ,
} ,
] ,
} ,
{
displayName : 'Is On-Demand' ,
name : 'isOnDemand' ,
type : 'boolean' ,
default : false ,
} ,
{
displayName : 'Is Password Protected' ,
name : 'isPasswordProtected' ,
type : 'boolean' ,
default : false ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Timezone Name or ID' ,
2021-02-21 23:49:00 -08:00
name : 'timezone' ,
type : 'options' ,
2022-08-17 08:50:24 -07:00
description :
'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
required : true ,
default : '' ,
placeholder : '2020-12-11T09:00:00Z' ,
typeOptions : {
alwaysOpenEditWindow : true ,
loadOptionsMethod : 'getTimezones' ,
} ,
} ,
{
displayName : 'Webinar Type' ,
name : 'type' ,
type : 'options' ,
default : 'single_session' ,
options : [
{
name : 'Single Session' ,
value : 'single_session' ,
2022-05-06 14:01:25 -07:00
description : 'Webinar with one single meeting' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Series' ,
value : 'series' ,
2022-08-17 08:50:24 -07:00
description :
'Webinar with multiple meetings times where attendees choose only one to attend' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Sequence' ,
value : 'sequence' ,
2022-08-17 08:50:24 -07:00
description :
'Webinar with multiple meeting times where attendees are expected to be the same for all sessions' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
} ,
] ,
} ,
// ----------------------------------
// webinar: delete
// ----------------------------------
{
displayName : 'Webinar Key' ,
name : 'webinarKey' ,
type : 'string' ,
required : true ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Key of the webinar to delete' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'delete' ] ,
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 : [ 'webinar' ] ,
operation : [ 'delete' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
default : { } ,
options : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Send Cancellation E-Mails' ,
2021-02-21 23:49:00 -08:00
name : 'sendCancellationEmails' ,
type : 'boolean' ,
default : false ,
} ,
] ,
} ,
// ----------------------------------
// webinar: get
// ----------------------------------
{
displayName : 'Webinar Key' ,
name : 'webinarKey' ,
type : 'string' ,
required : true ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Key of the webinar to retrieve' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'get' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
// ----------------------------------
// webinar: 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 : [ 'webinar' ] ,
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 : [ 'webinar' ] ,
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 : [ 'webinar' ] ,
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 webinar' ,
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 webinar' ,
2021-02-21 23:49:00 -08:00
default : '' ,
} ,
] ,
} ,
] ,
} ,
] ,
} ,
// ----------------------------------
// webinar: update
// ----------------------------------
{
displayName : 'Webinar Key' ,
name : 'webinarKey' ,
type : 'string' ,
required : true ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Key of the webinar to update' ,
2021-02-21 23:49:00 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'update' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
displayName : 'Notify Participants' ,
name : 'notifyParticipants' ,
type : 'boolean' ,
required : true ,
default : false ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'update' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
} ,
{
displayName : 'Update Fields' ,
name : 'updateFields' ,
type : 'collection' ,
placeholder : 'Add Field' ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'webinar' ] ,
operation : [ 'update' ] ,
2021-02-21 23:49:00 -08:00
} ,
} ,
default : { } ,
options : [
{
displayName : 'Description' ,
name : 'description' ,
type : 'string' ,
default : '' ,
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
} ,
{
displayName : 'Experience Type' ,
name : 'experienceType' ,
type : 'options' ,
default : 'CLASSIC' ,
options : [
{
name : 'Classic' ,
value : 'CLASSIC' ,
} ,
{
name : 'Broadcast' ,
value : 'BROADCAST' ,
} ,
{
name : 'Simulive' ,
value : 'SIMULIVE' ,
} ,
] ,
} ,
{
displayName : 'Is On-Demand' ,
name : 'isOnDemand' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether the webinar may be watched anytime' ,
2021-02-21 23:49:00 -08:00
} ,
{
displayName : 'Is Password Protected' ,
name : 'isPasswordProtected' ,
type : 'boolean' ,
default : false ,
2022-05-06 14:01:25 -07:00
description : 'Whether the webinar requires a password for attendees to join' ,
2021-02-21 23:49:00 -08:00
} ,
{
displayName : 'Times' ,
name : 'times' ,
type : 'fixedCollection' ,
2021-12-03 00:44:16 -08:00
default : { } ,
2021-02-21 23:49:00 -08:00
typeOptions : {
multipleValues : true ,
} ,
options : [
{
displayName : 'Times Properties' ,
name : 'timesProperties' ,
values : [
{
displayName : 'Start Time' ,
name : 'startTime' ,
type : 'dateTime' ,
required : true ,
default : '' ,
} ,
{
displayName : 'End Time' ,
name : 'endTime' ,
type : 'dateTime' ,
required : true ,
default : '' ,
} ,
] ,
} ,
] ,
} ,
{
displayName : 'Subject' ,
name : 'subject' ,
type : 'string' ,
default : '' ,
2022-05-06 14:01:25 -07:00
description : 'Name or topic of the webinar' ,
2021-02-21 23:49:00 -08:00
typeOptions : {
alwaysOpenEditWindow : true ,
} ,
} ,
{
2022-06-03 10:23:49 -07:00
displayName : 'Timezone Name or ID' ,
2021-02-21 23:49:00 -08:00
name : 'timezone' ,
type : 'options' ,
default : '' ,
placeholder : '2020-12-11T09:00:00Z' ,
2022-08-17 08:50:24 -07:00
description :
'Timezone where the webinar is to take place. 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
typeOptions : {
alwaysOpenEditWindow : true ,
loadOptionsMethod : 'getTimezones' ,
} ,
} ,
{
displayName : 'Webinar Type' ,
name : 'type' ,
type : 'options' ,
default : 'single_session' ,
options : [
{
name : 'Single Session' ,
value : 'single_session' ,
2022-05-06 14:01:25 -07:00
description : 'Webinar with one single meeting' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Series' ,
value : 'series' ,
2022-08-17 08:50:24 -07:00
description :
'Webinar with multiple meetings times where attendees choose only one to attend' ,
2021-02-21 23:49:00 -08:00
} ,
{
name : 'Sequence' ,
value : 'sequence' ,
2022-08-17 08:50:24 -07:00
description :
'Webinar with multiple meeting times where attendees are expected to be the same for all sessions' ,
2021-02-21 23:49:00 -08:00
} ,
] ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;