Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/google-photos-openapi-presets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@executor-js/plugin-openapi": patch
---

Add Google Photos Library and Google Photos Picker to the Google API preset picker.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ exports[`classifies every Google service for bundle OAuth UX 1`] = `
"id": "google-people",
"oauthAudience": "standard-user",
},
{
"id": "google-photos-library",
"oauthAudience": "advanced-user",
},
{
"id": "google-photos-picker",
"oauthAudience": "advanced-user",
},
{
"id": "google-chat",
"oauthAudience": "workspace-admin",
Expand Down
2 changes: 2 additions & 0 deletions packages/plugins/openapi/src/sdk/google-presets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ it("keeps Select all limited to Google services that can use normal user OAuth",
expect(standardIds).toContain("google-people");
expect(standardIds).toContain("google-search-console");

expect(standardIds).not.toContain("google-photos-library");
expect(standardIds).not.toContain("google-photos-picker");
expect(standardIds).not.toContain("google-youtube-data");
expect(standardIds).not.toContain("google-cloud-resource-manager");
expect(standardIds).not.toContain("google-chat");
Expand Down
21 changes: 21 additions & 0 deletions packages/plugins/openapi/src/sdk/google-presets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ export const googleOpenApiPresets: readonly GoogleOpenApiPreset[] = [
icon: "https://fonts.gstatic.com/s/i/productlogos/contacts_2022/v2/192px.svg",
oauthAudience: "standard-user",
},
{
id: "google-photos-library",
name: "Google Photos Library",
summary: "Albums, uploads, and app-created media through Google Photos.",
url: gd("photoslibrary", "v1"),
icon: "https://www.gstatic.com/images/branding/product/2x/photos_96dp.png",
oauthAudience: "advanced-user",
},
{
id: "google-photos-picker",
name: "Google Photos Picker",
summary: "Picker sessions and user-selected Google Photos media items.",
url: "https://photospicker.googleapis.com/$discovery/rest?version=v1",
icon: "https://www.gstatic.com/images/branding/product/2x/photos_96dp.png",
oauthAudience: "advanced-user",
},
{
id: "google-chat",
name: "Google Chat",
Expand Down Expand Up @@ -212,6 +228,11 @@ export const googleOAuthConsentScopes: Readonly<Record<string, readonly string[]
"google-forms": ["https://www.googleapis.com/auth/forms.body"],
"google-tasks": ["https://www.googleapis.com/auth/tasks"],
"google-people": ["https://www.googleapis.com/auth/contacts"],
"google-photos-library": [
"https://www.googleapis.com/auth/photoslibrary.appendonly",
"https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata",
],
"google-photos-picker": ["https://www.googleapis.com/auth/photospicker.mediaitems.readonly"],
"google-chat": ["https://www.googleapis.com/auth/chat.spaces"],
"google-keep": ["https://www.googleapis.com/auth/keep"],
"google-youtube-data": ["https://www.googleapis.com/auth/youtube"],
Expand Down