Skip to content

Commit 867c9e1

Browse files
committed
fix: include all google apis and scopes
1 parent 07ea272 commit 867c9e1

File tree

2 files changed

+10069
-508
lines changed

2 files changed

+10069
-508
lines changed

packages/vscode-extension/scripts/fetch-apis.ts

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@ const { data: apis } = await discovery.apis.list({
88
fields: "items(title,description,discoveryRestUrl,documentationLink,version)",
99
});
1010

11-
const allApis = (apis.items || [])
12-
.filter(
13-
(x) =>
14-
x.documentationLink?.includes("hangouts") ||
15-
x.documentationLink?.includes("workspace") ||
16-
x.documentationLink?.includes("apps-script"),
17-
)
18-
.sort((a, b) => a.id?.localeCompare(b.id ?? "") || 0);
11+
const allApis = (apis.items || []).sort(
12+
(a, b) => a.id?.localeCompare(b.id ?? "") || 0,
13+
);
1914
const chunkSize = 10;
2015
const apisWithScopes: Array<
2116
typeof apis & {
@@ -80,3 +75,13 @@ await fs.writeFile(
8075
export const GOOGLE_APIS = ${JSON.stringify(apisWithScopes, null, 2)};
8176
`,
8277
);
78+
79+
function _isWorkspaceAPI(api: {
80+
documentationLink?: string;
81+
}): boolean {
82+
return Boolean(
83+
api.documentationLink?.includes("hangouts") ||
84+
api.documentationLink?.includes("workspace") ||
85+
api.documentationLink?.includes("apps-script"),
86+
);
87+
}

0 commit comments

Comments
 (0)