import type { Scope } from '../../types.ee';

export const GLOBAL_OWNER_SCOPES: Scope[] = [
	'agent:create',
	'agent:read',
	'agent:update',
	'agent:delete',
	'agent:list',
	'agent:execute',
	'agent:publish',
	'agent:unpublish',
	'agent:manage',
	'aiAssistant:manage',
	'annotationTag:create',
	'annotationTag:read',
	'annotationTag:update',
	'annotationTag:delete',
	'annotationTag:list',
	'auditLogs:manage',
	'banner:dismiss',
	'credential:create',
	'credential:read',
	'credential:update',
	'credential:delete',
	'credential:list',
	'credential:share',
	'credential:unshare',
	'credential:shareGlobally',
	'credential:move',
	'community:register',
	'communityPackage:install',
	'communityPackage:uninstall',
	'communityPackage:update',
	'communityPackage:list',
	'eventBusDestination:create',
	'eventBusDestination:read',
	'eventBusDestination:update',
	'eventBusDestination:delete',
	'eventBusDestination:list',
	'eventBusDestination:test',
	'externalSecretsProvider:create',
	'externalSecretsProvider:read',
	'externalSecretsProvider:update',
	'externalSecretsProvider:delete',
	'externalSecretsProvider:list',
	'externalSecretsProvider:sync',
	'externalSecret:list',
	'ldap:manage',
	'ldap:sync',
	'license:manage',
	'logStreaming:manage',
	'orchestration:read',
	'saml:manage',
	'securityAudit:generate',
	'securitySettings:manage',
	'sourceControl:pull',
	'sourceControl:push',
	'sourceControl:manage',
	'tag:create',
	'tag:read',
	'tag:update',
	'tag:delete',
	'tag:list',
	'user:create',
	'user:read',
	'user:update',
	'user:delete',
	'user:list',
	'user:resetPassword',
	'user:generateInviteLink',
	'user:changeRole',
	'user:enforceMfa',
	'variable:create',
	'variable:read',
	'variable:update',
	'variable:delete',
	'variable:list',
	'projectVariable:create',
	'projectVariable:read',
	'projectVariable:update',
	'projectVariable:delete',
	'projectVariable:list',
	'workflow:create',
	'workflow:read',
	'workflow:export',
	'workflow:import',
	'workflow:update',
	'workflow:publish',
	'workflow:unpublish',
	'workflow:delete',
	'workflow:list',
	'workflow:share',
	'workflow:unshare',
	'workflow:execute',
	'workflow:execute-chat',
	'workflow:move',
	'workflow:enableRedaction',
	'workflow:disableRedaction',
	'workersView:manage',
	'project:list',
	'project:create',
	'project:read',
	'project:update',
	'project:delete',
	'insights:list',
	'insights:read',
	'folder:move',
	'folder:read',
	'folder:update',
	'folder:delete',
	'folder:create',
	'folder:list',
	'oidc:manage',
	'provisioning:manage',
	'dataTable:create',
	'dataTable:delete',
	'dataTable:read',
	'dataTable:update',
	'dataTable:list',
	'dataTable:listProject',
	'dataTable:readRow',
	'dataTable:writeRow',
	'dataTable:readColumn',
	'dataTable:writeColumn',
	'role:manage',
	'role:read',
	'mcp:manage',
	'mcp:oauth',
	'mcpApiKey:create',
	'mcpApiKey:rotate',
	'chatHub:manage',
	'chatHub:message',
	'chatHubAgent:create',
	'chatHubAgent:read',
	'chatHubAgent:update',
	'chatHubAgent:delete',
	'chatHubAgent:list',
	'breakingChanges:list',
	'execution:reveal',
	'apiKey:manage',
	'apiKey:list',
	'apiKey:create',
	'apiKey:delete',
	'apiKey:update',
	'encryptionKey:manage',
	'credentialResolver:create',
	'credentialResolver:read',
	'credentialResolver:update',
	'credentialResolver:delete',
	'credentialResolver:list',
	'instanceAi:message',
	'instanceAi:manage',
	'instanceAi:gateway',
	'instanceAi:eval',
	'roleMappingRule:create',
	'roleMappingRule:read',
	'roleMappingRule:update',
	'roleMappingRule:delete',
	'roleMappingRule:list',
	'otel:manage',
];

export const GLOBAL_ADMIN_SCOPES = GLOBAL_OWNER_SCOPES.concat();

export const GLOBAL_MEMBER_SCOPES: Scope[] = [
	'annotationTag:create',
	'annotationTag:read',
	'annotationTag:update',
	'annotationTag:delete',
	'annotationTag:list',
	'eventBusDestination:list',
	'eventBusDestination:test',
	'tag:create',
	'tag:read',
	'tag:update',
	'tag:list',
	'user:list',
	'variable:list',
	'variable:read',
	'dataTable:list',
	'mcp:oauth',
	'mcpApiKey:create',
	'mcpApiKey:rotate',
	'chatHub:message',
	'chatHubAgent:create',
	'chatHubAgent:read',
	'chatHubAgent:update',
	'chatHubAgent:delete',
	'chatHubAgent:list',
	'apiKey:list',
	'apiKey:create',
	'apiKey:delete',
	'apiKey:update',
	'credentialResolver:list',
	'instanceAi:message',
	'instanceAi:gateway',
];

export const GLOBAL_CHAT_USER_SCOPES: Scope[] = [
	'chatHub:message',
	'chatHubAgent:create',
	'chatHubAgent:read',
	'chatHubAgent:update',
	'chatHubAgent:delete',
	'chatHubAgent:list',
];
