import { AxiosResponse } from 'axios'; import * as jwt from 'jsonwebtoken'; import { Config } from './config'; import Request from './request'; import type { ProductInfo } from './order'; import { CasdoorResponse } from './util'; import { CasdoorMfaProps } from './mfa'; import { Role } from './role'; import { Permission } from './permission'; export declare const DefaultJwtAlgorithms: jwt.Algorithm[]; export interface User { owner: string; name: string; createdTime: string; updatedTime?: string; deletedTime?: string; id?: string; externalId?: string; type?: string; password?: string; passwordSalt?: string; passwordType?: string; displayName?: string; firstName?: string; lastName?: string; avatar?: string; avatarType?: string; permanentAvatar?: string; email?: string; emailVerified?: boolean; phone?: string; countryCode?: string; region?: string; location?: string; address?: string[]; affiliation?: string; title?: string; idCardType?: string; idCard?: string; homepage?: string; bio?: string; tag?: string; language?: string; gender?: string; birthday?: string; education?: string; score?: number; karma?: number; ranking?: number; balance?: number; currency?: string; isDefaultAvatar?: boolean; isOnline?: boolean; isAdmin?: boolean; isForbidden?: boolean; isDeleted?: boolean; signupApplication?: string; hash?: string; preHash?: string; accessKey?: string; accessSecret?: string; accessToken?: string; createdIp?: string; lastSigninTime?: string; lastSigninIp?: string; github?: string; google?: string; qq?: string; weChat?: string; facebook?: string; dingTalk?: string; weibo?: string; gitee?: string; linkedIn?: string; wecom?: string; lark?: string; gitlab?: string; adfs?: string; baidu?: string; alipay?: string; casdoor?: string; infoflow?: string; apple?: string; azureAD?: string; azureADB2c?: string; slack?: string; steam?: string; bilibili?: string; okta?: string; douyin?: string; line?: string; amazon?: string; auth0?: string; battleNet?: string; bitbucket?: string; box?: string; cloudFoundry?: string; dailymotion?: string; deezer?: string; digitalOcean?: string; discord?: string; dropbox?: string; eveOnline?: string; fitbit?: string; gitea?: string; heroku?: string; influxCloud?: string; instagram?: string; intercom?: string; kakao?: string; lastfm?: string; mailru?: string; meetup?: string; microsoftOnline?: string; naver?: string; nextcloud?: string; oneDrive?: string; oura?: string; patreon?: string; paypal?: string; salesForce?: string; shopify?: string; soundcloud?: string; spotify?: string; strava?: string; stripe?: string; tiktok?: string; tumblr?: string; twitch?: string; twitter?: string; typetalk?: string; uber?: string; vk?: string; wepay?: string; xero?: string; yahoo?: string; yammer?: string; yandex?: string; zoom?: string; metaMask?: string; web3Onboard?: string; custom?: string; preferredMfaType?: string; recoveryCodes?: string[]; totpSecret?: string; mfaPhoneEnabled?: boolean; mfaEmailEnabled?: boolean; multiFactorAuths?: CasdoorMfaProps[]; invitation?: string; invitationCode?: string; faceIds?: FaceId[]; ldap?: string; properties?: Record; roles?: Role[]; permissions?: Permission[]; groups?: string[]; lastSigninWrongTime?: string; signinWrongTimes?: number; managedAccounts?: ManagedAccount[]; mfaAccounts?: MfaAccount[]; needUpdatePassword?: boolean; ipWhitelist?: string; addresses?: Address[]; realName?: string; isVerified?: boolean; balanceCredit?: number; balanceCurrency?: string; registerType?: string; registerSource?: string; originalToken?: string; originalRefreshToken?: string; wechat?: string; dingtalk?: string; linkedin?: string; azuread?: string; azureadb2c?: string; kwai?: string; battlenet?: string; cloudfoundry?: string; digitalocean?: string; eveonline?: string; influxcloud?: string; microsoftonline?: string; onedrive?: string; salesforce?: string; telegram?: string; metamask?: string; web3onboard?: string; oidc?: string; custom2?: string; custom3?: string; custom4?: string; custom5?: string; custom6?: string; custom7?: string; custom8?: string; custom9?: string; custom10?: string; webauthnCredentials?: unknown; mfaRadiusEnabled?: boolean; mfaRadiusUsername?: string; mfaRadiusProvider?: string; mfaPushEnabled?: boolean; mfaPushReceiver?: string; mfaPushProvider?: string; cart?: ProductInfo[]; uidNumber?: number; thirdPartyLinks?: ThirdPartyLink[]; lastChangePasswordTime?: string; mfaItems?: MfaItem[]; mfaRememberDeadline?: string; applicationScopes?: ConsentRecord[]; } export interface ManagedAccount { application?: string; username?: string; password?: string; signinUrl?: string; } export interface MfaAccount { accountName: string; issuer: string; secretKey: string; origin?: string; } export interface FaceId { name: string; faceIdData: number[]; imageUrl?: string; } export interface OAuthToken { access_token: string; id_token?: string; refresh_token: string; token_type?: string; expires_in?: number; scope?: string; } export interface SetPassword { owner: string; name: string; newPassword?: string; oldPassword?: string; } export declare class UserSDK { private config; private readonly request; constructor(config: Config, request: Request); getAuthToken(code: string): Promise<{ access_token: string; refresh_token: string; }>; refreshToken(refreshToken: string, scope?: string): Promise<{ access_token: string; refresh_token: string; }>; getOAuthTokenByPassword(username: string, password: string): Promise; impersonateUser(username: string, masterPassword: string): Promise; parseJwtToken(token: string): User; getUsers(): Promise, any>>; getUser(id: string): Promise, any>>; getGlobalUsers(): Promise, any>>; getSortedUsers(sorter: string, limit: number): Promise, any>>; getAccount(): Promise, any>>; getUserByEmail(email: string): Promise, any>>; getUserByPhone(phone: string): Promise, any>>; getUserByUserId(userId: string): Promise, any>>; private getUserBy; getUserCount(isOnline: boolean): Promise>; modifyUser(method: string, user: User, columns?: string[]): Promise, any>>; getPaginationUsers(p: number, pageSize: number, queryMap?: Record): Promise, any>>; updateUserForColumns(user: User, columns: string[]): Promise, any>>; updateUserById(id: string, user: User): Promise, any>>; updateUserByUserId(owner: string, userId: string, user: User): Promise, any>>; checkUserPassword(user: User): Promise, any>>; addUser(user: User): Promise, any>>; updateUser(user: User): Promise, any>>; deleteUser(user: User): Promise, any>>; setPassword(data: SetPassword): Promise, any>>; logout(accessToken: string): Promise, any>>; logoutCurrentSession(accessToken: string): Promise, any>>; private ssoLogout; } export interface Address { tag?: string; line1?: string; line2?: string; city?: string; state?: string; zipCode?: string; region?: string; } export interface ThirdPartyLink { owner?: string; userName?: string; providerName?: string; providerId?: string; createdTime?: string; } export interface MfaItem { name?: string; rule?: string; } export interface ConsentRecord { application?: string; grantedScopes?: string[]; }