App

App

jwt

client.app.jwt: string;

Your Json Web Token. It's the cached value of getJwt. Read more about JWT (opens in a new tab).

⚠️

This jwt can be invalid. Use getJwt to fetch a new one.


jwtDecoded

The decoded JWT.

client.app.jwtDecoded: JwtPayload;

See: JwtPayload (opens in a new tab)


userId

client.app.userId: string;

The id of the user in this application. The userId is guaranteed to be the same accross sessions.


getJwt()

Return a valid JWT. Return the cached client.app.jwt if it's still valid, else gets a new one from the API.

client.app.getJwt(): Promise<string>;

updateNotifications()

Update the notifications you will receive. You can configure notifications to receive events related to emails and the cloud. You also have the option to temporarily disable them using disableAllUntil argument.

client.app.updateNotifications(arg: {
  cloud?: boolean,
  mail?: boolean,
  enableAll?: boolean,
  disableAllUntil?: Date | null,
}): Promise<AppNotification>;
ParameterDescription
cloudShould enable cloud notifications?
mailShould enable mail notifications?
enableAllShould enable all notifications?
disableAllUntilShould disable notifications for a temporarily?

See: AppNotification


notifications()

Get the notification configuration.

client.app.notifications(): Promise<AppNotification>;

See: AppNotification


userPublicKey()

Get the public key of an user.

client.app.userPublicKey(userId: string): Promise<string>;
ParameterDescription
userIdThe user ID.

settings()

Get the user application settings.

client.app.settings(): Promise<AppSettings>;

See: AppSettings


updateSettings()

Update the user application settings.

client.app.updateSettings(arg: {
  cloudNodeDaysForDelete: number,
  historyFileDaysForDelete: number,
  historyMaxFileCount: number,
});

Parameters

ParameterDescriptionDefault
cloudNodeDaysForDeleteNumber of days before deleting a cloud node.30
historyFileDaysForDeleteNumber of days before deleting a history file.30
historyMaxFileCountMaximum number of history files.10

See: AppSettings