Showing the changes to packages/plugins/openapi (2 of 13 files). Show all
Unified · Split
| @@ -17,6 +17,7 @@ export { · 16 unmodified lines | |||
| 17 | googleStandardUserOAuthPresets, | 17 | googleStandardUserOAuthPresets, |
| 18 | googleOAuthConsentScopes, | 18 | googleOAuthConsentScopes, |
| 19 | googleOAuthConsentScopesForPreset, | 19 | googleOAuthConsentScopesForPreset, |
| 20 | googleCatalogOAuthScopesForPreset, | ||
| 20 | googleServiceSlug, | 21 | googleServiceSlug, |
| 21 | googleAudienceWarningsForUrls, | 22 | googleAudienceWarningsForUrls, |
| 22 | googlePresetForDiscoveryUrl, | 23 | googlePresetForDiscoveryUrl, |
| @@ -317,16 +317,21 @@ const GOOGLE_HEALTH_CHECKS: Readonly<Record<string, HealthCheckSpec>> = { · 316 unmodified lines | |||
| 317 | "google-cloud-resource-manager": { operation: "cloudresourcemanager.projects.list" }, | 317 | "google-cloud-resource-manager": { operation: "cloudresourcemanager.projects.list" }, |
| 318 | }; | 318 | }; |
| 319 | 319 | ||
| 320 | /** Complete Google OAuth scope set requested by a catalog preset, including | ||
| 321 | * identity scopes used to label and distinguish connected accounts. */ | ||
| 322 | export const googleCatalogOAuthScopesForPreset = (presetId: string): readonly string[] => | ||
| 323 | compactGoogleOAuthScopes([ | ||
| 324 | ...GOOGLE_IDENTITY_SCOPES, | ||
| 325 | ...googleOAuthConsentScopesForPreset(presetId), | ||
| 326 | ]); | ||
| 327 | |||
| 320 | const googleCatalogAuthTemplate = (presetId: string) => [ | 328 | const googleCatalogAuthTemplate = (presetId: string) => [ |
| 321 | { | 329 | { |
| 322 | slug: GOOGLE_OAUTH_SECURITY_SCHEME, | 330 | slug: GOOGLE_OAUTH_SECURITY_SCHEME, |
| 323 | kind: "oauth2" as const, | 331 | kind: "oauth2" as const, |
| 324 | authorizationUrl: GOOGLE_OAUTH_AUTHORIZATION_URL, | 332 | authorizationUrl: GOOGLE_OAUTH_AUTHORIZATION_URL, |
| 325 | tokenUrl: GOOGLE_OAUTH_TOKEN_URL, | 333 | tokenUrl: GOOGLE_OAUTH_TOKEN_URL, |
| 326 | scopes: compactGoogleOAuthScopes([ | 334 | scopes: googleCatalogOAuthScopesForPreset(presetId), |
| 327 | ...GOOGLE_IDENTITY_SCOPES, | ||
| 328 | ...googleOAuthConsentScopesForPreset(presetId), | ||
| 329 | ]), | ||
| 330 | }, | 335 | }, |
| 331 | ]; | 336 | ]; |
| 332 | 337 | ||