Interface: MincaConnection
Defined in: packages/core/src/session/connection.ts:112
Methods
connect()
connect(home?): Promise<void>;Defined in: packages/core/src/session/connection.ts:123
Opens the home and asks, with a new key. Call it from a click. Acts for whichever account the person chooses there: a new one, or one connected already, whose grant this renews.
Parameters
| Parameter | Type | Description |
|---|---|---|
home? | string | The person's own home — minca.example.com is enough. Default: the one in state.home. |
Returns
Promise<void>
disconnect()
disconnect(did?): Promise<void>;Defined in: packages/core/src/session/connection.ts:130
Forgets an account's grant and its key (default the one acted for), and acts for the next connected account, if any. The account is untouched.
Parameters
| Parameter | Type |
|---|---|
did? | string |
Returns
Promise<void>
getState()
getState(): MincaConnectionState;Defined in: packages/core/src/session/connection.ts:113
Returns
openHome()
openHome(section?): void;Defined in: packages/core/src/session/connection.ts:137
Opens the person's account home in a window of its own, at the account
this app acts for: its settings, or a section of them such as
notifications. The home is never framed, since it holds the keys. Call
it from a click.
Parameters
| Parameter | Type |
|---|---|
section? | string |
Returns
void
propose()
propose(automations): Promise<Proposed>;Defined in: packages/core/src/session/connection.ts:143
Offers the person automations that notify them — "notify me when…" — once connected. Opens the home; call it from a click.
Parameters
| Parameter | Type |
|---|---|
automations | readonly AutomationProposal[] |
Returns
Promise<Proposed>
What they kept
start()
start(): Promise<void>;Defined in: packages/core/src/session/connection.ts:116
Picks up a grant from an earlier visit. Safe to call more than once.
Returns
Promise<void>
subscribe()
subscribe(listener): () => void;Defined in: packages/core/src/session/connection.ts:114
Parameters
| Parameter | Type |
|---|---|
listener | (state) => void |
Returns
() => void
use()
use(did): Promise<void>;Defined in: packages/core/src/session/connection.ts:125
Acts for another connected account. The home is not asked: its grant is here already.
Parameters
| Parameter | Type |
|---|---|
did | string |
Returns
Promise<void>