refactor(editor): Migrate sso to @n8n/rest-api-client (no-changelog) (#16145)

This commit is contained in:
Alex Grozav
2025-06-10 09:02:54 +02:00
committed by GitHub
parent 9cf7293990
commit 00083d5ed6
6 changed files with 13 additions and 12 deletions

View File

@@ -8,5 +8,6 @@ export * from './nodeTypes';
export * from './npsSurvey';
export * from './orchestration';
export * from './roles';
export * from './sso';
export * from './ui';
export * from './webhooks';

View File

@@ -1,7 +1,12 @@
import type { SamlPreferences, SamlToggleDto } from '@n8n/api-types';
import { makeRestApiRequest } from '@n8n/rest-api-client';
import type { SamlPreferencesExtractedData } from '@/Interface';
import type { IRestApiContext } from '@n8n/rest-api-client';
import type { IRestApiContext } from '../types';
import { makeRestApiRequest } from '../utils';
export type SamlPreferencesExtractedData = {
entityID: string;
returnUrl: string;
};
export const initSSO = async (context: IRestApiContext, redirectUrl = ''): Promise<string> => {
return await makeRestApiRequest(context, 'GET', `/sso/saml/initsso?redirect=${redirectUrl}`);

View File

@@ -1368,11 +1368,6 @@ export type ExecutionsQueryFilter = {
vote?: ExecutionFilterVote;
};
export type SamlPreferencesExtractedData = {
entityID: string;
returnUrl: string;
};
export declare namespace Cloud {
export interface PlanData {
planId: number;

View File

@@ -1,7 +1,7 @@
import type { SamlPreferences } from '@n8n/api-types';
import type { Server, Request } from 'miragejs';
import { Response } from 'miragejs';
import type { SamlPreferencesExtractedData } from '@/Interface';
import type { SamlPreferencesExtractedData } from '@n8n/rest-api-client/api/sso';
import { faker } from '@faker-js/faker';
import type { AppSchema } from '@/__tests__/server/types';
import { jsonParse } from 'n8n-workflow';

View File

@@ -5,8 +5,8 @@ import { defineStore } from 'pinia';
import { EnterpriseEditionFeature } from '@/constants';
import { useRootStore } from '@n8n/stores/useRootStore';
import { useSettingsStore } from '@/stores/settings.store';
import * as ssoApi from '@/api/sso';
import type { SamlPreferencesExtractedData } from '@/Interface';
import * as ssoApi from '@n8n/rest-api-client/api/sso';
import type { SamlPreferencesExtractedData } from '@n8n/rest-api-client/api/sso';
import { updateCurrentUser } from '@/api/users';
import { useUsersStore } from '@/stores/users.store';

View File

@@ -12,7 +12,7 @@ import { createComponentRenderer } from '@/__tests__/render';
import { EnterpriseEditionFeature } from '@/constants';
import { nextTick } from 'vue';
import { usePageRedirectionHelper } from '@/composables/usePageRedirectionHelper';
import type { SamlPreferencesExtractedData } from '@/Interface';
import type { SamlPreferencesExtractedData } from '@n8n/rest-api-client/api/sso';
const renderView = createComponentRenderer(SettingsSso);