From 6b10eb5817740edb58e9119324174d6669fd7797 Mon Sep 17 00:00:00 2001 From: adam jones Date: Sat, 18 Oct 2025 19:59:06 +0100 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73915=20feat(g?= =?UTF-8?q?oogle-apps-script):=20add=20subject=20option=20to=20Gmail=20dra?= =?UTF-8?q?ft=20reply=20methods=20by=20@domdomegg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Claude --- .../google-apps-script.gmail.d.ts | 17 +++++-- .../test/google-apps-script-tests.ts | 47 +++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) 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 05b881825a73e5..f26515ece17bf8 100644 --- a/types/google-apps-script/google-apps-script.gmail.d.ts +++ b/types/google-apps-script/google-apps-script.gmail.d.ts @@ -183,6 +183,15 @@ declare namespace GoogleAppsScript { */ replyTo?: string | undefined; } + /** + * Options for a Gmail draft reply. + */ + interface GmailReplyOptions extends GmailAdvancedOptions { + /** + * The subject line for the reply draft (up to 250 characters). + */ + subject?: string | undefined; + } /** alias to GmailAdvancedOptions */ type GmailDraftOptions = GmailAdvancedOptions; /** @@ -220,9 +229,9 @@ declare namespace GoogleAppsScript { */ interface GmailMessage { createDraftReply(body: string): GmailDraft; - createDraftReply(body: string, options: GmailAdvancedOptions): GmailDraft; + createDraftReply(body: string, options: GmailReplyOptions): GmailDraft; createDraftReplyAll(body: string): GmailDraft; - createDraftReplyAll(body: string, options: GmailAdvancedOptions): GmailDraft; + createDraftReplyAll(body: string, options: GmailReplyOptions): GmailDraft; forward(recipient: string): GmailMessage; forward(recipient: string, options: GmailAdvancedOptions): GmailMessage; getAttachments(): GmailAttachment[]; @@ -264,9 +273,9 @@ declare namespace GoogleAppsScript { interface GmailThread { addLabel(label: GmailLabel): GmailThread; createDraftReply(body: string): GmailDraft; - createDraftReply(body: string, options: GmailAdvancedOptions): GmailDraft; + createDraftReply(body: string, options: GmailReplyOptions): GmailDraft; createDraftReplyAll(body: string): GmailDraft; - createDraftReplyAll(body: string, options: GmailAdvancedOptions): GmailDraft; + createDraftReplyAll(body: string, options: GmailReplyOptions): GmailDraft; getFirstMessageSubject(): string; getId(): string; getLabels(): GmailLabel[]; diff --git a/types/google-apps-script/test/google-apps-script-tests.ts b/types/google-apps-script/test/google-apps-script-tests.ts index 49f146bad30d35..b8e0072961db50 100644 --- a/types/google-apps-script/test/google-apps-script-tests.ts +++ b/types/google-apps-script/test/google-apps-script-tests.ts @@ -1536,3 +1536,50 @@ function optionalFields() { console.log("Found an element"); } } + +// GmailMessage.createDraftReply and createDraftReplyAll with subject option +function testGmailDraftReplyWithSubject() { + const message = GmailApp.getMessageById("message-id"); + const thread = GmailApp.getThreadById("thread-id"); + + // Test GmailMessage.createDraftReply with subject option + message.createDraftReply("Reply body"); // $ExpectType GmailDraft + message.createDraftReply("Reply body", { subject: "Custom subject" }); // $ExpectType GmailDraft + // $ExpectType GmailDraft + message.createDraftReply("Reply body", { + subject: "Custom subject", + cc: "cc@example.com", + bcc: "bcc@example.com", + htmlBody: "

HTML reply

", + }); + + // Test GmailMessage.createDraftReplyAll with subject option + message.createDraftReplyAll("Reply all body"); // $ExpectType GmailDraft + message.createDraftReplyAll("Reply all body", { subject: "Custom subject for all" }); // $ExpectType GmailDraft + // $ExpectType GmailDraft + message.createDraftReplyAll("Reply all body", { + subject: "Custom subject for all", + cc: "cc@example.com", + htmlBody: "

HTML reply all

", + }); + + // Test GmailThread.createDraftReply with subject option + thread.createDraftReply("Thread reply body"); // $ExpectType GmailDraft + thread.createDraftReply("Thread reply body", { subject: "Thread custom subject" }); // $ExpectType GmailDraft + // $ExpectType GmailDraft + thread.createDraftReply("Thread reply body", { + subject: "Thread custom subject", + from: "from@example.com", + name: "Custom Name", + }); + + // Test GmailThread.createDraftReplyAll with subject option + thread.createDraftReplyAll("Thread reply all body"); // $ExpectType GmailDraft + thread.createDraftReplyAll("Thread reply all body", { subject: "Thread custom subject for all" }); // $ExpectType GmailDraft + // $ExpectType GmailDraft + thread.createDraftReplyAll("Thread reply all body", { + subject: "Thread custom subject for all", + replyTo: "replyto@example.com", + attachments: [DriveApp.getFileById("file-id").getBlob()], + }); +} From 7f5903ec07f33e0dd4c4f5a8acb789524ef01073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yamanqui=20Garc=C3=ADa=20Rosales?= Date: Sat, 18 Oct 2025 15:16:37 -0700 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73851=20Update?= =?UTF-8?q?d=20TextButtonStyle=20enum=20by=20@YamanquiChacala?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yamanqui GarcĂ­a Rosales --- .../google-apps-script.card-service.d.ts | 10 ++++++++-- .../test/google-apps-script-tests.ts | 5 +++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/types/google-apps-script/google-apps-script.card-service.d.ts b/types/google-apps-script/google-apps-script.card-service.d.ts index 00d13ae366f13a..d68bea53ef0e72 100644 --- a/types/google-apps-script/google-apps-script.card-service.d.ts +++ b/types/google-apps-script/google-apps-script.card-service.d.ts @@ -831,13 +831,19 @@ declare namespace GoogleAppsScript { /** * An enum that specifies the style for TextButton. * - * TEXT is the default; it renders a simple text button with clear background. + * OUTLINED is the default; it renders a simple text button with clear background. * FILLED buttons have a background color you can set with * TextButton.setBackgroundColor(backgroundColor). + * + * To call an enum, you call its parent class, name, and property. + * For example, CardService.TextButtonStyle.OUTLINED. */ enum TextButtonStyle { - TEXT, + OUTLINED, + /** @deprecated DO NOT USE */ TEXT, FILLED, + FILLED_TONAL, + BORDERLESS, } /** * A input field widget that accepts text input. diff --git a/types/google-apps-script/test/google-apps-script-tests.ts b/types/google-apps-script/test/google-apps-script-tests.ts index b8e0072961db50..bcd1d38e7c76e4 100644 --- a/types/google-apps-script/test/google-apps-script-tests.ts +++ b/types/google-apps-script/test/google-apps-script-tests.ts @@ -599,6 +599,11 @@ CardService.newAction().setInteraction(CardService.Interaction.OPEN_DIALOG); // CardService.newTextButton().setAltText("alt text"); // $ExpectType TextButton +CardService.newTextButton().setTextButtonStyle(CardService.TextButtonStyle.OUTLINED); // $ExpectType TextButton +CardService.newTextButton().setTextButtonStyle(CardService.TextButtonStyle.FILLED); // $ExpectType TextButton +CardService.newTextButton().setTextButtonStyle(CardService.TextButtonStyle.FILLED_TONAL); // $ExpectType TextButton +CardService.newTextButton().setTextButtonStyle(CardService.TextButtonStyle.BORDERLESS); // $ExpectType TextButton + CardService.newLinkPreview().setTitle("Smart chip title"); // $ExpectType LinkPreview CardService.newDecoratedText(); // $ExpectType DecoratedText From 43c54b3126990cd83ace8569b92110280f859dab Mon Sep 17 00:00:00 2001 From: Nick Elsbree Date: Sat, 18 Oct 2025 17:14:01 -0700 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73728=20[leafl?= =?UTF-8?q?et.gridlayer.googlemutant]=20Add=20mapId=20parameter=20to=20Goo?= =?UTF-8?q?gleMutantOptions.=20by=20@elsbree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/leaflet.gridlayer.googlemutant/index.d.ts | 2 ++ .../leaflet.gridlayer.googlemutant-tests.ts | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/types/leaflet.gridlayer.googlemutant/index.d.ts b/types/leaflet.gridlayer.googlemutant/index.d.ts index c2c51d5839ad1d..597f83827b69cc 100644 --- a/types/leaflet.gridlayer.googlemutant/index.d.ts +++ b/types/leaflet.gridlayer.googlemutant/index.d.ts @@ -87,6 +87,8 @@ declare module "leaflet" { * Google's map styles. */ styles?: GoogleMutantStyle[] | undefined; + + mapId?: string | undefined; } function googleMutant(options?: GoogleMutantOptions): GoogleMutant; diff --git a/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts b/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts index 1f2e0ccc579184..ad4bbf0b3ea8c4 100644 --- a/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts +++ b/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts @@ -22,3 +22,10 @@ const styled = L.gridLayer styled.addGoogleLayer("TrafficLayer").then(nativeTrafficLayer => { styled.removeGoogleLayer("TrafficLayer"); }); + +const withMapId = L.gridLayer + .googleMutant({ + type: "roadmap", + mapId: "mapId", + }) + .addTo(map); \ No newline at end of file From f97479effb6d307877adf0adcd69efbd3b07e746 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Sun, 19 Oct 2025 00:14:38 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A4=96=20dprint=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../leaflet.gridlayer.googlemutant-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts b/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts index ad4bbf0b3ea8c4..3b09a14ad4b84a 100644 --- a/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts +++ b/types/leaflet.gridlayer.googlemutant/leaflet.gridlayer.googlemutant-tests.ts @@ -28,4 +28,4 @@ const withMapId = L.gridLayer type: "roadmap", mapId: "mapId", }) - .addTo(map); \ No newline at end of file + .addTo(map);