From 8efc8cdbb2138427ea0c35fc88db52aa5e86a07c Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Mon, 18 May 2026 21:19:26 +0530 Subject: [PATCH] feat: add presences read and write scopes to API keys --- src/lib/constants.ts | 12 ++++++++++++ .../overview/api-keys/scopes.svelte | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib/constants.ts b/src/lib/constants.ts index d917925ae6..a022c93133 100644 --- a/src/lib/constants.ts +++ b/src/lib/constants.ts @@ -425,6 +425,18 @@ export const scopes: ScopeDefinition[] = [ category: 'Messaging', icon: 'send' }, + { + scope: 'presences.read', + description: "Access to read your project's presences", + category: 'Presences', + icon: 'user-group' + }, + { + scope: 'presences.write', + description: "Access to create, update, and delete your project's presences", + category: 'Presences', + icon: 'user-group' + }, { scope: 'locale.read', description: "Access to access your project's Locale service", diff --git a/src/routes/(console)/project-[region]-[project]/overview/api-keys/scopes.svelte b/src/routes/(console)/project-[region]-[project]/overview/api-keys/scopes.svelte index 2ffa59eb17..a187c260ab 100644 --- a/src/routes/(console)/project-[region]-[project]/overview/api-keys/scopes.svelte +++ b/src/routes/(console)/project-[region]-[project]/overview/api-keys/scopes.svelte @@ -120,12 +120,14 @@ try { const result = await sdk.forConsole.console.listProjectScopes(); const scopesById = new Map(); + const localByScope = new Map(localScopes.map((s) => [s.scope, s])); for (const scope of result.scopes) { + const fallback = localByScope.get(scope.$id); scopesById.set(scope.$id, { scope: scope.$id, description: scope.description, - category: normalizeCategory(scope.category), + category: normalizeCategory(scope.category || fallback?.category || ''), deprecated: scope.deprecated, icon: '' });