@@ -270,6 +270,7 @@ declare namespace GoogleAppsScript {
270270 SwitchControlType : typeof SwitchControlType ;
271271 TextButtonStyle : typeof TextButtonStyle ;
272272 UpdateDraftBodyType : typeof UpdateDraftBodyType ;
273+ InputType : typeof InputType ;
273274 newAction ( ) : Action ;
274275 newActionResponseBuilder ( ) : ActionResponseBuilder ;
275276 newAttachment ( ) : Attachment ;
@@ -336,6 +337,7 @@ declare namespace GoogleAppsScript {
336337 newUpdateDraftCcRecipientsAction ( ) : UpdateDraftCcRecipientsAction ;
337338 newUpdateDraftSubjectAction ( ) : UpdateDraftSubjectAction ;
338339 newUpdateDraftToRecipientsAction ( ) : UpdateDraftToRecipientsAction ;
340+ newValidation ( ) : Validation ;
339341 }
340342 /**
341343 * The response object that may be returned from a callback method for compose action in a Gmail add-on.
@@ -839,6 +841,7 @@ declare namespace GoogleAppsScript {
839841 setSuggestions ( suggestions : Suggestions ) : TextInput ;
840842 setSuggestionsAction ( suggestionsAction : Action ) : TextInput ;
841843 setTitle ( title : string ) : TextInput ;
844+ setValidation ( validation : Validation ) : TextInput ;
842845 setValue ( value : string ) : TextInput ;
843846 }
844847 /**
@@ -993,6 +996,29 @@ declare namespace GoogleAppsScript {
993996 interface UpdateDraftToRecipientsAction {
994997 addUpdateToRecipients ( toRecipientEmails : string [ ] ) : UpdateDraftToRecipientsAction ;
995998 }
999+
1000+ /**
1001+ * An object that defines the validation rule for the widget that it is attached to.
1002+ *
1003+ * const validation = CardService.newValidation()
1004+ * .setCharacterLimit('10')
1005+ * .setInputType(CardService.InputType.TEXT);
1006+ */
1007+ interface Validation {
1008+ setCharacterLimit ( characterLimit : Integer ) : Validation ;
1009+ setInputType ( inputType : InputType ) : Validation ;
1010+ }
1011+
1012+ /**
1013+ * An enum that defines the input type of the widget.
1014+ */
1015+ enum InputType {
1016+ TEXT ,
1017+ INTEGER ,
1018+ FLOAT ,
1019+ EMAIL ,
1020+ }
1021+
9961022 /**
9971023 * The fixed footer shown at the bottom of an add-on Card.
9981024 */
0 commit comments