User
This class defines a User on the Bkper platform.
Users can own and collaborate on [[Books]], manage [[Collections]], and connect to external services through [[Connections]].
Each User has a unique identity, subscription plan details, and access permissions across the platform.
Extends
Resource<bkper.User>
Constructors
Constructor
new User(payload?, config?): User;Parameters
| Parameter | Type |
|---|---|
payload? | User |
config? | Config |
Returns
User
Overrides
Resource<bkper.User>.constructorProperties
payload
payload: User;The underlying payload data for this resource
Inherited from
Resource.payloadMethods
getAvatarUrl()
getAvatarUrl(): string | undefined;Gets the avatar url of the User.
Returns
string | undefined
The User’s avatar url
getBilling()
getBilling(): Promise<Billing>;Gets the billing information for this User.
Returns
Promise<Billing>
The User’s billing information
getConnection()
getConnection(id): Promise<Connection>;Gets a [[Connection]] of the User.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The Connection’s id |
Returns
Promise<Connection>
The retrieved Connection object
getConnections()
getConnections(): Promise<Connection[]>;Gets the [[Connections]] of the User.
Returns
Promise<Connection[]>
The retrieved Connection objects
getEmail()
getEmail(): string | undefined;Gets the email of the User.
Returns
string | undefined
The User’s email
getFullName()
getFullName(): string | undefined;Gets the full name of the User.
Returns
string | undefined
The User’s full name
getGivenName()
getGivenName(): string | undefined;Gets the given name of the User.
Returns
string | undefined
The User’s given name
getHostedDomain()
getHostedDomain(): string | undefined;Gets the hosted domain of the User.
Returns
string | undefined
The User’s hosted domain
getId()
getId(): string | undefined;Gets the id of the User.
Returns
string | undefined
The User’s id
getName()
getName(): string | undefined;Gets the name of the User.
Returns
string | undefined
The User’s name
getUsername()
getUsername(): string | undefined;Gets the username of the User.
Returns
string | undefined
The User’s username
hasUsedConnections()
hasUsedConnections(): boolean | undefined;Tells if the User has already used [[Connections]].
Returns
boolean | undefined
True if the User has already used Connections
json()
json(): User;Gets an immutable copy of the JSON payload for this resource.
Returns
User
An immutable copy of the json payload
Inherited from
Resource.json