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 cb37e56af3a729..ce4d86c51de74a 100644 --- a/types/google-apps-script/test/google-apps-script-tests.ts +++ b/types/google-apps-script/test/google-apps-script-tests.ts @@ -53,6 +53,20 @@ const testCalendarAppEventType = (): void => { type == GoogleAppsScript.Calendar.EventType.STANDARD; }; +// ScriptApp +// https://developers.google.com/apps-script/reference/script/script-app + +function testOAuthScopes() { + // https://developers.google.com/apps-script/reference/script/script-app#requireallscopesauthmode + ScriptApp.requireAllScopes(ScriptApp.AuthMode.FULL); + + // https://developers.google.com/apps-script/reference/script/script-app#requirescopesauthmode,-oauthscopes + ScriptApp.requireScopes(ScriptApp.AuthMode.FULL, [ + "https://www.googleapis.com/auth/documents", + "https://www.googleapis.com/auth/presentations", + ]); +} + // Advanced Services Slides.Presentations.Pages.getThumbnail("presentationId", "pageId"); diff --git a/types/jsend/index.d.ts b/types/jsend/index.d.ts index 0bb818b831c310..fd1821d137aac1 100644 --- a/types/jsend/index.d.ts +++ b/types/jsend/index.d.ts @@ -13,7 +13,7 @@ declare namespace jsend { } interface jsendCore { - success(data: Object): JSendObject; + success(data: Object | null): JSendObject; fail(data: Object): JSendObject; error(message: string | { message: string; code?: number | undefined; data?: Object | undefined }): JSendObject; }