User
Extends
default
<UserSchema
,IUser
>
Implements
Constructors
new User()
new User(
data
?):User
Creates a new class instance
Parameters
• data?: IUser
Returns
Inherited from
Wrapper<UserSchema, IUser>.constructor
Source
new User()
new User(
client
,data
?):User
Parameters
• client: Client
• data?: IUser
Returns
Inherited from
Wrapper<UserSchema, IUser>.constructor
Source
Properties
accessLevel?
optional
readonly
accessLevel:UserAccessLevel
Implementation of
Source
avatar?
optional
readonly
avatar:AvatarURL
The user's avatar URL.
Implementation of
Source
badgeCounts?
optional
readonly
badgeCounts:Record
<BadgeCategory
,number
>
The user's badge counts by category.
Implementation of
Source
bio?
optional
readonly
bio:string
The user's bio.
Implementation of
Source
canAccessDistrictsHomepage?
optional
readonly
canAccessDistrictsHomepage:boolean
Implementation of
IUser
.canAccessDistrictsHomepage
Source
canHellban?
optional
readonly
canHellban:boolean
Implementation of
Source
canMessageUsers?
optional
readonly
canMessageUsers:boolean
Whether the user can send Guardian messages.
Implementation of
Source
canModifyCoaches?
optional
readonly
canModifyCoaches:boolean
Implementation of
Source
child?
optional
readonly
child:boolean
Whether the user is a child account.
Implementation of
Source
client?
optional
client:Client
The client that this base was fetched with.
Inherited from
Wrapper.client
Source
completedVideos?
optional
readonly
completedVideos:number
Implementation of
Source
creator?
optional
readonly
creator:boolean
Implementation of
Source
curator?
optional
readonly
curator:boolean
Implementation of
Source
developer?
optional
readonly
developer:boolean
Implementation of
Source
email?
optional
readonly
email:string
The user's email address. Required authentication.
Implementation of
Source
emails?
optional
readonly
emails:string
[]
The user's authentication email addresses. Required authentication.
Implementation of
Source
formalTeacher?
optional
readonly
formalTeacher:boolean
Source
googleID?
optional
readonly
googleID:null
|string
Implementation of
Source
hasAccessToAIGuideDev?
optional
readonly
hasAccessToAIGuideDev:boolean
Implementation of
Source
hasAccessToAIGuideTeacher?
optional
readonly
hasAccessToAIGuideTeacher:boolean
Implementation of
IUser
.hasAccessToAIGuideTeacher
Source
hasChildren?
optional
readonly
hasChildren:boolean
Implementation of
Source
hasClasses?
optional
readonly
hasClasses:boolean
Implementation of
Source
hasCoach?
optional
readonly
hasCoach:boolean
Implementation of
Source
hasStudents?
optional
readonly
hasStudents:boolean
Implementation of
Source
joined?
optional
readonly
joined:Date
The date the user created their account.
Implementation of
Source
kaid?
optional
readonly
kaid:null
| `kaid_${number}`
The user's KAID.
Implementation of
Source
key?
optional
readonly
key:string
Implementation of
Source
midsignupPhantom?
optional
readonly
midsignupPhantom:boolean
Implementation of
Source
moderator?
optional
readonly
moderator:boolean
Whether the user is a Guardian.
Implementation of
Source
newNotifications?
optional
readonly
newNotifications:number
The number of unread notifications.
Implementation of
Source
nickname?
optional
readonly
nickname:string
The user's nickname. May in rare cases be null
.
Implementation of
Source
orphan?
optional
readonly
orphan:boolean
Implementation of
Source
parent?
optional
readonly
parent:boolean
Implementation of
Source
phantom?
optional
readonly
phantom:boolean
Implementation of
Source
points?
optional
readonly
points:number
The user's energy points.
Implementation of
Source
programs?
optional
readonly
programs:Program
[]
Implementation of
Source
publisher?
optional
readonly
publisher:boolean
Implementation of
Source
qualarooID?
optional
readonly
qualarooID:null
|string
Implementation of
Source
rawData?
optional
rawData:RecursivePartial
<UserSchema
<AvatarSchema
,ProfileSchema
,ListProgramsSchema
<unknown
>>>
The raw base schema data
Remarks
Only set if the base was created from a user schema.
Inherited from
Wrapper.rawData
Source
self?
optional
readonly
self:boolean
Whether the user is the currently authenticated user.
Implementation of
Source
statistics?
optional
readonly
statistics:UserStatistics
Implementation of
Source
teacher?
optional
readonly
teacher:boolean
Implementation of
Source
username?
optional
readonly
username:null
|string
The user's username. May not be set by the user.
Implementation of
Source
Accessors
url
get
url():null
| `http${string}://${string}khanacademy.${string}/profile/${string}`
Returns
null
| `http${string}://${string}khanacademy.${string}/profile/${string}`
Source
Methods
#resolveIdentifier()
private
#resolveIdentifier():string
Returns
string
Source
copy()
copy(
data
):User
Updates data into the class
Parameters
• data: IUser
The data to copy from
Returns
The class instance
Inherited from
Wrapper.copy
Source
copyFromSchema()
copyFromSchema(
schema
):User
Updates data from a schema into the instance
Parameters
• schema: RecursivePartial
<UserSchema
<AvatarSchema
, ProfileSchema
, ListProgramsSchema
<unknown
>>>
The schema to copy from
Returns
The class instance
Inherited from
Wrapper.copyFromSchema
Source
get()
get(
client
):Promise
<User
>
Fetches the user's profile using a getFullUserProfile
query and updates the user's data
Parameters
• client: Client
= undefined
Optional client to use for the request
Returns
Promise
<User
>
Overrides
Wrapper.get
See
Source
getAllPrograms()
getAllPrograms(
client
,sort
?,limit
?):Promise
<User
>
Parameters
• client: Client
= undefined
• sort?: ListProgramSortOrder
• limit?: number
Returns
Promise
<User
>
See
Source
getAvatar()
getAvatar(
client
):Promise
<"https://www.khanacademy.org/images/avatars/svg/blobby-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/blobby-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/blobby-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/blobby-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/area-52-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/area-52-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/area-52-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/area-52-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/eggleston-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/eggleston-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/eggleston-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/eggleston-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/scuttlebug-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/scuttlebug-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/scuttlebug-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/scuttlebug-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/boggle-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/boggle-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/boggle-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/boggle-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/sneak-peak-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/sneak-peak-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/sneak-peak-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/sneak-peak-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/stelly-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/stelly-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/stelly-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/stelly-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/cacteye-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/cacteye-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/cacteye-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/cacteye-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/leaf-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/leaf-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/leaf-grey.svg"
|"https://www.khanacademy.org/images/avatars/svg/leaf-red.svg"
|"https://www.khanacademy.org/images/avatars/svg/leaf-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/leaf-yellow.svg"
|"https://www.khanacademy.org/images/avatars/svg/leafers-seed.svg"
|"https://www.khanacademy.org/images/avatars/svg/leafers-seedling.svg"
|"https://www.khanacademy.org/images/avatars/svg/leafers-sapling.svg"
|"https://www.khanacademy.org/images/avatars/svg/leafers-tree.svg"
|"https://www.khanacademy.org/images/avatars/svg/leafers-ultimate.svg"
|"https://www.khanacademy.org/images/avatars/svg/piceratops-seed.svg"
|"https://www.khanacademy.org/images/avatars/svg/piceratops-seedling.svg"
|"https://www.khanacademy.org/images/avatars/svg/piceratops-sapling.svg"
|"https://www.khanacademy.org/images/avatars/svg/piceratops-tree.svg"
|"https://www.khanacademy.org/images/avatars/svg/piceratops-ultimate.svg"
|"https://www.khanacademy.org/images/avatars/svg/duskpin-seed.svg"
|"https://www.khanacademy.org/images/avatars/svg/duskpin-seedling.svg"
|"https://www.khanacademy.org/images/avatars/svg/duskpin-sapling.svg"
|"https://www.khanacademy.org/images/avatars/svg/duskpin-tree.svg"
|"https://www.khanacademy.org/images/avatars/svg/duskpin-ultimate.svg"
|"https://www.khanacademy.org/images/avatars/svg/primosaur-seed.svg"
|"https://www.khanacademy.org/images/avatars/svg/primosaur-seedling.svg"
|"https://www.khanacademy.org/images/avatars/svg/primosaur-sapling.svg"
|"https://www.khanacademy.org/images/avatars/svg/primosaur-tree.svg"
|"https://www.khanacademy.org/images/avatars/svg/primosaur-ultimate.svg"
|"https://www.khanacademy.org/images/avatars/svg/starky-seed.svg"
|"https://www.khanacademy.org/images/avatars/svg/starky-seedling.svg"
|"https://www.khanacademy.org/images/avatars/svg/starky-sapling.svg"
|"https://www.khanacademy.org/images/avatars/svg/starky-tree.svg"
|"https://www.khanacademy.org/images/avatars/svg/starky-ultimate.svg"
|"https://www.khanacademy.org/images/avatars/svg/aqualine-seed.svg"
|"https://www.khanacademy.org/images/avatars/svg/aqualine-seedling.svg"
|"https://www.khanacademy.org/images/avatars/svg/aqualine-sapling.svg"
|"https://www.khanacademy.org/images/avatars/svg/aqualine-tree.svg"
|"https://www.khanacademy.org/images/avatars/svg/aqualine-ultimate.svg"
|"https://www.khanacademy.org/images/avatars/svg/spunky-sam.svg"
|"https://www.khanacademy.org/images/avatars/svg/spunky-sam-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/spunky-sam-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/spunky-sam-red.svg"
|"https://www.khanacademy.org/images/avatars/svg/marcimus.svg"
|"https://www.khanacademy.org/images/avatars/svg/marcimus-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/marcimus-red.svg"
|"https://www.khanacademy.org/images/avatars/svg/marcimus-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pink.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pink-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pink-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/robot_female_1.svg"
|"https://www.khanacademy.org/images/avatars/svg/robot_female_2.svg"
|"https://www.khanacademy.org/images/avatars/svg/robot_female_3.svg"
|"https://www.khanacademy.org/images/avatars/svg/robot_male_1.svg"
|"https://www.khanacademy.org/images/avatars/svg/robot_male_2.svg"
|"https://www.khanacademy.org/images/avatars/svg/robot_male_3.svg"
|"https://www.khanacademy.org/images/avatars/svg/orange-juice-squid.svg"
|"https://www.khanacademy.org/images/avatars/svg/purple-pi.svg"
|"https://www.khanacademy.org/images/avatars/svg/purple-pi-pink.svg"
|"https://www.khanacademy.org/images/avatars/svg/purple-pi-teal.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pants.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pants-green.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pants-orange.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pants-pink.svg"
|"https://www.khanacademy.org/images/avatars/svg/mr-pants-purple.svg"
|"https://www.khanacademy.org/images/avatars/svg/old-spice-man.svg"
|"https://www.khanacademy.org/images/avatars/svg/old-spice-man-blue.svg"
|"https://www.khanacademy.org/images/avatars/svg/cs-winston.svg"
|"https://www.khanacademy.org/images/avatars/svg/cs-winston-baby.svg"
|"https://www.khanacademy.org/images/avatars/svg/cs-ohnoes.svg"
|"https://www.khanacademy.org/images/avatars/svg/cs-hopper-happy.svg"
|"https://www.khanacademy.org/images/avatars/svg/cs-hopper-jumping.svg"
|"https://www.khanacademy.org/images/avatars/svg/cs-hopper-cool.svg"
|"https://www.khanacademy.org/images/avatars/blobby-green.png"
|"https://www.khanacademy.org/images/avatars/blobby-yellow.png"
|"https://www.khanacademy.org/images/avatars/blobby-blue.png"
|"https://www.khanacademy.org/images/avatars/blobby-purple.png"
|"https://www.khanacademy.org/images/avatars/area-52-yellow.png"
|"https://www.khanacademy.org/images/avatars/area-52-blue.png"
|"https://www.khanacademy.org/images/avatars/area-52-green.png"
|"https://www.khanacademy.org/images/avatars/area-52-purple.png"
|"https://www.khanacademy.org/images/avatars/eggleston-blue.png"
|"https://www.khanacademy.org/images/avatars/eggleston-yellow.png"
|"https://www.khanacademy.org/images/avatars/eggleston-green.png"
|"https://www.khanacademy.org/images/avatars/eggleston-orange.png"
|"https://www.khanacademy.org/images/avatars/scuttlebug-purple.png"
|"https://www.khanacademy.org/images/avatars/scuttlebug-yellow.png"
|"https://www.khanacademy.org/images/avatars/scuttlebug-blue.png"
|"https://www.khanacademy.org/images/avatars/scuttlebug-green.png"
|"https://www.khanacademy.org/images/avatars/boggle-yellow.png"
|"https://www.khanacademy.org/images/avatars/boggle-blue.png"
|"https://www.khanacademy.org/images/avatars/boggle-green.png"
|"https://www.khanacademy.org/images/avatars/boggle-purple.png"
|"https://www.khanacademy.org/images/avatars/sneak-peak-green.png"
|"https://www.khanacademy.org/images/avatars/sneak-peak-yellow.png"
|"https://www.khanacademy.org/images/avatars/sneak-peak-blue.png"
|"https://www.khanacademy.org/images/avatars/sneak-peak-purple.png"
|"https://www.khanacademy.org/images/avatars/stelly-blue.png"
|"https://www.khanacademy.org/images/avatars/stelly-yellow.png"
|"https://www.khanacademy.org/images/avatars/stelly-green.png"
|"https://www.khanacademy.org/images/avatars/stelly-orange.png"
|"https://www.khanacademy.org/images/avatars/cacteye-purple.png"
|"https://www.khanacademy.org/images/avatars/cacteye-yellow.png"
|"https://www.khanacademy.org/images/avatars/cacteye-blue.png"
|"https://www.khanacademy.org/images/avatars/cacteye-green.png"
|"https://www.khanacademy.org/images/avatars/leaf-green.png"
|"https://www.khanacademy.org/images/avatars/leaf-blue.png"
|"https://www.khanacademy.org/images/avatars/leaf-grey.png"
|"https://www.khanacademy.org/images/avatars/leaf-red.png"
|"https://www.khanacademy.org/images/avatars/leaf-orange.png"
|"https://www.khanacademy.org/images/avatars/leaf-yellow.png"
|"https://www.khanacademy.org/images/avatars/leafers-seed.png"
|"https://www.khanacademy.org/images/avatars/leafers-seedling.png"
|"https://www.khanacademy.org/images/avatars/leafers-sapling.png"
|"https://www.khanacademy.org/images/avatars/leafers-tree.png"
|"https://www.khanacademy.org/images/avatars/leafers-ultimate.png"
|"https://www.khanacademy.org/images/avatars/piceratops-seed.png"
|"https://www.khanacademy.org/images/avatars/piceratops-seedling.png"
|"https://www.khanacademy.org/images/avatars/piceratops-sapling.png"
|"https://www.khanacademy.org/images/avatars/piceratops-tree.png"
|"https://www.khanacademy.org/images/avatars/piceratops-ultimate.png"
|"https://www.khanacademy.org/images/avatars/duskpin-seed.png"
|"https://www.khanacademy.org/images/avatars/duskpin-seedling.png"
|"https://www.khanacademy.org/images/avatars/duskpin-sapling.png"
|"https://www.khanacademy.org/images/avatars/duskpin-tree.png"
|"https://www.khanacademy.org/images/avatars/duskpin-ultimate.png"
|"https://www.khanacademy.org/images/avatars/primosaur-seed.png"
|"https://www.khanacademy.org/images/avatars/primosaur-seedling.png"
|"https://www.khanacademy.org/images/avatars/primosaur-sapling.png"
|"https://www.khanacademy.org/images/avatars/primosaur-tree.png"
|"https://www.khanacademy.org/images/avatars/primosaur-ultimate.png"
|"https://www.khanacademy.org/images/avatars/starky-seed.png"
|"https://www.khanacademy.org/images/avatars/starky-seedling.png"
|"https://www.khanacademy.org/images/avatars/starky-sapling.png"
|"https://www.khanacademy.org/images/avatars/starky-tree.png"
|"https://www.khanacademy.org/images/avatars/starky-ultimate.png"
|"https://www.khanacademy.org/images/avatars/aqualine-seed.png"
|"https://www.khanacademy.org/images/avatars/aqualine-seedling.png"
|"https://www.khanacademy.org/images/avatars/aqualine-sapling.png"
|"https://www.khanacademy.org/images/avatars/aqualine-tree.png"
|"https://www.khanacademy.org/images/avatars/aqualine-ultimate.png"
|"https://www.khanacademy.org/images/avatars/spunky-sam.png"
|"https://www.khanacademy.org/images/avatars/spunky-sam-green.png"
|"https://www.khanacademy.org/images/avatars/spunky-sam-orange.png"
|"https://www.khanacademy.org/images/avatars/spunky-sam-red.png"
|"https://www.khanacademy.org/images/avatars/marcimus.png"
|"https://www.khanacademy.org/images/avatars/marcimus-orange.png"
|"https://www.khanacademy.org/images/avatars/marcimus-red.png"
|"https://www.khanacademy.org/images/avatars/marcimus-purple.png"
|"https://www.khanacademy.org/images/avatars/mr-pink.png"
|"https://www.khanacademy.org/images/avatars/mr-pink-green.png"
|"https://www.khanacademy.org/images/avatars/mr-pink-orange.png"
|"https://www.khanacademy.org/images/avatars/robot_female_1.png"
|"https://www.khanacademy.org/images/avatars/robot_female_2.png"
|"https://www.khanacademy.org/images/avatars/robot_female_3.png"
|"https://www.khanacademy.org/images/avatars/robot_male_1.png"
|"https://www.khanacademy.org/images/avatars/robot_male_2.png"
|"https://www.khanacademy.org/images/avatars/robot_male_3.png"
|"https://www.khanacademy.org/images/avatars/orange-juice-squid.png"
|"https://www.khanacademy.org/images/avatars/purple-pi.png"
|"https://www.khanacademy.org/images/avatars/purple-pi-pink.png"
|"https://www.khanacademy.org/images/avatars/purple-pi-teal.png"
|"https://www.khanacademy.org/images/avatars/mr-pants.png"
|"https://www.khanacademy.org/images/avatars/mr-pants-green.png"
|"https://www.khanacademy.org/images/avatars/mr-pants-orange.png"
|"https://www.khanacademy.org/images/avatars/mr-pants-pink.png"
|"https://www.khanacademy.org/images/avatars/mr-pants-purple.png"
|"https://www.khanacademy.org/images/avatars/old-spice-man.png"
|"https://www.khanacademy.org/images/avatars/old-spice-man-blue.png"
|"https://www.khanacademy.org/images/avatars/cs-winston.png"
|"https://www.khanacademy.org/images/avatars/cs-winston-baby.png"
|"https://www.khanacademy.org/images/avatars/cs-ohnoes.png"
|"https://www.khanacademy.org/images/avatars/cs-hopper-happy.png"
|"https://www.khanacademy.org/images/avatars/cs-hopper-jumping.png"
|"https://www.khanacademy.org/images/avatars/cs-hopper-cool.png"
>
Parameters
• client: Client
= undefined
Returns
Promise
<"https://www.khanacademy.org/images/avatars/svg/blobby-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/blobby-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/blobby-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/blobby-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/area-52-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/area-52-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/area-52-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/area-52-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/eggleston-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/eggleston-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/eggleston-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/eggleston-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/scuttlebug-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/scuttlebug-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/scuttlebug-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/scuttlebug-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/boggle-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/boggle-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/boggle-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/boggle-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/sneak-peak-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/sneak-peak-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/sneak-peak-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/sneak-peak-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/stelly-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/stelly-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/stelly-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/stelly-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/cacteye-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/cacteye-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/cacteye-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/cacteye-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/leaf-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/leaf-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/leaf-grey.svg"
| "https://www.khanacademy.org/images/avatars/svg/leaf-red.svg"
| "https://www.khanacademy.org/images/avatars/svg/leaf-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/leaf-yellow.svg"
| "https://www.khanacademy.org/images/avatars/svg/leafers-seed.svg"
| "https://www.khanacademy.org/images/avatars/svg/leafers-seedling.svg"
| "https://www.khanacademy.org/images/avatars/svg/leafers-sapling.svg"
| "https://www.khanacademy.org/images/avatars/svg/leafers-tree.svg"
| "https://www.khanacademy.org/images/avatars/svg/leafers-ultimate.svg"
| "https://www.khanacademy.org/images/avatars/svg/piceratops-seed.svg"
| "https://www.khanacademy.org/images/avatars/svg/piceratops-seedling.svg"
| "https://www.khanacademy.org/images/avatars/svg/piceratops-sapling.svg"
| "https://www.khanacademy.org/images/avatars/svg/piceratops-tree.svg"
| "https://www.khanacademy.org/images/avatars/svg/piceratops-ultimate.svg"
| "https://www.khanacademy.org/images/avatars/svg/duskpin-seed.svg"
| "https://www.khanacademy.org/images/avatars/svg/duskpin-seedling.svg"
| "https://www.khanacademy.org/images/avatars/svg/duskpin-sapling.svg"
| "https://www.khanacademy.org/images/avatars/svg/duskpin-tree.svg"
| "https://www.khanacademy.org/images/avatars/svg/duskpin-ultimate.svg"
| "https://www.khanacademy.org/images/avatars/svg/primosaur-seed.svg"
| "https://www.khanacademy.org/images/avatars/svg/primosaur-seedling.svg"
| "https://www.khanacademy.org/images/avatars/svg/primosaur-sapling.svg"
| "https://www.khanacademy.org/images/avatars/svg/primosaur-tree.svg"
| "https://www.khanacademy.org/images/avatars/svg/primosaur-ultimate.svg"
| "https://www.khanacademy.org/images/avatars/svg/starky-seed.svg"
| "https://www.khanacademy.org/images/avatars/svg/starky-seedling.svg"
| "https://www.khanacademy.org/images/avatars/svg/starky-sapling.svg"
| "https://www.khanacademy.org/images/avatars/svg/starky-tree.svg"
| "https://www.khanacademy.org/images/avatars/svg/starky-ultimate.svg"
| "https://www.khanacademy.org/images/avatars/svg/aqualine-seed.svg"
| "https://www.khanacademy.org/images/avatars/svg/aqualine-seedling.svg"
| "https://www.khanacademy.org/images/avatars/svg/aqualine-sapling.svg"
| "https://www.khanacademy.org/images/avatars/svg/aqualine-tree.svg"
| "https://www.khanacademy.org/images/avatars/svg/aqualine-ultimate.svg"
| "https://www.khanacademy.org/images/avatars/svg/spunky-sam.svg"
| "https://www.khanacademy.org/images/avatars/svg/spunky-sam-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/spunky-sam-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/spunky-sam-red.svg"
| "https://www.khanacademy.org/images/avatars/svg/marcimus.svg"
| "https://www.khanacademy.org/images/avatars/svg/marcimus-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/marcimus-red.svg"
| "https://www.khanacademy.org/images/avatars/svg/marcimus-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pink.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pink-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pink-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/robot_female_1.svg"
| "https://www.khanacademy.org/images/avatars/svg/robot_female_2.svg"
| "https://www.khanacademy.org/images/avatars/svg/robot_female_3.svg"
| "https://www.khanacademy.org/images/avatars/svg/robot_male_1.svg"
| "https://www.khanacademy.org/images/avatars/svg/robot_male_2.svg"
| "https://www.khanacademy.org/images/avatars/svg/robot_male_3.svg"
| "https://www.khanacademy.org/images/avatars/svg/orange-juice-squid.svg"
| "https://www.khanacademy.org/images/avatars/svg/purple-pi.svg"
| "https://www.khanacademy.org/images/avatars/svg/purple-pi-pink.svg"
| "https://www.khanacademy.org/images/avatars/svg/purple-pi-teal.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pants.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pants-green.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pants-orange.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pants-pink.svg"
| "https://www.khanacademy.org/images/avatars/svg/mr-pants-purple.svg"
| "https://www.khanacademy.org/images/avatars/svg/old-spice-man.svg"
| "https://www.khanacademy.org/images/avatars/svg/old-spice-man-blue.svg"
| "https://www.khanacademy.org/images/avatars/svg/cs-winston.svg"
| "https://www.khanacademy.org/images/avatars/svg/cs-winston-baby.svg"
| "https://www.khanacademy.org/images/avatars/svg/cs-ohnoes.svg"
| "https://www.khanacademy.org/images/avatars/svg/cs-hopper-happy.svg"
| "https://www.khanacademy.org/images/avatars/svg/cs-hopper-jumping.svg"
| "https://www.khanacademy.org/images/avatars/svg/cs-hopper-cool.svg"
| "https://www.khanacademy.org/images/avatars/blobby-green.png"
| "https://www.khanacademy.org/images/avatars/blobby-yellow.png"
| "https://www.khanacademy.org/images/avatars/blobby-blue.png"
| "https://www.khanacademy.org/images/avatars/blobby-purple.png"
| "https://www.khanacademy.org/images/avatars/area-52-yellow.png"
| "https://www.khanacademy.org/images/avatars/area-52-blue.png"
| "https://www.khanacademy.org/images/avatars/area-52-green.png"
| "https://www.khanacademy.org/images/avatars/area-52-purple.png"
| "https://www.khanacademy.org/images/avatars/eggleston-blue.png"
| "https://www.khanacademy.org/images/avatars/eggleston-yellow.png"
| "https://www.khanacademy.org/images/avatars/eggleston-green.png"
| "https://www.khanacademy.org/images/avatars/eggleston-orange.png"
| "https://www.khanacademy.org/images/avatars/scuttlebug-purple.png"
| "https://www.khanacademy.org/images/avatars/scuttlebug-yellow.png"
| "https://www.khanacademy.org/images/avatars/scuttlebug-blue.png"
| "https://www.khanacademy.org/images/avatars/scuttlebug-green.png"
| "https://www.khanacademy.org/images/avatars/boggle-yellow.png"
| "https://www.khanacademy.org/images/avatars/boggle-blue.png"
| "https://www.khanacademy.org/images/avatars/boggle-green.png"
| "https://www.khanacademy.org/images/avatars/boggle-purple.png"
| "https://www.khanacademy.org/images/avatars/sneak-peak-green.png"
| "https://www.khanacademy.org/images/avatars/sneak-peak-yellow.png"
| "https://www.khanacademy.org/images/avatars/sneak-peak-blue.png"
| "https://www.khanacademy.org/images/avatars/sneak-peak-purple.png"
| "https://www.khanacademy.org/images/avatars/stelly-blue.png"
| "https://www.khanacademy.org/images/avatars/stelly-yellow.png"
| "https://www.khanacademy.org/images/avatars/stelly-green.png"
| "https://www.khanacademy.org/images/avatars/stelly-orange.png"
| "https://www.khanacademy.org/images/avatars/cacteye-purple.png"
| "https://www.khanacademy.org/images/avatars/cacteye-yellow.png"
| "https://www.khanacademy.org/images/avatars/cacteye-blue.png"
| "https://www.khanacademy.org/images/avatars/cacteye-green.png"
| "https://www.khanacademy.org/images/avatars/leaf-green.png"
| "https://www.khanacademy.org/images/avatars/leaf-blue.png"
| "https://www.khanacademy.org/images/avatars/leaf-grey.png"
| "https://www.khanacademy.org/images/avatars/leaf-red.png"
| "https://www.khanacademy.org/images/avatars/leaf-orange.png"
| "https://www.khanacademy.org/images/avatars/leaf-yellow.png"
| "https://www.khanacademy.org/images/avatars/leafers-seed.png"
| "https://www.khanacademy.org/images/avatars/leafers-seedling.png"
| "https://www.khanacademy.org/images/avatars/leafers-sapling.png"
| "https://www.khanacademy.org/images/avatars/leafers-tree.png"
| "https://www.khanacademy.org/images/avatars/leafers-ultimate.png"
| "https://www.khanacademy.org/images/avatars/piceratops-seed.png"
| "https://www.khanacademy.org/images/avatars/piceratops-seedling.png"
| "https://www.khanacademy.org/images/avatars/piceratops-sapling.png"
| "https://www.khanacademy.org/images/avatars/piceratops-tree.png"
| "https://www.khanacademy.org/images/avatars/piceratops-ultimate.png"
| "https://www.khanacademy.org/images/avatars/duskpin-seed.png"
| "https://www.khanacademy.org/images/avatars/duskpin-seedling.png"
| "https://www.khanacademy.org/images/avatars/duskpin-sapling.png"
| "https://www.khanacademy.org/images/avatars/duskpin-tree.png"
| "https://www.khanacademy.org/images/avatars/duskpin-ultimate.png"
| "https://www.khanacademy.org/images/avatars/primosaur-seed.png"
| "https://www.khanacademy.org/images/avatars/primosaur-seedling.png"
| "https://www.khanacademy.org/images/avatars/primosaur-sapling.png"
| "https://www.khanacademy.org/images/avatars/primosaur-tree.png"
| "https://www.khanacademy.org/images/avatars/primosaur-ultimate.png"
| "https://www.khanacademy.org/images/avatars/starky-seed.png"
| "https://www.khanacademy.org/images/avatars/starky-seedling.png"
| "https://www.khanacademy.org/images/avatars/starky-sapling.png"
| "https://www.khanacademy.org/images/avatars/starky-tree.png"
| "https://www.khanacademy.org/images/avatars/starky-ultimate.png"
| "https://www.khanacademy.org/images/avatars/aqualine-seed.png"
| "https://www.khanacademy.org/images/avatars/aqualine-seedling.png"
| "https://www.khanacademy.org/images/avatars/aqualine-sapling.png"
| "https://www.khanacademy.org/images/avatars/aqualine-tree.png"
| "https://www.khanacademy.org/images/avatars/aqualine-ultimate.png"
| "https://www.khanacademy.org/images/avatars/spunky-sam.png"
| "https://www.khanacademy.org/images/avatars/spunky-sam-green.png"
| "https://www.khanacademy.org/images/avatars/spunky-sam-orange.png"
| "https://www.khanacademy.org/images/avatars/spunky-sam-red.png"
| "https://www.khanacademy.org/images/avatars/marcimus.png"
| "https://www.khanacademy.org/images/avatars/marcimus-orange.png"
| "https://www.khanacademy.org/images/avatars/marcimus-red.png"
| "https://www.khanacademy.org/images/avatars/marcimus-purple.png"
| "https://www.khanacademy.org/images/avatars/mr-pink.png"
| "https://www.khanacademy.org/images/avatars/mr-pink-green.png"
| "https://www.khanacademy.org/images/avatars/mr-pink-orange.png"
| "https://www.khanacademy.org/images/avatars/robot_female_1.png"
| "https://www.khanacademy.org/images/avatars/robot_female_2.png"
| "https://www.khanacademy.org/images/avatars/robot_female_3.png"
| "https://www.khanacademy.org/images/avatars/robot_male_1.png"
| "https://www.khanacademy.org/images/avatars/robot_male_2.png"
| "https://www.khanacademy.org/images/avatars/robot_male_3.png"
| "https://www.khanacademy.org/images/avatars/orange-juice-squid.png"
| "https://www.khanacademy.org/images/avatars/purple-pi.png"
| "https://www.khanacademy.org/images/avatars/purple-pi-pink.png"
| "https://www.khanacademy.org/images/avatars/purple-pi-teal.png"
| "https://www.khanacademy.org/images/avatars/mr-pants.png"
| "https://www.khanacademy.org/images/avatars/mr-pants-green.png"
| "https://www.khanacademy.org/images/avatars/mr-pants-orange.png"
| "https://www.khanacademy.org/images/avatars/mr-pants-pink.png"
| "https://www.khanacademy.org/images/avatars/mr-pants-purple.png"
| "https://www.khanacademy.org/images/avatars/old-spice-man.png"
| "https://www.khanacademy.org/images/avatars/old-spice-man-blue.png"
| "https://www.khanacademy.org/images/avatars/cs-winston.png"
| "https://www.khanacademy.org/images/avatars/cs-winston-baby.png"
| "https://www.khanacademy.org/images/avatars/cs-ohnoes.png"
| "https://www.khanacademy.org/images/avatars/cs-hopper-happy.png"
| "https://www.khanacademy.org/images/avatars/cs-hopper-jumping.png"
| "https://www.khanacademy.org/images/avatars/cs-hopper-cool.png"
>
See
Source
getPrograms()
getPrograms(
client
,sort
?,limit
?):AsyncGenerator
<Program
[],User
,unknown
>
Parameters
• client: Client
= undefined
• sort?: ListProgramSortOrder
• limit?: number
Returns
AsyncGenerator
<Program
[], User
, unknown
>
See
Source
getStatistics()
getStatistics(
client
):Promise
<User
>
Parameters
• client: Client
= undefined
Returns
Promise
<User
>
See
Source
is()
is(
user
):boolean
Checks if two users are the same
Parameters
The user to compare to
Returns
boolean
Overrides
Wrapper.is
Source
isSchema()
isSchema(
schema
):boolean
Checks if the schema represents the same instance
Parameters
• schema: RecursivePartial
<UserSchema
<AvatarSchema
, ProfileSchema
, ListProgramsSchema
<unknown
>>>
Returns
boolean
Inherited from
Wrapper.isSchema
Source
transformSchema()
transformSchema(
schema
):object
Parameters
• schema: RecursivePartial
<UserSchema
<AvatarSchema
, ProfileSchema
, ListProgramsSchema
<unknown
>>>
Returns
object
accessLevel
accessLevel:
undefined
|UserAccessLevel
=schema.profile.accessLevel
badgeCounts
badgeCounts:
undefined
|Record
<BadgeCategory
,number
>
bio
bio:
undefined
|string
canAccessDistrictsHomepage
canAccessDistrictsHomepage:
undefined
|boolean
canHellban
canHellban:
undefined
|boolean
canMessageUsers
canMessageUsers:
undefined
|boolean
canModifyCoaches
canModifyCoaches:
undefined
|boolean
child
child:
undefined
|boolean
completedVideos
completedVideos:
undefined
|number
=schema.countVideosCompleted
creator
creator:
undefined
|boolean
curator
curator:
undefined
|boolean
developer
developer:
undefined
|boolean
email
email:
undefined
|string
emails
emails:
undefined
|string
[]
formalTeacher
formalTeacher:
undefined
|boolean
googleID
googleID:
undefined
|null
|string
hasAccessToAIGuideDev
hasAccessToAIGuideDev:
undefined
|boolean
hasAccessToAIGuideTeacher
hasAccessToAIGuideTeacher:
undefined
|boolean
hasChildren
hasChildren:
undefined
|boolean
hasClasses
hasClasses:
undefined
|boolean
hasCoach
hasCoach:
undefined
|boolean
hasStudents
hasStudents:
undefined
|boolean
joined
joined:
undefined
|Date
kaid
kaid:
undefined
|null
| `kaid_${number}`
key
key:
undefined
|string
midsignupPhantom
midsignupPhantom:
undefined
|boolean
moderator
moderator:
undefined
|boolean
newNotifications
newNotifications:
undefined
|number
nickname
nickname:
undefined
|string
orphan
orphan:
undefined
|boolean
parent
parent:
undefined
|boolean
phantom
phantom:
undefined
|boolean
points
points:
undefined
|number
publisher
publisher:
undefined
|boolean
qualarooID
qualarooID:
undefined
|null
|string
self
self:
undefined
|boolean
teacher
teacher:
undefined
|boolean
username
username:
undefined
|null
|string
Overrides
Wrapper.transformSchema
Source
fromIdentifier()
static
fromIdentifier(identifier
):User
Parameters
• identifier: string
Returns
Source
fromSchema()
static
fromSchema(schema
):User
Creates a new user from the given from a user schema
Parameters
• schema: RecursivePartial
<UserSchema
<AvatarSchema
, ProfileSchema
, ListProgramsSchema
<unknown
>>>
Returns
Description
Note that Client.getUser
will automatically call this method. This is only useful if you need to use the low-level API.