Skip to content

Commit 882d5c3

Browse files
committed
feat: Add script.external_request scope and its corresponding test.
1 parent ac36c6b commit 882d5c3

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

.changeset/fiery-colts-send.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"google-workspace-developer-tools": patch
3+
---
4+
5+
Add Apps Script specific `https://www.googleapis.com/auth/script.external_request` which is not part of any API.

packages/vscode-extension/src/scopes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ for (const { title, version, documentationLink, scopes } of GOOGLE_APIS || []) {
6464
}
6565
}
6666

67+
SCOPES.set("https://www.googleapis.com/auth/script.external_request", {
68+
description: "Connect to an external service",
69+
apis: [],
70+
});
71+
6772
const RESTRICTED_SCOPES = [
6873
"https://www.googleapis.com/auth/chat.admin.delete",
6974
"https://www.googleapis.com/auth/chat.app.delete",

packages/vscode-extension/src/test/scopes.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,12 @@ suite("getScopeMarkdown", () => {
2727
const markdown = getScopeMarkdown("https://example.com");
2828
assert.strictEqual(markdown, "**https://example.com** (Unknown scope)");
2929
});
30+
31+
test("it returns scope for script.external_request", () => {
32+
const scope = SCOPES.get(
33+
"https://www.googleapis.com/auth/script.external_request",
34+
);
35+
assert.ok(scope);
36+
assert.strictEqual(scope?.description, "Connect to an external service");
37+
});
3038
});

0 commit comments

Comments
 (0)