Add/mcp and visma (#547)

* fix: simplify COMING_SOON_PROVIDERS to include only bjornlunden and briox

* feat: add supplier creation functionality and related operations

* feat: reorder and enhance OAuth scopes in Visma integration

* feat: implement create supplier functionality with validation and risk tier management
This commit is contained in:
Mattsson
2026-05-21 01:25:18 +02:00
committed by GitHub
parent e4d4d8e4dc
commit e71b4a9138
12 changed files with 637 additions and 19 deletions
+8 -3
View File
@@ -7,24 +7,29 @@ import {
} from '@/lib/http/fetch-with-timeout';
const DEFAULT_SCOPES = [
'offline_access',
'ea:api',
'offline_access',
'ea:sales',
'ea:accounting',
'ea:purchase',
'vls:api',
];
const EACCOUNTING_ACR_VALUE = 'service:44643EB1-3F76-4C1C-A672-402AE8085934';
const ALLOWED_PROMPT_VALUES = new Set(['none', 'login', 'consent', 'select_account']);
export function buildVismaAuthUrl(
config: OAuthConfig,
options?: { scopes?: string[]; state?: string; acrValues?: string },
options?: { scopes?: string[]; state?: string; acrValues?: string; prompt?: string },
): string {
const promptCandidate = options?.prompt ?? 'select_account';
const prompt = ALLOWED_PROMPT_VALUES.has(promptCandidate) ? promptCandidate : 'select_account';
const params = new URLSearchParams({
client_id: config.clientId,
redirect_uri: config.redirectUri,
response_type: 'code',
prompt,
acr_values: options?.acrValues ?? EACCOUNTING_ACR_VALUE,
});