NotificationConsent
Defined in: src/client/notification-consent.ts:158
Reads and withdraws an application’s consent, at the Internet Identity canister.
Methods
Section titled “Methods”revoke()
Section titled “revoke()”revoke():
Promise<void>
Defined in: src/client/notification-consent.ts:208
Withdraws this application’s consent to notify the signed-in user.
Idempotent at the canister: consent that is already withdrawn is Ok, because
the caller wanted it gone and it is gone. What comes back as an error is the
canister failing to write, and it is raised rather than dropped — an
application that told a user it had turned notifications off should be able to
find out that it had not.
Returns
Section titled “Returns”Promise<void>
status()
Section titled “status()”status():
Promise<NotificationConsentStatus>
Defined in: src/client/notification-consent.ts:191
Whether this application may notify the signed-in user.
A query, so the answer is uncertified: it is what a control is painted from, not something to rest a decision on.
Returns
Section titled “Returns”Promise<NotificationConsentStatus>
create()
Section titled “create()”
staticcreate(options):Promise<NotificationConsent>
Defined in: src/client/notification-consent.ts:172
Builds the calls as the session.
As the session and not as the application: Internet Identity authorises both methods by the principal the session signs with, which is the one that mints app delegations rather than any of the ones minted from it.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<NotificationConsent>