From 208cfa64ac0922ac7e0e16256e6b13c2a529dfd6 Mon Sep 17 00:00:00 2001 From: Amit Agarwal Date: Thu, 15 Nov 2018 04:11:52 +0530 Subject: [PATCH] GmailApp getAttachments() (#30444) Advanced parameters to get all the attachments for any Gmail message. --- .../google-apps-script.gmail.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/types/google-apps-script/google-apps-script.gmail.d.ts b/types/google-apps-script/google-apps-script.gmail.d.ts index 9a241db3e0..db8e6ecc52 100644 --- a/types/google-apps-script/google-apps-script.gmail.d.ts +++ b/types/google-apps-script/google-apps-script.gmail.d.ts @@ -187,6 +187,23 @@ declare namespace GoogleAppsScript { replyTo?: string; } + /** + * Options for a Gmail Attachments. + */ + export type GmailAttachmentOptions = { + /** + * If the returned array of Blob attachments should include inline images. + */ + includeInlineImages?: boolean; + /** + * If the returned array of Blob attachments should include regular (non-inline) attachments. + */ + includeAttachments?: boolean; + /** + * A comma-separated list of email addresses to BCC. + */ + } + /** * A user-created label in a user's Gmail account. */ @@ -213,6 +230,7 @@ declare namespace GoogleAppsScript { forward(recipient: string): GmailMessage; forward(recipient: string, options: GmailDraftOptions): GmailMessage; getAttachments(): GmailAttachment[]; + getAttachments(options: GmailAttachmentOptions): GmailAttachment[]; getBcc(): string; getBody(): string; getCc(): string;