@@ -15,7 +15,7 @@ export default {
15
15
name : "New Email Received" ,
16
16
description : "Emit new event when a new email is received." ,
17
17
type : "source" ,
18
- version : "0.2.1 " ,
18
+ version : "0.2.2 " ,
19
19
dedupe : "unique" ,
20
20
props : {
21
21
gmail,
@@ -33,6 +33,14 @@ export default {
33
33
optional : true ,
34
34
default : "polling" ,
35
35
} ,
36
+ timer : {
37
+ type : "$.interface.timer" ,
38
+ label : "Polling Interval" ,
39
+ description : "How often to poll for new emails" ,
40
+ default : {
41
+ intervalSeconds : DEFAULT_POLLING_SOURCE_TIMER_INTERVAL ,
42
+ } ,
43
+ } ,
36
44
serviceAccountKeyJson : {
37
45
type : "string" ,
38
46
label : "Service Account Key JSON" ,
@@ -120,19 +128,6 @@ export default {
120
128
async additionalProps ( ) {
121
129
const newProps = { } ;
122
130
123
- // Add timer for polling mode
124
- if ( this . triggerType !== "webhook" ) {
125
- newProps . timer = {
126
- type : "$.interface.timer" ,
127
- label : "Polling Interval" ,
128
- description : "How often to poll for new emails" ,
129
- default : {
130
- intervalSeconds : DEFAULT_POLLING_SOURCE_TIMER_INTERVAL ,
131
- } ,
132
- } ;
133
- return newProps ;
134
- }
135
-
136
131
// Handle webhook mode
137
132
if ( this . triggerType === "webhook" ) {
138
133
// verify that a Custom OAuth client is being used only if webhook mode is selected
@@ -150,7 +145,7 @@ export default {
150
145
} ;
151
146
newProps . timer = {
152
147
type : "$.interface.timer" ,
153
- default : {
148
+ static : {
154
149
intervalSeconds : 60 * 60 , // 1 hour for webhook renewal
155
150
} ,
156
151
hidden : true ,
0 commit comments