Skip to content

@masks/client

The BFF and browser-PKCE halves of @masks/client, generated from its TypeScript by ./dev reference. CI fails when this page and the source disagree.

Defined in: types.ts:82

  • Error
new MasksError(
code,
description?,
status?
): MasksError;

Defined in: types.ts:87

Parameter Type
code string
description? string
status? number

MasksError

Error.constructor
Property Modifier Type Defined in
code readonly string types.ts:83
description? readonly string types.ts:84
status? readonly number types.ts:85

Defined in: types.ts:22

Property Type Defined in
account_url? string types.ts:36
avatars? Avatars types.ts:30
email? string types.ts:27
email_verified? boolean types.ts:28
expires_at? number types.ts:35
name? string types.ts:25
nickname? string types.ts:26
organization? Organization types.ts:32
organizations? Organization[] types.ts:33
picture? string types.ts:29
scopes string[] types.ts:34
signed_in boolean types.ts:23
subject? string types.ts:24
tenant? Tenant types.ts:31

Defined in: browser.ts:34

Property Type Defined in
organization? string browser.ts:37
prompt? string browser.ts:36
returnTo? string browser.ts:35

Defined in: types.ts:9

Property Type Defined in
identicon string types.ts:11
initials string types.ts:12
photo string | null types.ts:10

Defined in: browser.ts:40

accessToken(): string | null;

Defined in: browser.ts:62

string | null

authorization(): string | null;

Defined in: browser.ts:64

string | null

authorize(options?): Promise<void>;

Defined in: browser.ts:42

Parameter Type
options? AuthorizeOptions

Promise<void>

authorizeUrl(options?): Promise<string>;

Defined in: browser.ts:43

Parameter Type
options? AuthorizeOptions

Promise<string>

avatars(): Avatars | null;

Defined in: browser.ts:55

Avatars | null

avatarUrl(subject, options?): Promise<string>;

Defined in: browser.ts:56

Parameter Type
subject string
options? { size?: number; style?: AvatarStyle; }
options.size? number
options.style? AvatarStyle

Promise<string>

callback(url?): Promise<{
identity: Claims | null;
returnTo: string;
tokens: Tokens;
}>;

Defined in: browser.ts:45

Parameter Type
url? string

Promise<{ identity: Claims | null; returnTo: string; tokens: Tokens; }>

discover(): Promise<Discovery>;

Defined in: browser.ts:41

Promise<Discovery>

expired(leeway?): boolean;

Defined in: browser.ts:65

Parameter Type
leeway? number

boolean

identity(): Claims | null;

Defined in: browser.ts:48

Claims | null

logout(): void;

Defined in: browser.ts:66

void

organization(): Organization | null;

Defined in: browser.ts:49

Organization | null

organizations(): Organization[];

Defined in: browser.ts:50

Organization[]

pending(): boolean;

Defined in: browser.ts:44

boolean

photo(subject?): Promise<Blob | null>;

Defined in: browser.ts:60

Parameter Type
subject? string

Promise<Blob | null>

refresh(): Promise<Tokens>;

Defined in: browser.ts:61

Promise<Tokens>

switchOrganization(key, options?): Promise<void>;

Defined in: browser.ts:51

Parameter Type
key string
options? Omit<AuthorizeOptions, "organization">

Promise<void>

tokens(): Tokens | null;

Defined in: browser.ts:63

Tokens | null


Defined in: browser.ts:15

Property Type Defined in
clientId string browser.ts:17
fetch? (input, init?) => Promise<Response> browser.ts:22
issuer string browser.ts:16
organization? string browser.ts:21
redirectUri string browser.ts:18
resource? string | string[] browser.ts:20
scope? string | string[] browser.ts:19
storage? Storage browser.ts:23

Defined in: types.ts:51

[claim: string]: unknown
Property Type Defined in
org? Organization types.ts:52
orgs? Organization[] types.ts:53

Defined in: types.ts:67

[claim: string]: unknown
Property Type Defined in
authorization_endpoint string types.ts:69
avatar_endpoint? string types.ts:72
avatar_sizes_supported? number[] types.ts:74
avatar_styles_supported? AvatarStyle[] types.ts:73
end_session_endpoint? string types.ts:77
issuer string types.ts:68
jwks_uri? string types.ts:75
revocation_endpoint? string types.ts:76
tenant? Tenant types.ts:78
token_endpoint string types.ts:70
userinfo_endpoint? string types.ts:71

Defined in: jwt.ts:11

  • JsonWebKey
Property Type Defined in
kid? string jwt.ts:12

Defined in: session.ts:16

Property Type Defined in
organization? string session.ts:18
returnTo? string session.ts:17

Defined in: types.ts:15

Property Type Defined in
id string types.ts:16
key string types.ts:17
name string types.ts:18
role string types.ts:19

Defined in: person.ts:3

Property Type Defined in
details string[] person.ts:5
manager boolean person.ts:7
name string person.ts:4
organization Organization | null person.ts:8
organizations Organization[] person.ts:9
others Organization[] person.ts:10
owner boolean person.ts:12
role string | null person.ts:11
unconfirmed boolean person.ts:6

Defined in: types.ts:39

Property Type Defined in
error string types.ts:41
handshake_url? string types.ts:43
login_url? string types.ts:42
signed_in false types.ts:40

Defined in: session.ts:21

avatarUrl(account, options?): string | null;

Defined in: session.ts:33

Parameter Type
account Account | null
options? { size?: number; style?: AvatarStyle; }
options.size? number
options.style? AvatarStyle

string | null

handshake(): void;

Defined in: session.ts:31

void

handshakeUrl(): string;

Defined in: session.ts:32

string

login(options?): void;

Defined in: session.ts:25

Parameter Type
options? LoginOptions

void

loginUrl(options?): string;

Defined in: session.ts:30

Parameter Type
options? LoginOptions

string

logout(options?): Promise<void>;

Defined in: session.ts:37

Parameter Type
options? { everywhere?: boolean; }
options.everywhere? boolean

Promise<void>

require(options?): Promise<Account>;

Defined in: session.ts:24

Parameter Type
options? LoginOptions

Promise<Account>

session(): Promise<Account | null>;

Defined in: session.ts:22

Promise<Account | null>

status(): Promise<Status>;

Defined in: session.ts:23

Promise<Status>

switchOrganization(key, options?): void;

Defined in: session.ts:26

Parameter Type
key string
options? Omit<LoginOptions, "organization">

void


Defined in: session.ts:10

Property Type Defined in
basePath? string session.ts:11
csrfToken? () => string | null session.ts:13
fetch? (input, init?) => Promise<Response> session.ts:12

Defined in: types.ts:1

Property Type Defined in
name? string types.ts:4
subdomain? string types.ts:3
uuid? string types.ts:2

Defined in: types.ts:57

Property Type Defined in
access_token string types.ts:58
expires_in number types.ts:63
id_token? string types.ts:59
obtained_at number types.ts:64
refresh_token? string types.ts:60
scope string types.ts:62
token_type string types.ts:61

Defined in: jwt.ts:15

Property Type Defined in
audience string jwt.ts:17
issuer string jwt.ts:16
keyFor (kid) => Promise<Jwk> jwt.ts:20
leeway? number jwt.ts:19
nonce string jwt.ts:18
type AvatarStyle = "photo" | "identicon" | "initials";

Defined in: types.ts:7


type Status =
| {
account: Account;
state: "signed_in";
}
| {
loginUrl: string;
state: "signed_out";
}
| {
handshakeUrl: string;
state: "handshake_required";
};

Defined in: types.ts:46

function createBrowserClient(options): BrowserClient;

Defined in: browser.ts:75

Parameter Type
options BrowserOptions

BrowserClient


function createSession(options?): SessionClient;

Defined in: session.ts:60

Parameter Type
options SessionOptions

SessionClient


function holdsRole(account, ...roles): boolean;

Defined in: person.ts:42

Parameter Type
account Account
…roles string[]

boolean


function initials(name): string;

Defined in: person.ts:48

Parameter Type
name string

string


function personFrom(account): PersonInfo;

Defined in: person.ts:15

Parameter Type
account Account

PersonInfo


function verifyIdToken(token, __namedParameters): Promise<Claims>;

Defined in: jwt.ts:51

Parameter Type
token string
__namedParameters VerifyOptions

Promise<Claims>