feat: add presences read and write scopes to API keys

This commit is contained in:
ArnabChatterjee20k
2026-05-18 21:19:26 +05:30
parent eaf7927a08
commit 8efc8cdbb2
2 changed files with 15 additions and 1 deletions
+12
View File
@@ -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",
@@ -120,12 +120,14 @@
try {
const result = await sdk.forConsole.console.listProjectScopes();
const scopesById = new Map<string, ScopeDefinition>();
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: ''
});