2023-01-27 03:22:44 -08:00
import type { INodeProperties } from 'n8n-workflow' ;
2021-03-04 01:25:47 -08:00
2021-12-03 00:44:16 -08:00
export const activityOperations : INodeProperties [ ] = [
2021-03-04 01:25:47 -08:00
{
displayName : 'Operation' ,
name : 'operation' ,
type : 'options' ,
2022-05-20 14:47:24 -07:00
noDataExpression : true ,
2021-03-04 01:25:47 -08:00
default : 'getAll' ,
options : [
{
2022-09-07 07:51:14 -07:00
name : 'Get Many' ,
2021-03-04 01:25:47 -08:00
value : 'getAll' ,
2022-09-08 08:10:13 -07:00
action : 'Get many activities' ,
2021-03-04 01:25:47 -08:00
} ,
] ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'activity' ] ,
2021-03-04 01:25:47 -08:00
} ,
} ,
} ,
2021-12-03 00:44:16 -08:00
] ;
2021-03-04 01:25:47 -08:00
2021-12-03 00:44:16 -08:00
export const activityFields : INodeProperties [ ] = [
2021-03-04 01:25:47 -08:00
// ----------------------------------
// activity: 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-03-04 01:25:47 -08:00
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'activity' ] ,
operation : [ 'getAll' ] ,
2021-03-04 01:25:47 -08:00
} ,
} ,
} ,
{
displayName : 'Limit' ,
name : 'limit' ,
type : 'number' ,
default : 5 ,
2022-05-06 14:01:25 -07:00
description : 'Max number of results to return' ,
2021-03-04 01:25:47 -08:00
typeOptions : {
minValue : 1 ,
maxValue : 1000 ,
} ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'activity' ] ,
operation : [ 'getAll' ] ,
returnAll : [ false ] ,
2021-03-04 01:25:47 -08:00
} ,
} ,
} ,
{
displayName : 'Filters' ,
name : 'filters' ,
type : 'collection' ,
placeholder : 'Add Filter' ,
default : { } ,
displayOptions : {
show : {
2022-08-17 08:50:24 -07:00
resource : [ 'activity' ] ,
operation : [ 'getAll' ] ,
2021-03-04 01:25:47 -08:00
} ,
} ,
options : [
{
2022-06-03 10:23:49 -07:00
displayName : 'Campaign Name or ID' ,
2021-03-04 01:25:47 -08:00
name : 'campaignId' ,
type : 'options' ,
default : '' ,
typeOptions : {
loadOptionsMethod : 'getCampaigns' ,
} ,
2022-08-17 08:50:24 -07:00
description :
'ID of the campaign to retrieve activity for. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.' ,
2021-03-04 01:25:47 -08:00
} ,
{
displayName : 'Type' ,
name : 'type' ,
type : 'options' ,
default : 'emailsOpened' ,
2022-05-06 14:01:25 -07:00
description : 'Type of activity to retrieve' ,
2021-03-04 01:25:47 -08:00
options : [
{
name : 'Emails Bounced' ,
value : 'emailsBounced' ,
} ,
{
name : 'Emails Clicked' ,
value : 'emailsClicked' ,
} ,
{
name : 'Emails Opened' ,
value : 'emailsOpened' ,
} ,
{
name : 'Emails Replied' ,
value : 'emailsReplied' ,
} ,
{
name : 'Emails Send Failed' ,
value : 'emailsSendFailed' ,
} ,
{
name : 'Emails Sent' ,
value : 'emailsSent' ,
} ,
{
name : 'Emails Unsubscribed' ,
value : 'emailsUnsubscribed' ,
} ,
] ,
} ,
] ,
} ,
2021-12-03 00:44:16 -08:00
] ;