import { t as IRestApiContext } from "./types2.mjs"; import { FeatureFlagPayloads, FeatureFlags, IPersonalizationSurveyAnswersV4, IUserSettings } from "n8n-workflow"; import { LoginRequestDto, PasswordUpdateRequestDto, SettingsUpdateRequestDto, User, UserSelfSettingsUpdateRequestDto, UserUpdateRequestDto, UsersList, UsersListFilterDto } from "@n8n/api-types"; import { AssignableGlobalRole, Scope } from "@n8n/permissions"; //#region src/api/users.d.ts type IPersonalizationSurveyAnswersV1 = { codingSkill?: string | null; companyIndustry?: string[] | null; companySize?: string | null; otherCompanyIndustry?: string | null; otherWorkArea?: string | null; workArea?: string[] | string | null; }; type IPersonalizationSurveyAnswersV2 = { version: 'v2'; automationGoal?: string | null; codingSkill?: string | null; companyIndustryExtended?: string[] | null; companySize?: string | null; companyType?: string | null; customerType?: string | null; mspFocus?: string[] | null; mspFocusOther?: string | null; otherAutomationGoal?: string | null; otherCompanyIndustryExtended?: string[] | null; }; type IPersonalizationSurveyAnswersV3 = { version: 'v3'; automationGoal?: string | null; otherAutomationGoal?: string | null; companyIndustryExtended?: string[] | null; otherCompanyIndustryExtended?: string[] | null; companySize?: string | null; companyType?: string | null; automationGoalSm?: string[] | null; automationGoalSmOther?: string | null; usageModes?: string[] | null; email?: string | null; }; type IPersonalizationLatestVersion = IPersonalizationSurveyAnswersV4; type IPersonalizationSurveyVersions = IPersonalizationSurveyAnswersV1 | IPersonalizationSurveyAnswersV2 | IPersonalizationSurveyAnswersV3 | IPersonalizationSurveyAnswersV4; interface IUserResponse extends User { globalScopes?: Scope[]; personalizationAnswers?: IPersonalizationSurveyVersions | null; settings?: IUserSettings | null; } interface CurrentUserResponse extends IUserResponse { featureFlags?: FeatureFlags; featureFlagPayloads?: FeatureFlagPayloads; } interface IUser extends IUserResponse { isDefaultUser: boolean; isPendingUser: boolean; inviteAcceptUrl?: string; fullName?: string; createdAt?: string; mfaEnabled: boolean; mfaAuthenticated?: boolean; } declare function loginCurrentUser(context: IRestApiContext): Promise; declare function login(context: IRestApiContext, params: LoginRequestDto): Promise; declare function logout(context: IRestApiContext): Promise; declare function setupOwner(context: IRestApiContext, params: { firstName: string; lastName: string; email: string; password: string; }): Promise; declare function validateSignupToken(context: IRestApiContext, params: { token: string; }): Promise<{ inviter: { firstName: string; lastName: string; }; }>; declare function sendForgotPasswordEmail(context: IRestApiContext, params: { email: string; }): Promise; declare function validatePasswordToken(context: IRestApiContext, params: { token: string; }): Promise; declare function changePassword(context: IRestApiContext, params: { token: string; password: string; mfaCode?: string; }): Promise; declare function updateCurrentUser(context: IRestApiContext, params: UserUpdateRequestDto): Promise; declare function updateCurrentUserSettings(context: IRestApiContext, settings: UserSelfSettingsUpdateRequestDto): Promise; declare function updateOtherUserSettings(context: IRestApiContext, userId: string, settings: SettingsUpdateRequestDto): Promise; declare function updateCurrentUserPassword(context: IRestApiContext, params: PasswordUpdateRequestDto): Promise; declare function deleteUser(context: IRestApiContext, { id, transferId }: { id: string; transferId?: string; }): Promise; declare function getUsers(context: IRestApiContext, filter?: UsersListFilterDto): Promise; declare function getInviteLink(context: IRestApiContext, { id }: { id: string; }): Promise<{ link: string; }>; declare function generateInviteLink(context: IRestApiContext, { id }: { id: string; }): Promise<{ link: string; }>; declare function getPasswordResetLink(context: IRestApiContext, { id }: { id: string; }): Promise<{ link: string; }>; declare function submitPersonalizationSurvey(context: IRestApiContext, params: IPersonalizationLatestVersion): Promise; interface UpdateGlobalRolePayload { id: string; newRoleName: AssignableGlobalRole; } declare function updateGlobalRole(context: IRestApiContext, { id, newRoleName }: UpdateGlobalRolePayload): Promise; //#endregion export { updateCurrentUserPassword as C, validatePasswordToken as D, updateOtherUserSettings as E, validateSignupToken as O, updateCurrentUser as S, updateGlobalRole as T, loginCurrentUser as _, IPersonalizationSurveyAnswersV3 as a, setupOwner as b, IUserResponse as c, deleteUser as d, generateInviteLink as f, login as g, getUsers as h, IPersonalizationSurveyAnswersV2 as i, UpdateGlobalRolePayload as l, getPasswordResetLink as m, IPersonalizationLatestVersion as n, IPersonalizationSurveyVersions as o, getInviteLink as p, IPersonalizationSurveyAnswersV1 as r, IUser as s, CurrentUserResponse as t, changePassword as u, logout as v, updateCurrentUserSettings as w, submitPersonalizationSurvey as x, sendForgotPasswordEmail as y }; //# sourceMappingURL=users.d.mts.map