mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
refactor: Add common DTOs and schemas for the redesigned users list (#16097)
This commit is contained in:
@@ -6,6 +6,8 @@ import type {
|
||||
Iso8601DateTimeString,
|
||||
IUserManagementSettings,
|
||||
IVersionNotificationSettings,
|
||||
ROLE,
|
||||
Role,
|
||||
} from '@n8n/api-types';
|
||||
import type { Scope } from '@n8n/permissions';
|
||||
import type { NodeCreatorTag } from '@n8n/design-system';
|
||||
@@ -55,7 +57,6 @@ import type {
|
||||
TRIGGER_NODE_CREATOR_VIEW,
|
||||
REGULAR_NODE_CREATOR_VIEW,
|
||||
AI_OTHERS_NODE_CREATOR_VIEW,
|
||||
ROLE,
|
||||
AI_UNCATEGORIZED_CATEGORY,
|
||||
AI_EVALUATION,
|
||||
} from '@/constants';
|
||||
@@ -568,9 +569,7 @@ export type IPersonalizationSurveyVersions =
|
||||
| IPersonalizationSurveyAnswersV3
|
||||
| IPersonalizationSurveyAnswersV4;
|
||||
|
||||
export type Roles = typeof ROLE;
|
||||
export type IRole = Roles[keyof Roles];
|
||||
export type InvitableRoleName = Roles['Member' | 'Admin'];
|
||||
export type InvitableRoleName = (typeof ROLE)['Member' | 'Admin'];
|
||||
|
||||
export interface IUserResponse {
|
||||
id: string;
|
||||
@@ -578,7 +577,7 @@ export interface IUserResponse {
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
createdAt?: string;
|
||||
role?: IRole;
|
||||
role?: Role;
|
||||
globalScopes?: Scope[];
|
||||
personalizationAnswers?: IPersonalizationSurveyVersions | null;
|
||||
isPending: boolean;
|
||||
@@ -613,7 +612,7 @@ export const enum UserManagementAuthenticationMethod {
|
||||
|
||||
export interface IPermissionGroup {
|
||||
loginStatus?: ILogInStatus[];
|
||||
role?: IRole[];
|
||||
role?: Role[];
|
||||
}
|
||||
|
||||
export interface IPermissionAllowGroup extends IPermissionGroup {
|
||||
@@ -1168,7 +1167,7 @@ export interface IInviteResponse {
|
||||
email: string;
|
||||
emailSent: boolean;
|
||||
inviteAcceptUrl: string;
|
||||
role: IRole;
|
||||
role: Role;
|
||||
};
|
||||
error?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user