@@ -15,7 +15,7 @@ export default {
1515 name : "New Email Received" ,
1616 description : "Emit new event when a new email is received." ,
1717 type : "source" ,
18- version : "0.2.1 " ,
18+ version : "0.2.2 " ,
1919 dedupe : "unique" ,
2020 props : {
2121 gmail,
@@ -33,6 +33,14 @@ export default {
3333 optional : true ,
3434 default : "polling" ,
3535 } ,
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+ } ,
3644 serviceAccountKeyJson : {
3745 type : "string" ,
3846 label : "Service Account Key JSON" ,
@@ -120,19 +128,6 @@ export default {
120128 async additionalProps ( ) {
121129 const newProps = { } ;
122130
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-
136131 // Handle webhook mode
137132 if ( this . triggerType === "webhook" ) {
138133 // verify that a Custom OAuth client is being used only if webhook mode is selected
@@ -150,9 +145,7 @@ export default {
150145 } ;
151146 newProps . timer = {
152147 type : "$.interface.timer" ,
153- default : {
154- intervalSeconds : 60 * 60 , // 1 hour for webhook renewal
155- } ,
148+ intervalSeconds : 60 * 60 , // 1 hour for webhook renewal
156149 hidden : true ,
157150 } ;
158151
0 commit comments